[PATCH] qemu: Fetch info on NVDIMM-s too when updating memory devices
by Michal Privoznik
Sometimes it may come handy to learn what address is a NVDIMM
mapped to inside a guest. While users can provide an address they
want to have NVDIMM mapped to, it's optional. Fortunately, when a
domain is being started we issue the 'query-memory-devices'
monitor command and the reply is the same for 'dimm' and 'nvdimm'
types. Therefore, updating NVDIMM address is trivial.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_monitor_json.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d5622bd6d9..68ee322ad9 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -7484,7 +7484,7 @@ qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitor *mon,
meminfo = g_new0(qemuMonitorMemoryDeviceInfo, 1);
/* dimm memory devices */
- if (STREQ(type, "dimm")) {
+ if (STREQ(type, "dimm") || STREQ(type, "nvdimm") ) {
if (virJSONValueObjectGetNumberUlong(dimminfo, "addr",
&meminfo->address) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
--
2.35.1
2 years, 7 months
[libvirt PATCH] util: Fix stubs for virProcessGet{Stat,Sched}Info()
by Andrea Bolognani
Commit d73852c49962 moved the original QEMU-specific helpers to
the utils module, which resulted in build failures on non-Unix
platforms due to the unconditional use of Unix-only symbols such
as _SC_CLK_TCK.
To deal with that situation, commit d7c64453aa0e made the helpers
Linux-only and added stubs for other platforms that, when called,
would always fail with ENOSYS.
However the original helpers had been carefully written so that,
while they would only be able to produce useful output on Linux,
they would still succeed on the other Unix platforms where we
build the QEMU driver.
Restore the original behavior so that calling APIs such as
virDomainGetInfo() can once again work on FreeBSD and macOS.
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/298
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/517776953
src/util/virprocess.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index b559a4257e..36d7df050a 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -1875,23 +1875,34 @@ virProcessGetSchedInfo(unsigned long long *cpuWait,
#else
int
-virProcessGetStatInfo(unsigned long long *cpuTime G_GNUC_UNUSED,
- int *lastCpu G_GNUC_UNUSED,
- long *vm_rss G_GNUC_UNUSED,
+virProcessGetStatInfo(unsigned long long *cpuTime,
+ int *lastCpu,
+ long *vm_rss,
pid_t pid G_GNUC_UNUSED,
pid_t tid G_GNUC_UNUSED)
{
- errno = ENOSYS;
- return -1;
+ /* We don't have a way to collect this information on non-Linux
+ * platforms, so just report neutral values */
+ if (cpuTime)
+ *cpuTime = 0;
+ if (lastCpu)
+ *lastCpu = 0;
+ if (vm_rss)
+ *vm_rss = 0;
+
+ return 0;
}
int
-virProcessGetSchedInfo(unsigned long long *cpuWait G_GNUC_UNUSED,
+virProcessGetSchedInfo(unsigned long long *cpuWait,
pid_t pid G_GNUC_UNUSED,
pid_t tid G_GNUC_UNUSED)
{
- virReportSystemError(ENOSYS, "%s",
- _("scheduler information is not supported on this platform"));
- return -1;
+ /* We don't have a way to collect this information on non-Linux
+ * platforms, so just report neutral values */
+ if (cpuWait)
+ *cpuWait = 0;
+
+ return 0;
}
#endif /* __linux__ */
--
2.35.1
2 years, 7 months
[PATCH 00/14] docs: Convert some pages to rST and clean up (part 5)
by Peter Krempa
This series corrects some mistakes from previous conversions (local
anchor links, ordering of input files) and finishes the conversion of
format* documents.
Pavel Hrdina (1):
docs: Convert 'formatnwfilter' page to rst
Peter Krempa (13):
docs: meson: Sort list of RST files to build
docs: api: Fix local anchor links
docs: drivers: Fix local anchor links
docs: drvbhve: Fix local anchor links
docs: drvesx: Fix local anchor links
docs: drvnodedev: Fix local anchor links
docs: drvsecret: Fix local anchor links
docs: kbase/launch_security_sev: Fix local anchor links
docs: kbase/tlscerts: Fix local anchor links
docs: pci-hotplug: Fix local anchor links
docs: Convert 'formatcaps' page to rst
docs: Convert 'formatnetwork' page to rst
docs: Convert 'formatnode' page to rst
docs/api.rst | 5 +-
docs/drivers.rst | 2 +-
docs/drvbhyve.rst | 6 +-
docs/drvesx.rst | 19 +-
docs/drvnodedev.rst | 20 +-
docs/firewall.rst | 2 +-
docs/formatcaps.html.in | 222 ---
docs/formatcaps.rst | 197 +++
docs/formatdomain.rst | 7 +-
docs/formatnetwork.html.in | 1479 -----------------
docs/formatnetwork.rst | 1144 +++++++++++++
docs/formatnetworkport.rst | 2 +-
docs/formatnode.html.in | 657 --------
docs/formatnode.rst | 556 +++++++
docs/formatnwfilter.html.in | 2471 ----------------------------
docs/formatnwfilter.rst | 1789 ++++++++++++++++++++
docs/formatsecret.rst | 16 +-
docs/kbase/launch_security_sev.rst | 2 +-
docs/kbase/tlscerts.rst | 7 +-
docs/manpages/virsh.rst | 5 +-
docs/meson.build | 12 +-
docs/pci-hotplug.rst | 5 +-
22 files changed, 3742 insertions(+), 4883 deletions(-)
delete mode 100644 docs/formatcaps.html.in
create mode 100644 docs/formatcaps.rst
delete mode 100644 docs/formatnetwork.html.in
create mode 100644 docs/formatnetwork.rst
delete mode 100644 docs/formatnode.html.in
create mode 100644 docs/formatnode.rst
delete mode 100644 docs/formatnwfilter.html.in
create mode 100644 docs/formatnwfilter.rst
--
2.35.1
2 years, 7 months
[libvirt PATCH 00/10] Automatic mutex management - part 6
by Tim Wiederhake
Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD
to simplify mutex management.
Tim Wiederhake (10):
virstorageobj: Replace deprecated virHash functions
virStoragePoolObjAddVol: Simplify error path
virStorageVolObjEndAPI: Remove
virStorageVolObjNew: Move locking to usage site
virstorageobject: Use automatic mutex management
virNetServerProcessClients: Remove goto
virnetserver: Use automatic mutex management
virnetserverclient: Use automatic mutex management
security_manager: Use automatic mutex management
vz_driver: Use automatic mutex management
src/conf/virstorageobj.c | 185 +++++------
src/rpc/virnetserver.c | 295 +++++++-----------
src/rpc/virnetserverclient.c | 432 ++++++++++++--------------
src/security/security_manager.c | 524 +++++++++++++-------------------
src/vz/vz_driver.c | 50 ++-
5 files changed, 604 insertions(+), 882 deletions(-)
--
2.31.1
2 years, 7 months
[libvirt PATCH 0/6] ci: Update targets
by Andrea Bolognani
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/516876671
Andrea Bolognani (6):
ci: Drop FreeBSD -CURRENT
ci: Simplify Alpine Linux 3.14 definition
ci: Add Alpine Linux 3.15
ci: Add openSUSE Leap 15.3
ci: Move codestyle job to openSUSE Leap 15.3
ci: Drop openSUSE Leap 15.2
.gitlab-ci.yml | 4 +-
ci/cirrus/freebsd-current.vars | 16 ----
ci/containers/alpine-315.Dockerfile | 80 +++++++++++++++++++
...ockerfile => opensuse-leap-153.Dockerfile} | 2 +-
ci/gitlab.yml | 26 ++++--
ci/manifest.yml | 14 +---
6 files changed, 108 insertions(+), 34 deletions(-)
delete mode 100644 ci/cirrus/freebsd-current.vars
create mode 100644 ci/containers/alpine-315.Dockerfile
rename ci/containers/{opensuse-leap-152.Dockerfile => opensuse-leap-153.Dockerfile} (98%)
--
2.35.1
2 years, 7 months
[PATCH] docs: Fix spelling for Homebrew
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
docs/platforms.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/platforms.rst b/docs/platforms.rst
index 90f14b02e8..2e7e35e1c4 100644
--- a/docs/platforms.rst
+++ b/docs/platforms.rst
@@ -52,7 +52,7 @@ the project will look at CentOS, Debian, Fedora, openSUSE, RHEL, SLES and
Ubuntu LTS. Other distros will be assumed to ship similar software versions.
For FreeBSD, decisions will be made based on the contents of the ports tree;
-for macOS, `HomeBrew`_ will be used, although `MacPorts`_ is expected to carry
+for macOS, `Homebrew`_ will be used, although `MacPorts`_ is expected to carry
similar versions.
Windows
@@ -78,7 +78,7 @@ If a hypervisor is not commonly shipped directly by any distro listed above,
or until the vendor discontinues support, whichever comes first.
-.. _HomeBrew: https://brew.sh/
+.. _Homebrew: https://brew.sh/
.. _MacPorts: https://www.macports.org/
.. _Repology: https://repology.org/
.. _hypervisor drivers: drivers.html
--
2.35.1
2 years, 7 months
[PATCH 0/2] qemu: fix and cleanup for a race on undefine and create
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
qemu: drop needless acquiring job on removing domain
qemu: fix one more race on undefining and create
src/qemu/qemu_domain.c | 45 +--------------------------------------
src/qemu/qemu_domain.h | 10 ++++-----
src/qemu/qemu_domainjob.c | 10 +++++++++
src/qemu/qemu_driver.c | 12 +++++------
src/qemu/qemu_migration.c | 10 ++++-----
src/qemu/qemu_process.c | 12 ++++-------
6 files changed, 30 insertions(+), 69 deletions(-)
--
2.35.1
2 years, 7 months
[PATCH] virDomainGraphicsListenDefParseXML: validate attribute 'network' for listen type 'network'
by Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/93
Signed-off-by: Amneesh Singh <natto(a)weirdnatto.in>
---
src/conf/domain_conf.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index bd28840..f1651e3 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -12268,6 +12268,13 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDef *def,
goto error;
}
def->network = g_steal_pointer(&network);
+ } else {
+ if (def->type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("'network' attribute is required for listen "
+ "type 'network'"));
+ goto error;
+ }
}
if (socketPath && socketPath[0]) {
--
2.35.1
2 years, 7 months
[PATCH 0/4] qemu: a bugfix and a few cleanups of graphics port releasing
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (4):
qemu: cleanup code to release VNC port
qemu: fix releasing VNC websocket port domain does not own
qemu: cleanup code to release VNC websocket port
qemu: cleanup code to relece SPICE ports
src/conf/domain_conf.h | 1 +
src/qemu/qemu_process.c | 46 ++++++++++++++++++-----------------------
2 files changed, 21 insertions(+), 26 deletions(-)
--
2.35.1
2 years, 7 months