[PATCH] qemu: Add NUMA node automatically for memory hotplug
by Michal Privoznik
Up until v2.11.0-rc2~19^2~3 QEMU used to require at least one
NUMA node to be configured when memory hotplug was enabled. After
that commit, QEMU automatically adds a NUMA node if none was
specified on the cmd line. Reflect this in domain XML, i.e.
explicitly add a NUMA node into our domain definition if needed.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 53 ++++++++++++++++++-
...emory-hotplug-ppc64-nonuma-abi-update.args | 11 ++--
...memory-hotplug-ppc64-nonuma-abi-update.xml | 7 ++-
3 files changed, 63 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 3700b3e711..a9ed5f5901 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4807,6 +4807,51 @@ qemuDomainDefTsegPostParse(virDomainDef *def,
}
+static int
+qemuDomainDefNumaAutoAdd(virDomainDef *def,
+ unsigned int parseFlags)
+{
+ bool abiUpdate = !!(parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE);
+ unsigned long long initialMem;
+ size_t i;
+
+ if (!abiUpdate ||
+ !virDomainDefHasMemoryHotplug(def) ||
+ virDomainNumaGetNodeCount(def->numa) > 0) {
+ return 0;
+ }
+
+ initialMem = virDomainDefGetMemoryInitial(def);
+
+ if (!def->numa)
+ def->numa = virDomainNumaNew();
+
+ virDomainNumaSetNodeCount(def->numa, 1);
+ virDomainNumaSetNodeMemorySize(def->numa, 0, initialMem);
+
+ for (i = 0; i < def->nmems; i++) {
+ virDomainMemoryDef *mem = def->mems[i];
+
+ switch (mem->model) {
+ case VIR_DOMAIN_MEMORY_MODEL_DIMM:
+ case VIR_DOMAIN_MEMORY_MODEL_NVDIMM:
+ case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
+ if (mem->targetNode == -1)
+ mem->targetNode = 0;
+ break;
+
+ case VIR_DOMAIN_MEMORY_MODEL_NONE:
+ case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM:
+ case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
+ case VIR_DOMAIN_MEMORY_MODEL_LAST:
+ break;
+ }
+ }
+
+ return 0;
+}
+
+
/**
* qemuDomainDefNumaCPUsRectify:
* @numa: pointer to numa definition
@@ -4841,8 +4886,12 @@ qemuDomainDefNumaCPUsRectify(virDomainDef *def,
static int
qemuDomainDefNumaCPUsPostParse(virDomainDef *def,
- virQEMUCaps *qemuCaps)
+ virQEMUCaps *qemuCaps,
+ unsigned int parseFlags)
{
+ if (qemuDomainDefNumaAutoAdd(def, parseFlags) < 0)
+ return -1;
+
return qemuDomainDefNumaCPUsRectify(def, qemuCaps);
}
@@ -4914,7 +4963,7 @@ qemuDomainDefPostParse(virDomainDef *def,
if (qemuDomainDefTsegPostParse(def, qemuCaps) < 0)
return -1;
- if (qemuDomainDefNumaCPUsPostParse(def, qemuCaps) < 0)
+ if (qemuDomainDefNumaCPUsPostParse(def, qemuCaps, parseFlags) < 0)
return -1;
return 0;
diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args
index 83bfb1123c..18ae15aa0b 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args
@@ -10,13 +10,14 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
--machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
+-machine pseries,usb=off,dump-guest-core=off \
-accel kvm \
-cpu POWER9 \
--m size=1048576k,slots=16,maxmem=4194304k \
--object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":1073741824}' \
+-m size=1310720k,slots=16,maxmem=4194304k \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
+-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1342177280}' \
+-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
-uuid 49545eb3-75e1-2d0a-acdd-f0294406c99e \
-display none \
-no-user-config \
@@ -27,9 +28,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-no-shutdown \
-boot strict=on \
-object '{"qom-type":"memory-backend-ram","id":"memdimm0","size":536870912}' \
--device '{"driver":"pc-dimm","memdev":"memdimm0","id":"dimm0","slot":0}' \
+-device '{"driver":"pc-dimm","node":0,"memdev":"memdimm0","id":"dimm0","slot":0}' \
-object '{"qom-type":"memory-backend-ram","id":"memdimm1","size":536870912}' \
--device '{"driver":"pc-dimm","memdev":"memdimm1","id":"dimm1","slot":1}' \
+-device '{"driver":"pc-dimm","node":0,"memdev":"memdimm1","id":"dimm1","slot":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma-abi-update.xml b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma-abi-update.xml
index d0be98f140..c4677dc977 100644
--- a/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma-abi-update.xml
+++ b/tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma-abi-update.xml
@@ -2,7 +2,7 @@
<name>QEMUGuest1</name>
<uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid>
<maxMemory slots='16' unit='KiB'>4194304</maxMemory>
- <memory unit='KiB'>2097152</memory>
+ <memory unit='KiB'>2098177</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
@@ -11,6 +11,9 @@
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>POWER9</model>
+ <numa>
+ <cell id='0' cpus='0' memory='1049601' unit='KiB'/>
+ </numa>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
@@ -29,12 +32,14 @@
<memory model='dimm'>
<target>
<size unit='KiB'>524288</size>
+ <node>0</node>
</target>
<address type='dimm' slot='0'/>
</memory>
<memory model='dimm'>
<target>
<size unit='KiB'>524288</size>
+ <node>0</node>
</target>
<address type='dimm' slot='1'/>
</memory>
--
2.41.0
1 year, 3 months
[PATCH] Added support for vendor and product for qemu ide-hd
by Benedek Major
The XML-Schema specifies two tags vendor and product for the disk type. But they only apply to the SCSI bus,
even though the QEMU driver ide-hd and ide-cd have support for the command line argument -model.
The model corresponds to words 27-46 of the IDENTIFY PACKET DEVICE response from the ATAPI spec.
Words 27-46 is a 40 Char space for the model number of the device. The model number is built by
combining the vendor and the product fields with a single space as separator in the middle.
Therefore I would say, that vendor and product pretty much correlate to the model field in QEMU,
so the ide disk should also have the possibility of adding vendor and product to it.
The tests got changed to incorporate the new error message which now contains that the ide and
sata bus also supports vendor and product. Also the xml to command line tests got updated, to
have both fields present for testing.
The command generator reordered a bit too, to only include disk->vendor and disk->product into the
json generation, when the scsi bus is selected. The same logic applies to the ide and sata bus.
Signed-off-by: Benedek Major <benedek(a)major.onl>
---
src/qemu/qemu_command.c | 21 ++++++++++++++++---
src/qemu/qemu_validate.c | 6 ++++--
.../disk-sata-device.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/disk-sata-device.xml | 2 ++
...csi-disk-vpd-build-error.x86_64-latest.err | 2 +-
.../disk-sata-device.x86_64-latest.xml | 2 ++
6 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index ad224571f3..903872091f 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1943,8 +1943,6 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
"p:physical_block_size", physical_block_size,
"A:wwn", &wwn,
"p:rotation_rate", disk->rotation_rate,
- "S:vendor", disk->vendor,
- "S:product", disk->product,
"T:removable", removable,
"S:write-cache", qemuOnOffAuto(writeCache),
"p:cyls", disk->geometry.cylinders,
@@ -1956,7 +1954,24 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
"S:rerror", rpolicy,
NULL) < 0)
return NULL;
-
+ if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI) {
+ /* add vendor and product in SCSI section, since only SCSI supports
+ * vendor and product tag*/
+ if (virJSONValueObjectAdd(&props,
+ "S:vendor", disk->vendor,
+ "S:product", disk->product,
+ NULL) < 0)
+ return NULL;
+ }
+ if (disk->bus == VIR_DOMAIN_DISK_BUS_IDE || disk->bus == VIR_DOMAIN_DISK_BUS_SATA) {
+ /* Repurpose vendor and product, since IDE-Disk only supports model,
+ * which per ATAPI spec is the combination of vendor and product
+ * separated by a single space*/
+ if (virJSONValueObjectAdd(&props,
+ "S:model", g_strconcat(disk->vendor, " ", disk->product, NULL),
+ NULL) < 0)
+ return NULL;
+ }
return g_steal_pointer(&props);
}
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 7e09e2c52f..e7312bf789 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -2871,9 +2871,11 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
}
if (disk->vendor || disk->product) {
- if (disk->bus != VIR_DOMAIN_DISK_BUS_SCSI) {
+ if (disk->bus != VIR_DOMAIN_DISK_BUS_SCSI
+ && disk->bus != VIR_DOMAIN_DISK_BUS_IDE
+ && disk->bus != VIR_DOMAIN_DISK_BUS_SATA) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Only scsi disk supports vendor and product"));
+ _("Only scsi, sata and ide disk supports vendor and product"));
return -1;
}
diff --git a/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args b/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args
index b60d9b16d4..296f8f1ee0 100644
--- a/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args
@@ -30,7 +30,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"ahci","id":"sata0","bus":"pci.0","addr":"0x2"}' \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUG uest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
--device '{"driver":"ide-hd","bus":"sata0.0","drive":"libvirt-1-format","id":"sata0-0-0","bootindex":1}' \
+-device '{"driver":"ide-hd","bus":"sata0.0","drive":"libvirt-1-format","id":"sata0-0-0","bootindex":1,"model":"Seagate ST3500418AS"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-sata-device.xml b/tests/qemuxml2argvdata/disk-sata-device.xml
index a9def2923e..51eb472dcc 100644
--- a/tests/qemuxml2argvdata/disk-sata-device.xml
+++ b/tests/qemuxml2argvdata/disk-sata-device.xml
@@ -19,6 +19,8 @@
<source dev='/dev/HostVG/QEMUG uest1'/>
<target dev='sda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ <vendor>Seagate</vendor>
+ <product>ST3500418AS</product>
</disk>
<controller type='usb' index='0'/>
<controller type='sata' index='0'/>
diff --git a/tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.x86_64-latest.err b/tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.x86_64-latest.err
index f70b7a774f..fd77b3feb0 100644
--- a/tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.x86_64-latest.err
+++ b/tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.x86_64-latest.err
@@ -1 +1 @@
-unsupported configuration: Only scsi disk supports vendor and product
+unsupported configuration: Only scsi, sata and ide disk supports vendor and product
diff --git a/tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml
index cd20f5185b..6caedf66a5 100644
--- a/tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml
@@ -21,6 +21,8 @@
<driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUG uest1'/>
<target dev='sda' bus='sata'/>
+ <vendor>Seagate</vendor>
+ <product>ST3500418AS</product>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='piix3-uhci'>
--
2.41.0
1 year, 3 months
[PATCH v2] nodedev: transient mdev update on nodeDeviceCreateXML
by Boris Fiuczynski
Update the optional mdev attributes by running an mdevctl update on a
new created nodedev object representing an mdev.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143158
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
---
src/node_device/node_device_udev.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 4c37ec3189..fce4212728 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1757,12 +1757,20 @@ nodeStateCleanup(void)
static int
udevHandleOneDevice(struct udev_device *device)
{
+ virNodeDevCapType dev_cap_type;
const char *action = udev_device_get_action(device);
VIR_DEBUG("udev action: '%s': %s", action, udev_device_get_syspath(device));
- if (STREQ(action, "add") || STREQ(action, "change"))
- return udevAddOneDevice(device);
+ if (STREQ(action, "add") || STREQ(action, "change")) {
+ int ret = udevAddOneDevice(device);
+ if (ret == 0 &&
+ udevGetDeviceType(device, &dev_cap_type) == 0 &&
+ dev_cap_type == VIR_NODE_DEV_CAP_MDEV)
+ if (nodeDeviceUpdateMediatedDevices() < 0)
+ VIR_WARN("mdevctl failed to update mediated devices");
+ return ret;
+ }
if (STREQ(action, "remove"))
return udevRemoveOneDevice(device);
--
2.41.0
1 year, 3 months
[PATCH] spec: Do not disable some systemd units of newly split package
by Martin Kletzander
Since virtproxyd was split into libvirt-daemon-proxy package it can
happen that, in case a distribution has such systemd preset, when
installing this package, already pre-enabled and configured units like
-tls.socket and -tcp.socket will get disabled.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2210058
Fixes: 5358618b1cd0afc126aed313249bf2134731665f
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
This is more like an RFC as I would really like to know what to really do in
this case. What happens, basically, is that if you have libvirt-daemon-9.0.0
and set up virtproxyd-tls.socket for example and then upgrade to anything newer,
then the package libvirt-daemon-proxy will get installed. The %post action
calls "%libvirt_daemon_systemd_post_inet virtproxyd" which calls "%systemd_post
with all virtproxyd units. What %systemd_post is supposed to do is reset units
to a preset state in the case of package installation, but not during upgrade.
However the libvirt-daemon-proxy package did not exist on the system before, so
this action is not an update, but an installation.
If no preset is mentioned for a unit then `systemctl preset` does not change
anything. However some distros might have a catch-all preset "disable *" for
some reason, I guess based on an example in the documentation, and there is no
way to override an already configured preset, you can only enable or disable a
unit in a preset.
That all means than it can happen that you enable virtproxyd-tcp.socket, for
example, then update your system and find that it is disabled. There are
various ways to deal with this, but I don't see any one that would 100% satisfy
me with regards to all the issues and at the same time could be implemented
"soon enough" given libvirt already had three releases with the
libvirt-daemon-proxy split.
libvirt.spec.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1f77cd90b772..50f521b7ce88 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1592,7 +1592,13 @@ fi
%post daemon-proxy
%if %{with_modular_daemons}
-%libvirt_daemon_systemd_post_inet virtproxyd
+# Since this was split into a different package, a transparent update for the
+# virtproxyd units could actually disable an already configured ones
+# (e.g. virtproxyd-tls.socket) as %systemd_post runs `systemctl preset` if this
+# is an installation (and is skipped on update). So skip this step for those
+# that need an extra setup to work since they will most likely not be preset to
+# enabled, but that is up to the point of the distribution.
+%libvirt_daemon_systemd_post virtproxyd
%endif
%preun daemon-proxy
--
2.41.0
1 year, 3 months
[PATCH 0/3] Don't use 'query-commands' to probe presence of commands
by Peter Krempa
We now call 'query-qmp-schema' unconditionally and can extract the
information from there.
Peter Krempa (3):
qemu: capabilities: Probe presence of commands from QMP schema instead
of 'query-commands'
qemu: capabilities: Don't probe 'query-commands'
qemu_monitor: Remove helpers for 'query-commands'
src/qemu/qemu_capabilities.c | 30 +-
src/qemu/qemu_monitor.c | 12 -
src/qemu/qemu_monitor.h | 2 -
src/qemu/qemu_monitor_json.c | 44 -
src/qemu/qemu_monitor_json.h | 5 -
.../caps_4.2.0_aarch64.replies | 700 ++------------
.../caps_4.2.0_ppc64.replies | 678 ++------------
.../caps_4.2.0_s390x.replies | 686 ++------------
.../caps_4.2.0_x86_64.replies | 732 ++-------------
.../caps_5.0.0_aarch64.replies | 704 ++------------
.../caps_5.0.0_ppc64.replies | 690 ++------------
.../caps_5.0.0_riscv64.replies | 682 ++------------
.../caps_5.0.0_x86_64.replies | 736 ++-------------
.../caps_5.1.0_sparc.replies | 629 +------------
.../caps_5.1.0_x86_64.replies | 743 ++-------------
.../caps_5.2.0_aarch64.replies | 735 ++-------------
.../caps_5.2.0_ppc64.replies | 717 ++-------------
.../caps_5.2.0_riscv64.replies | 709 ++------------
.../caps_5.2.0_s390x.replies | 717 ++-------------
.../caps_5.2.0_x86_64.replies | 767 ++--------------
.../caps_6.0.0_aarch64.replies | 732 ++-------------
.../caps_6.0.0_s390x.replies | 714 ++-------------
.../caps_6.0.0_x86_64.replies | 767 ++--------------
.../caps_6.1.0_x86_64.replies | 770 ++--------------
.../caps_6.2.0_aarch64.replies | 739 ++-------------
.../caps_6.2.0_ppc64.replies | 741 ++-------------
.../caps_6.2.0_x86_64.replies | 807 ++--------------
.../caps_7.0.0_aarch64+hvf.replies | 770 ++--------------
.../caps_7.0.0_aarch64.replies | 770 ++--------------
.../caps_7.0.0_ppc64.replies | 745 ++-------------
.../caps_7.0.0_x86_64.replies | 807 ++--------------
.../caps_7.1.0_ppc64.replies | 763 ++--------------
.../caps_7.1.0_x86_64.replies | 825 ++---------------
.../caps_7.2.0_ppc.replies | 772 ++--------------
.../caps_7.2.0_x86_64+hvf.replies | 843 ++---------------
.../caps_7.2.0_x86_64.replies | 843 ++---------------
.../caps_8.0.0_riscv64.replies | 761 ++-------------
.../caps_8.0.0_x86_64.replies | 864 ++----------------
.../caps_8.1.0_s390x.replies | 788 ++--------------
.../caps_8.1.0_x86_64.replies | 864 ++----------------
tests/qemumonitorjsontest.c | 59 --
41 files changed, 2778 insertions(+), 23684 deletions(-)
--
2.41.0
1 year, 3 months
[libvirt PATCH 00/10] A set of minor doc updates for new contributors
by Tim Small
As a prospective contributor, whilst the documentation is generally very
helpful, I found a few minor gaps and inconsistencies. I thought I would strike
while the iron was hot, and attempt to make some improvements. The changes are
mostly minor clarifications, and additional internal references between
articles.
The only new material is a guide to using clangd with the libvirt code base
(since clangd has become a common programming tool, and is particularly useful
for navigating unfamiliar code bases).
On build hosts where gcc is the default compiler, some manual steps are
necessary before clangd will work with the libvirt code, and I thought these
were worth documenting.
Tim Small (10):
docs: Link to main docs directory from Quick Links
docs: Missing "full-stop"/"period" on some bullet items
docs: Link main "contributing" from programming-specific guide
docs: Point to compiling guide from code contribution guide
docs: Add config instructions for clangd with libvirt
docs: Reword "Preparing Patches" to clarify
docs: Advise running CI tests prior to submission
docs: Point to mailing list archives from submitting-patches
docs: Fix deprecated use of implicit meson "setup" command
docs: Reword ninja invocation note to clarify build directory
docs/clangd.rst | 51 +++++++++++++++++++++++++++++++++++++
docs/compiling.rst | 14 +++++-----
docs/contribute.rst | 6 ++---
docs/hacking.rst | 29 ++++++++++++++++++---
docs/index.rst | 2 ++
docs/meson.build | 1 +
docs/submitting-patches.rst | 5 ++++
7 files changed, 96 insertions(+), 12 deletions(-)
create mode 100644 docs/clangd.rst
--
2.39.2
1 year, 3 months
[PATCH] qemu_domain: Deduplicate targetNode check in qemuDomainDefValidateMemoryHotplugDevice()
by Michal Privoznik
If a domain has NUMA configured, then all <memory/> devices
(except for 'virtio-pmem') need to have targetNode set. There are
two checks inside of qemuDomainDefValidateMemoryHotplugDevice()
for this: one inside of big switch() statement, which only checks
'dimm' and 'nvdimm' cases, and the other at the end of the
function that checks all models (except for 'virtio-pmem'). Let's
keep the latter and remove the former as the latter covers the
former too.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 94587638c3..3700b3e711 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -9189,15 +9189,6 @@ qemuDomainDefValidateMemoryHotplugDevice(const virDomainMemoryDef *mem,
return -1;
}
- if (virDomainNumaGetNodeCount(def->numa) != 0) {
- if (mem->targetNode == -1) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("target NUMA node needs to be specified for "
- "memory device"));
- return -1;
- }
- }
-
if (mem->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM) {
if (mem->info.addr.dimm.slot >= def->mem.memory_slots) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
--
2.41.0
1 year, 3 months
[PATCH 0/2] libxl: migration fixes
by Jim Fehlig
A different (and more correct IMO) approach to fixing issues in the migration
error handling logic. Initial attempt here
https://listman.redhat.com/archives/libvir-list/2023-July/240652.html
Jim Fehlig (2):
libxl: Don't attempt to resume domain on canceled migration
libxl: Advertise support for VIR_MIGRATE_CHANGE_PROTECTION
src/libxl/libxl_driver.c | 2 +-
src/libxl/libxl_migration.c | 16 +---------------
src/libxl/libxl_migration.h | 3 ++-
3 files changed, 4 insertions(+), 17 deletions(-)
--
2.41.0
1 year, 3 months
[libvirt PATCH] docs: index: Add a quick link to Submitting patches
by Erik Skultety
We still get MRs in Gitlab from individual contributors on a regular
basis which in some ways just makes maintainer's or reviewer's life
just a bit more complicated. This ultimately means our guidelines are
probably not visible enough on the main page
(or some people wouldn't read them anyway). While this patch can't make
the problem go away, it can at least attempt to mitigate it by creating
a quick link to the 'hacking' page, skipping a lot of TL;DR contents
in contributing.rst which we link from the main page.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Feel free to reject this patch if you think it provides absolutely no value
towards mitigating the issue at hand.
docs/index.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/index.rst b/docs/index.rst
index d55c4bb94d..eaadffaa9b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -30,6 +30,9 @@ Quick Links
`New contributors <contribute.html>`__
Get involved in the libvirt community & student outreach programs
+`Submitting patches <hacking.html>`__
+ Already a regular open source contributor and have git set up? Have a quick
+ look at how to propose your changes to libvirt correctly
`Security vulnerabilities <securityprocess.html>`__
View security notices and report vulnerabilities to the libvirt security
response team
--
2.41.0
1 year, 3 months