[PATCH v2 00/13] qemu: use 'usb-bot' device to properly emulate USB cdroms
by Peter Krempa
Version 2 of this series includes changes I've requested in the review
and much more that I've learned during adaptation and testing:
- 'usb-bot' and 'usb-storage' are not ABI compatible for CDROMs
Migrating a guest from 'usb-bot'(with cdrom) to 'usb-storage' results
in I/O errors on reads with linux guest.
This required adding compatibility layer - exposing the model in -xml
and corresponding post-parse and migratable XML config
This patchset still tries as much as possible to use the 'usb-bot'
device for cdroms to fix the definition
- more tests
- keeping of 'usb-storage' support
- XML config and documentation
- cleanup of the code
The necessary logic is explained in the patches as comments.
Akihiko Odaki (2):
qemu_capabilities: Introduce QEMU_CAPS_DEVICE_USB_BOT
qemu: Replace usb-storage with usb-bot
Peter Krempa (11):
qemuhotplugtest: Use VIR_DOMAIN_DEF_PARSE_ABI_UPDATE for
virDomainDeviceDefParse
qemuxmlconftest: Test various combinations of config
qemusecuritytest: Use 'disk-usb-device' case instead of
'disk-cdrom-bus-other'
qemuxmlconftest: Drop 'disk-cdrom-bus-other'
qemuxmlconftest: Distribute testing of 'removable' disk property
qemuxmlconftest: Invoke "disk-usb-device" case also without
QEMU_CAPS_DEVICE_USB_BOT and with ABI_UPDATE
conf: introduce usb disk models 'usb-storage' and 'usb-bot'
qemu: Fill in model of 'usb' disks to preserve ABI compatibility
qemuBuildDeviceAddresDriveProps: Prepare for 'drive' address for
usb-bot disks
qemu: monitor: Introduce 'qemuMonitorSetUSBDiskAttached'
qemuxmlconftest: Prepare for proper testing in 'disk-cdrom-usb-empty'
docs/formatdomain.rst | 23 +++-
src/conf/domain_conf.c | 2 +
src/conf/domain_conf.h | 3 +
src/conf/schemas/domaincommon.rng | 2 +
src/qemu/qemu_alias.c | 20 ++-
src/qemu/qemu_capabilities.c | 7 +-
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 101 ++++++++++++--
src/qemu/qemu_command.h | 5 +
src/qemu/qemu_domain.c | 21 +++
src/qemu/qemu_domain_address.c | 2 +
src/qemu/qemu_hotplug.c | 18 +++
src/qemu/qemu_monitor.c | 12 ++
src/qemu/qemu_monitor.h | 3 +
src/qemu/qemu_monitor_json.c | 20 +++
src/qemu/qemu_monitor_json.h | 5 +
src/qemu/qemu_postparse.c | 49 ++++++-
src/qemu/qemu_postparse.h | 4 +-
src/qemu/qemu_validate.c | 37 +++++-
tests/qemublocktest.c | 13 +-
.../caps_10.0.0_aarch64.xml | 1 +
.../caps_10.0.0_ppc64.xml | 1 +
.../caps_10.0.0_s390x.xml | 1 +
.../caps_10.0.0_x86_64+amdsev.xml | 1 +
.../caps_10.0.0_x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_6.2.0_ppc64.xml | 1 +
.../caps_6.2.0_x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_7.0.0_ppc64.xml | 1 +
.../caps_7.0.0_x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_7.1.0_ppc64.xml | 1 +
.../caps_7.1.0_x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml | 1 +
.../caps_7.2.0_x86_64+hvf.xml | 1 +
.../caps_7.2.0_x86_64.xml | 1 +
.../caps_8.0.0_x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_8.1.0_s390x.xml | 1 +
.../caps_8.1.0_x86_64.xml | 1 +
.../caps_8.2.0_aarch64.xml | 1 +
.../caps_8.2.0_armv7l.xml | 1 +
.../caps_8.2.0_loongarch64.xml | 1 +
.../qemucapabilitiesdata/caps_8.2.0_s390x.xml | 1 +
.../caps_8.2.0_x86_64.xml | 1 +
.../caps_9.0.0_x86_64.xml | 1 +
.../caps_9.1.0_riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_9.1.0_s390x.xml | 1 +
.../caps_9.1.0_x86_64.xml | 1 +
.../caps_9.2.0_aarch64+hvf.xml | 1 +
.../qemucapabilitiesdata/caps_9.2.0_s390x.xml | 1 +
.../caps_9.2.0_x86_64+amdsev.xml | 1 +
.../caps_9.2.0_x86_64.xml | 1 +
tests/qemuhotplugtest.c | 8 +-
.../qemuhotplug-base-live+cdrom-usb.xml | 2 +-
.../qemuhotplug-base-live+disk-usb.xml | 2 +-
tests/qemusecuritytest.c | 2 +-
.../disk-cache.x86_64-latest.xml | 2 +-
.../qemuxmlconfdata/disk-cdrom-bus-other.xml | 30 -----
...m-usb-empty.x86_64-latest.abi-update.args} | 4 +-
...om-usb-empty.x86_64-latest.abi-update.xml} | 6 +-
.../disk-device-removable.x86_64-latest.args | 40 ------
.../qemuxmlconfdata/disk-device-removable.xml | 32 -----
.../disk-scsi.x86_64-latest.args | 2 +-
tests/qemuxmlconfdata/disk-scsi.xml | 2 +-
.../disk-usb-device-model.x86_64-latest.args | 48 +++++++
...> disk-usb-device-model.x86_64-latest.xml} | 46 ++++---
.../qemuxmlconfdata/disk-usb-device-model.xml | 46 +++++++
...est.QEMU_CAPS_DEVICE_USB_BOT-disabled.args | 59 +++++++++
...test.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml | 107 +++++++++++++++
...ate.QEMU_CAPS_DEVICE_USB_BOT-disabled.args | 59 +++++++++
...date.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml | 125 ++++++++++++++++++
...k-usb-device.x86_64-latest.abi-update.args | 63 +++++++++
...sk-usb-device.x86_64-latest.abi-update.xml | 125 ++++++++++++++++++
.../disk-usb-device.x86_64-latest.args | 30 ++++-
.../disk-usb-device.x86_64-latest.xml | 82 ++++++++++--
tests/qemuxmlconfdata/disk-usb-device.xml | 66 ++++++++-
tests/qemuxmlconftest.c | 16 ++-
75 files changed, 1197 insertions(+), 187 deletions(-)
delete mode 100644 tests/qemuxmlconfdata/disk-cdrom-bus-other.xml
rename tests/qemuxmlconfdata/{disk-cdrom-bus-other.x86_64-latest.args => disk-cdrom-usb-empty.x86_64-latest.abi-update.args} (84%)
rename tests/qemuxmlconfdata/{disk-cdrom-bus-other.x86_64-latest.xml => disk-cdrom-usb-empty.x86_64-latest.abi-update.xml} (89%)
delete mode 100644 tests/qemuxmlconfdata/disk-device-removable.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/disk-device-removable.xml
create mode 100644 tests/qemuxmlconfdata/disk-usb-device-model.x86_64-latest.args
rename tests/qemuxmlconfdata/{disk-device-removable.x86_64-latest.xml => disk-usb-device-model.x86_64-latest.xml} (56%)
create mode 100644 tests/qemuxmlconfdata/disk-usb-device-model.xml
create mode 100644 tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.QEMU_CAPS_DEVICE_USB_BOT-disabled.args
create mode 100644 tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml
create mode 100644 tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.QEMU_CAPS_DEVICE_USB_BOT-disabled.args
create mode 100644 tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml
create mode 100644 tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.args
create mode 100644 tests/qemuxmlconfdata/disk-usb-device.x86_64-latest.abi-update.xml
--
2.49.0
42 minutes
[PATCH v2] util: workaround libxml2 lack of thread safe initialization
by Daniel P. Berrangé
From: Daniel P. Berrangé <berrange(a)redhat.com>
The main XML parser code global initializer historically had a mutex
protecting it, and more recently uses a pthread_once. The RelaxNG
code, however, relies on two other global initializers that are
not thread safe, just relying on setting an integer "initialized"
flag.
Calling the relevant initializers from libvirt in a protected global
initializer will protect libvirt's own concurrent usage, however, it
cannot protect against other libraries loaded in process that might
be using libxml2's schema code. Fortunately:
* The chances of other loaded non-libvirt code using libxml is
relatively low
* The chances of other loaded non-libvirt code using the schema
validation / catalog functionality inside libxml is even
lower
* The chances of both libvirt and the non-libvirt usage having
their *1st* usage of libxml2 be concurrent is tiny
IOW, in practice, although our solution doesn't fully fix the thread
safety, it is good enough.
libxml2 should none the less still be fixed to make its global
initializers be thread safe without special actions by its API
consumers[1].
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/788
[1] https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/326
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Changed in v3:
- Drop xmlInitializeCatalog - I misread the code wrt
thread safety - it has a sufficiently protective mutex
- Cope with return type change for xmlSchemaInitTypes
in libxml >= 2.11.0
src/util/virxml.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/util/virxml.c b/src/util/virxml.c
index 9d46e5f32f..c851d6f407 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -26,6 +26,8 @@
#include <libxml/xmlsave.h>
#include <libxml/xpathInternals.h>
+#include <libxml/xmlschemastypes.h>
+#include <libxml/catalog.h>
#include "virerror.h"
#include "virxml.h"
@@ -35,6 +37,7 @@
#include "virstring.h"
#include "virutil.h"
#include "viruuid.h"
+#include "virthread.h"
#include "configmake.h"
#define VIR_FROM_THIS VIR_FROM_XML
@@ -50,6 +53,28 @@ struct virParserData {
};
+static int
+virXMLSchemaOnceInit(void)
+{
+#if LIBXML_VERSION >= 21100
+ if (xmlSchemaInitTypes() < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to initialize libxml2 schema types"));
+ return -1;
+ }
+#else
+ xmlSchemaInitTypes();
+#endif
+ if (xmlRelaxNGInitTypes() < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to initialize libxml2 RelaxNG data"));
+ return -1;
+ }
+ return 0;
+}
+
+VIR_ONCE_GLOBAL_INIT(virXMLSchema);
+
static xmlXPathContextPtr
virXMLXPathContextNew(xmlDocPtr xml)
{
@@ -1603,6 +1628,9 @@ virXMLValidatorInit(const char *schemafile)
{
g_autoptr(virXMLValidator) validator = NULL;
+ if (virXMLSchemaInitialize() < 0)
+ return NULL;
+
validator = g_new0(virXMLValidator, 1);
validator->schemafile = g_strdup(schemafile);
--
2.49.0
15 hours, 4 minutes
Re: virsh migrate fails when --copy-storage-all option is given!
by Anushree Mathur
CC: libvirt devel list
Hi Kevin/Peter,
Thank you so much for addressing this issue. I tried out few more things and
here is my analysis:
Even when I removed the readonly option from guest xml I was still seeing the
issue in migration,In the qemu-commandline I could still see auto-read-only
option being set as true by default.
Then I tried giving the auto-read-only as false in the guest xml with
qemu-commandline param, it was actually getting set to false and the migration
worked!
Steps I tried:
1) Started the guest with adding the snippet in the guest xml with parameters
as:
<qemu:commandline>
<qemu:arg value='-blockdev'/>
<qemu:arg value='driver=file,filename=/disk_nfs/nfs/migrate_root.qcow2,node-name=drivefile,auto-read-only=false'/>
<qemu:arg value='-blockdev'/>
<qemu:arg value='driver=qcow2,file=drivefile,node-name=drive0'/>
<qemu:arg value='-device'/>
<qemu:arg value='virtio-blk-pci,drive=drive0,id=virtio-disk0,bus=pci.0,addr=0x5'/>
</qemu:commandline>
2) Started the migration and it worked.
Could anyone please clarify from libvirt side what is the change required?
Thanks,
Anushree-Mathur
On 04/06/25 6:57 PM, Peter Krempa wrote:
> On Wed, Jun 04, 2025 at 14:41:54 +0200, Kevin Wolf wrote:
>> Am 28.05.2025 um 17:34 hat Peter Xu geschrieben:
>>> Copy Kevin.
>>>
>>> On Wed, May 28, 2025 at 07:21:12PM +0530, Anushree Mathur wrote:
>>>> Hi all,
>>>>
>>>>
>>>> When I am trying to migrate the guest from host1 to host2 with the command
>>>> line as follows:
>>>>
>>>> date;virsh migrate --live --domain guest1 qemu+ssh://dest/system --verbose
>>>> --undefinesource --persistent --auto-converge --postcopy
>>>> --copy-storage-all;date
>>>>
>>>> and it fails with the following error message-
>>>>
>>>> error: internal error: unable to execute QEMU command 'block-export-add':
>>>> Block node is read-only
>>>>
>>>> HOST ENV:
>>>>
>>>> qemu : QEMU emulator version 9.2.2
>>>> libvirt : libvirtd (libvirt) 11.1.0
>>>> Seen with upstream qemu also
>>>>
>>>> Steps to reproduce:
>>>> 1) Start the guest1
>>>> 2) Migrate it with the command as
>>>>
>>>> date;virsh migrate --live --domain guest1 qemu+ssh://dest/system --verbose
>>>> --undefinesource --persistent --auto-converge --postcopy
>>>> --copy-storage-all;date
>>>>
>>>> 3) It fails as follows:
>>>> error: internal error: unable to execute QEMU command 'block-export-add':
>>>> Block node is read-only
>> I assume this is about an inactive block node. Probably on the
>> destination, but that's not clear to me from the error message.
> Yes this would be on the destination. Libvirt exports the nodes on
> destination, source connects and does the blockjob.
>
> The destination side is configured the same way as the source side so
> if the source disk is configured as read-write the destination should be
> as well
>
>>>> Things I analyzed-
>>>> 1) This issue is not happening if I give --unsafe option in the virsh
>>>> migrate command
> This is weird; this shouldn't have any impact.
>
>> What does this translate to on the QEMU command line?
>>
>>>> 2) O/P of qemu-monitor command also shows ro as false
>>>>
>>>> virsh qemu-monitor-command guest1 --pretty --cmd '{ "execute": "query-block"
> it'd be impossible to execute this on the guest due to timing; you'll
> need to collect libvirt debug logs to do that:
>
> https://www.libvirt.org/kbase/debuglogs.html#tl-dr-enable-debug-logs-for-...
>
> I also thing this should be eventually filed in a
>
>>>> }'
>>>> {
>>>> "return": [
>>>> {
>>>> "io-status": "ok",
>>>> "device": "",
>>>> "locked": false,
>>>> "removable": false,
>>>> "inserted": {
>>>> "iops_rd": 0,
>>>> "detect_zeroes": "off",
>>>> "image": {
>>>> "virtual-size": 21474836480,
>>>> "filename": "/home/Anu/guest_anu.qcow2",
>>>> "cluster-size": 65536,
>>>> "format": "qcow2",
>>>> "actual-size": 5226561536,
>>>> "format-specific": {
>>>> "type": "qcow2",
>>>> "data": {
>>>> "compat": "1.1",
>>>> "compression-type": "zlib",
>>>> "lazy-refcounts": false,
>>>> "refcount-bits": 16,
>>>> "corrupt": false,
>>>> "extended-l2": false
>>>> }
>>>> },
>>>> "dirty-flag": false
>>>> },
>>>> "iops_wr": 0,
>>>> "ro": false,
>>>> "node-name": "libvirt-1-format",
>>>> "backing_file_depth": 0,
>>>> "drv": "qcow2",
>>>> "iops": 0,
>>>> "bps_wr": 0,
>>>> "write_threshold": 0,
>>>> "encrypted": false,
>>>> "bps": 0,
>>>> "bps_rd": 0,
>>>> "cache": {
>>>> "no-flush": false,
>>>> "direct": false,
>>>> "writeback": true
>>>> },
>>>> "file": "/home/Anu/guest_anu.qcow2"
>>>> },
>>>> "qdev": "/machine/peripheral/virtio-disk0/virtio-backend",
>>>> "type": "unknown"
>>>> }
>>>> ],
>>>> "id": "libvirt-26"
>>>> }
>> I assume this is still from the source where the image is still active.
> Yes; on the destination the process wouldn't be around long enough to
> call 'virsh qemu-monitor-command'
>
>> Also it doesn't contain the "active" field yet that was recently
>> introduced, which could show something about this. I believe you would
>> still get "read-only": false for an inactive image if it's supposed to
>> be read-write after the migration completes.
>>
>>>> 3) Guest doesn't have any readonly
>>>>
>>>> virsh dumpxml guest1 | grep readonly
>>>>
>>>> 4) Tried giving the proper permissions also
>>>>
>>>> -rwxrwxrwx. 1 qemu qemu 4.9G Apr 28 15:06 guest_anu.qcow
> Is this on the destination? did you pre-create it yourself? otherwise
> libvirt is pre-creating that image for-non-shared-storage migration
> (--copy-storage-all) which should have proper permissions when it's
> created
>
>>>> 5) Checked for the permission of the pool also that is also proper!
>>>>
>>>> 6) Found 1 older bug similar to this, pasting the link for reference:
>>>>
>>>>
>>>> https://patchwork.kernel.org/project/qemu-devel/patch/20170811164854.GG41...
>> What's happening in detail is more of a virsh/libvirt question. CCing
>> Peter Krempa, he might have an idea.
> Please collect the debug log; at least from the destination side of
> migration. That should show how the VM is prepared and qemu invoked.
>
15 hours, 5 minutes
[libvirt PATCH v2 REBASED 0/7] qemu: introduce amd-iommu support
by Ján Tomko
Ján Tomko (7):
qemu: introduce QEMU_CAPS_AMD_IOMMU
qemu: introduce QEMU_CAPS_PCI_ID
qemu: add IOMMU model amd
docs: formatdomain: document intel-only IOMMU attributes
conf: add passthrough and xtsup attributes for IOMMU
conf: reject some attributes not applicable to intel IOMMU
qemu: format pt and xstup on the command line
docs/formatdomain.rst | 22 +++-
src/conf/domain_conf.c | 31 +++++
src/conf/domain_conf.h | 3 +
src/conf/domain_validate.c | 22 ++++
src/conf/schemas/domaincommon.rng | 11 ++
src/qemu/qemu_capabilities.c | 12 ++
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_command.c | 30 +++++
src/qemu/qemu_domain_address.c | 4 +
src/qemu/qemu_validate.c | 22 ++++
.../caps_10.0.0_x86_64+amdsev.replies | 102 +++++++++++------
.../caps_10.0.0_x86_64+amdsev.xml | 1 +
.../caps_10.0.0_x86_64.replies | 106 ++++++++++++------
.../caps_10.0.0_x86_64.xml | 2 +
.../caps_6.2.0_x86_64.replies | 102 +++++++++++------
.../caps_6.2.0_x86_64.xml | 1 +
.../caps_7.0.0_x86_64.replies | 80 +++++++------
.../caps_7.0.0_x86_64.xml | 1 +
.../caps_7.1.0_x86_64.replies | 102 +++++++++++------
.../caps_7.1.0_x86_64.xml | 1 +
.../caps_7.2.0_x86_64+hvf.replies | 102 +++++++++++------
.../caps_7.2.0_x86_64+hvf.xml | 1 +
.../caps_7.2.0_x86_64.replies | 102 +++++++++++------
.../caps_7.2.0_x86_64.xml | 1 +
.../caps_8.0.0_x86_64.replies | 80 +++++++------
.../caps_8.0.0_x86_64.xml | 1 +
.../caps_8.1.0_x86_64.replies | 102 +++++++++++------
.../caps_8.1.0_x86_64.xml | 1 +
.../caps_8.2.0_x86_64.replies | 102 +++++++++++------
.../caps_8.2.0_x86_64.xml | 1 +
.../caps_9.0.0_x86_64.replies | 80 +++++++------
.../caps_9.0.0_x86_64.xml | 1 +
.../caps_9.1.0_x86_64.replies | 102 +++++++++++------
.../caps_9.1.0_x86_64.xml | 1 +
.../caps_9.2.0_x86_64+amdsev.replies | 102 +++++++++++------
.../caps_9.2.0_x86_64+amdsev.xml | 1 +
.../caps_9.2.0_x86_64.replies | 102 +++++++++++------
.../caps_9.2.0_x86_64.xml | 1 +
.../amd-iommu.x86_64-latest.args | 35 ++++++
.../amd-iommu.x86_64-latest.xml | 1 +
tests/qemuxmlconfdata/amd-iommu.xml | 39 +++++++
tests/qemuxmlconftest.c | 2 +
42 files changed, 1165 insertions(+), 454 deletions(-)
create mode 100644 tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args
create mode 120000 tests/qemuxmlconfdata/amd-iommu.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/amd-iommu.xml
--
2.49.0
20 hours, 25 minutes
[PATCH 0/4] USB hostdev: allow addressing by port
by Maximilian Martin
This resubmission splits up the previous patch into multiple patches and
incorporates review comments from Michal Prívozník.
Currently, only vendor/product and bus/device matching are supported for USB host
devices. Neither of these provide a stable and persistent way of assigning a guest
a specific host device. Vendor/product can be ambiguous. Device numbers change on
every enumeration.
This patch adds a bus/port matching, which allows a specific port on the host to be
specified using the dotted notation found in Linux's "devpath" sysfs attribute.
This patch is based on the previous work of Thomas Hebb: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/7...
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/513
Signed-off-by: Maximilian Martin <maximilian_martin(a)gmx.de>
Maximilian Martin (4):
virusb test data: add devpath files for port addressing
domain_conf, virhostdev, virusb, virusb test: add bus/port matching
schema: add USB port attribute
docs: add description for USB port matching
docs/formatdomain.rst | 29 ++--
src/conf/domain_conf.c | 69 +++++++-
src/conf/domain_conf.h | 1 +
src/conf/schemas/domaincommon.rng | 11 +-
src/hypervisor/virhostdev.c | 131 +++++++++------
src/libvirt_private.syms | 2 -
src/util/virusb.c | 156 ++++++------------
src/util/virusb.h | 32 ++--
tests/virusbtest.c | 149 ++++++++++++-----
.../sys_bus_usb/devices/1-1.5.3.1/devpath | 1 +
.../sys_bus_usb/devices/1-1.5.3.3/devpath | 1 +
.../sys_bus_usb/devices/1-1.5.3/devpath | 1 +
.../sys_bus_usb/devices/1-1.5.4/devpath | 1 +
.../sys_bus_usb/devices/1-1.5.5/devpath | 1 +
.../sys_bus_usb/devices/1-1.5.6/devpath | 1 +
.../sys_bus_usb/devices/1-1.5/devpath | 1 +
.../sys_bus_usb/devices/1-1.6/devpath | 1 +
.../sys_bus_usb/devices/1-1/devpath | 1 +
.../sys_bus_usb/devices/2-1.2/devpath | 1 +
.../sys_bus_usb/devices/2-1/devpath | 1 +
.../sys_bus_usb/devices/usb1/devpath | 1 +
.../sys_bus_usb/devices/usb2/devpath | 1 +
.../sys_bus_usb/devices/usb3/devpath | 1 +
.../sys_bus_usb/devices/usb4/devpath | 1 +
24 files changed, 351 insertions(+), 244 deletions(-)
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.5.3.1/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.5.3.3/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.5.3/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.5.4/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.5.5/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.5.6/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.5/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1.6/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/1-1/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/2-1.2/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/2-1/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/usb1/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/usb2/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/usb3/devpath
create mode 100644 tests/virusbtestdata/sys_bus_usb/devices/usb4/devpath
--
2.39.5
20 hours, 43 minutes
[PATCH] util: workaround libxml2 lack of thread safe initialization
by Daniel P. Berrangé
From: Daniel P. Berrangé <berrange(a)redhat.com>
The main XML parser code global initializer historically had a mutex
protecting it, and more recently uses a pthread_once. The RelaxNG
code, however, relies on three other global initializers that are
not thread safe, just relying on setting an integer "initialized"
flag.
Calling the relevant initializers from libvirt in a protected global
initializer will protect libvirt's own concurrent usage, however, it
cannot protect against other libraries loaded in process that might
be using libxml2's schema code. Fortunately:
* The chances of other loaded non-libvirt code using libxml is
relatively low
* The chances of other loaded non-libvirt code using the schema
validation / catalog functionality inside libxml is even
lower
* The chances of both libvirt and the non-libvirt usage having
their *1st* usage of libxml2 be concurrent is tiny
IOW, in practice, although our solution doesn't fully fix the thread
safety, it is good enough.
libxml2 should none the less still be fixed to make its global
initializers be thread safe without special actions by its API
consumers.
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/788
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/util/virxml.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/util/virxml.c b/src/util/virxml.c
index 9d46e5f32f..c2d5a109dc 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -26,6 +26,8 @@
#include <libxml/xmlsave.h>
#include <libxml/xpathInternals.h>
+#include <libxml/xmlschemastypes.h>
+#include <libxml/catalog.h>
#include "virerror.h"
#include "virxml.h"
@@ -35,6 +37,7 @@
#include "virstring.h"
#include "virutil.h"
#include "viruuid.h"
+#include "virthread.h"
#include "configmake.h"
#define VIR_FROM_THIS VIR_FROM_XML
@@ -50,6 +53,25 @@ struct virParserData {
};
+static int virXMLSchemaOnceInit(void)
+{
+ if (xmlSchemaInitTypes() < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to initialize libxml2 schema types"));
+ return -1;
+ }
+ if (xmlRelaxNGInitTypes() < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to initialize libxml2 RelaxNG data"));
+ return -1;
+ }
+ /* No return value, it just ignores errors :-( */
+ xmlInitializeCatalog();
+ return 0;
+}
+
+VIR_ONCE_GLOBAL_INIT(virXMLSchema);
+
static xmlXPathContextPtr
virXMLXPathContextNew(xmlDocPtr xml)
{
@@ -1603,6 +1625,9 @@ virXMLValidatorInit(const char *schemafile)
{
g_autoptr(virXMLValidator) validator = NULL;
+ if (virXMLSchemaInitialize() < 0)
+ return NULL;
+
validator = g_new0(virXMLValidator, 1);
validator->schemafile = g_strdup(schemafile);
--
2.49.0
21 hours, 50 minutes
[PATCHv2] passt: Define backend hostname and fqdn
by Enrique Llorente
This commit introduces a feature enhancement for configuring hostnames in
virtual machines (VMs) using DHCP. It adds new options to the "passt" tool
to set the hostname and fully qualified domain name (FQDN) for VMs. These
map to DHCP option 12 for the hostname and options 81 (IPv4) and 39 (IPv6)
for the FQDN.
The update enables passt to dynamically assign hostnames to DHCP-aware
VMs. To achieve this, the commit adds two fields to the passt domain XML
backend. These fields allow passt to configure the hostname and FQDN for
the virtual machine, ensuring smooth integration with the DHCP protocol.
This improvement is particularly valuable in environments where VMs need
dynamic hostname configuration, enhancing flexibility and automation in
virtualized network setups.
libvirt: Integrate passt --hostname --fqdn options
Resolves: https://issues.redhat.com/browse/RHEL-79806
Signed-off-by: Enrique Llorente <ellorent(a)redhat.com>
---
Compared to v1 this fix the mapping between backend fqdn and hostname
docs/formatdomain.rst | 8 +++++---
src/conf/domain_conf.c | 10 +++++++++-
src/conf/domain_conf.h | 2 ++
src/conf/schemas/domaincommon.rng | 6 ++++++
src/qemu/qemu_passt.c | 6 ++++++
tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml | 2 +-
tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml | 2 +-
tests/qemuxmlconfdata/net-user-passt.xml | 2 +-
.../net-vhostuser-passt.x86_64-latest.xml | 2 +-
tests/qemuxmlconfdata/net-vhostuser-passt.xml | 2 +-
10 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 8753ee9c23..9c80aa9270 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -5372,10 +5372,12 @@ came from the host's IP.
There are a few other options that are configurable only for the passt
backend. For example, the ``<backend>`` attribute ``logFile`` can be
used to tell the passt process for this interface where to write its
-message log, and the ``<source>`` attribute ``dev`` can tell it a
+message log, the ``<source>`` attribute ``dev`` can tell it a
particular host interface to use when deriving the routes given to the
-guest for forwarding traffic upstream. Due to the design decisions of
-passt, when using SELinux on the host, it is recommended that the log
+guest for forwarding traffic upstream and the ``hostname`` and ``fqdn``
+will conigure the DHCP option 12 hostname and DHCP option 81 and DHCPv6
+option 39 fqdn attribute. Due to the design decisions of passt, when using
+SELinux on the host, it is recommended that the log
file reside in the runtime directory of the user under which the passt
process will run, most probably ``/run/user/$UID`` (where ``$UID`` is
the UID of that user), e.g. ``/run/user/1000``. Be aware that libvirt
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b3b0bd7329..15143f8fa2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2909,6 +2909,8 @@ virDomainNetDefFree(virDomainNetDef *def)
g_free(def->backend.tap);
g_free(def->backend.vhost);
g_free(def->backend.logFile);
+ g_free(def->backend.hostname);
+ g_free(def->backend.fqdn);
virDomainNetTeamingInfoFree(def->teaming);
g_free(def->virtPortProfile);
g_free(def->script);
@@ -9757,6 +9759,8 @@ virDomainNetBackendParseXML(xmlNodePtr node,
}
def->backend.logFile = virXMLPropString(node, "logFile");
+ def->backend.hostname = virXMLPropString(node, "hostname");
+ def->backend.fqdn = virXMLPropString(node, "fqdn");
if (tap)
def->backend.tap = virFileSanitizePath(tap);
@@ -20757,7 +20761,9 @@ virDomainNetBackendIsEqual(virDomainNetBackend *src,
if (src->type != dst->type ||
STRNEQ_NULLABLE(src->tap, dst->tap) ||
STRNEQ_NULLABLE(src->vhost, dst->vhost) ||
- STRNEQ_NULLABLE(src->logFile, dst->logFile)) {
+ STRNEQ_NULLABLE(src->logFile, dst->logFile) ||
+ STRNEQ_NULLABLE(src->hostname, dst->hostname) ||
+ STRNEQ_NULLABLE(src->fqdn, dst->fqdn)) {
return false;
}
return true;
@@ -24838,6 +24844,8 @@ virDomainNetBackendFormat(virBuffer *buf,
virBufferEscapeString(&attrBuf, " tap='%s'", backend->tap);
virBufferEscapeString(&attrBuf, " vhost='%s'", backend->vhost);
virBufferEscapeString(&attrBuf, " logFile='%s'", backend->logFile);
+ virBufferEscapeString(&attrBuf, " hostname='%s'", backend->hostname);
+ virBufferEscapeString(&attrBuf, " fqdn='%s'", backend->fqdn);
virXMLFormatElement(buf, "backend", &attrBuf, NULL);
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 58b97a2b54..79fd2f1f63 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1067,6 +1067,8 @@ struct _virDomainNetBackend {
char *vhost;
/* The following are currently only valid/used when backend type='passt' */
char *logFile; /* path to logfile used by passt process */
+ char *hostname; /* hostname of the passt process */
+ char *fqdn; /* fully qualified domain name of the passt process */
};
struct _virDomainNetPortForwardRange {
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index 5597d5a66b..f64199ca18 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -3913,6 +3913,12 @@
<ref name="absFilePath"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="hostname"/>
+ </optional>
+ <optional>
+ <attribute name="fqdn"/>
+ </optional>
</element>
</optional>
<optional>
diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c
index fcc34de384..81e5c51f6c 100644
--- a/src/qemu/qemu_passt.c
+++ b/src/qemu/qemu_passt.c
@@ -229,6 +229,12 @@ qemuPasstStart(virDomainObj *vm,
if (net->backend.logFile)
virCommandAddArgList(cmd, "--log-file", net->backend.logFile, NULL);
+ if (net->backend.hostname)
+ virCommandAddArgList(cmd, "--hostname", net->backend.hostname, NULL);
+
+ if (net->backend.fqdn)
+ virCommandAddArgList(cmd, "--fqdn", net->backend.fqdn, NULL);
+
/* Add IP address info */
for (i = 0; i < net->guestIP.nips; i++) {
const virNetDevIPAddr *ip = net->guestIP.ips[i];
diff --git a/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml b/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml
index cfe07cc627..77da297936 100644
--- a/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml
+++ b/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml
@@ -50,7 +50,7 @@
<range start='443' to='344'/>
</portForward>
<model type='rtl8139'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
diff --git a/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml b/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml
index d7e0ef5f90..917a9edaa0 100644
--- a/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml
@@ -50,7 +50,7 @@
<range start='443' to='344'/>
</portForward>
<model type='rtl8139'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
diff --git a/tests/qemuxmlconfdata/net-user-passt.xml b/tests/qemuxmlconfdata/net-user-passt.xml
index 20c9f50542..80d15de2ed 100644
--- a/tests/qemuxmlconfdata/net-user-passt.xml
+++ b/tests/qemuxmlconfdata/net-user-passt.xml
@@ -47,7 +47,7 @@
<range start='443' to='344'/>
</portForward>
<model type='rtl8139'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
diff --git a/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml b/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
index 529aff11f8..5802754c4b 100644
--- a/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
@@ -53,7 +53,7 @@
<range start='443' to='344'/>
</portForward>
<model type='virtio'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<interface type='vhostuser'>
diff --git a/tests/qemuxmlconfdata/net-vhostuser-passt.xml b/tests/qemuxmlconfdata/net-vhostuser-passt.xml
index 71b845329b..0a37511a0f 100644
--- a/tests/qemuxmlconfdata/net-vhostuser-passt.xml
+++ b/tests/qemuxmlconfdata/net-vhostuser-passt.xml
@@ -50,7 +50,7 @@
<range start='443' to='344'/>
</portForward>
<model type='virtio'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<interface type='vhostuser'>
--
2.49.0
1 day, 1 hour
[PATCH v4 0/8] qemu: acpi-generic-initiator support
by Andrea Righi
= Overview =
This patch set introduces support for acpi-generic-initiator devices,
supported by QEMU [1].
The acpi-generic-initiator object is required to support Multi-Instance GPU
(MIG) configurations on NVIDIA GPUs [2]. MIG enables partitioning of GPU
resources into multiple isolated instances, each requiring a dedicated NUMA
node definition.
= Implementation =
This patch set implements the libvirt counterpart to the QEMU feature,
enabling users to configure acpi-generic-initiator objects within libvirt
domain XML.
This includes:
- adding XML syntax to define acpi-generic-initiator objects,
- resolving the acpi-generic-initiator definitions into the proper QEMU
command-line arguments,
- ensuring compatibility with existing NUMA configuration.
= Example =
- Domain XML:
```
...
<cpu mode='host-passthrough' check='none'>
<numa>
<cell id='0' cpus='0-15' memory='8388608' unit='KiB'/>
<cell id='1' memory='0' unit='KiB'/>
<cell id='2' memory='0' unit='KiB'/>
<cell id='3' memory='0' unit='KiB'/>
<cell id='4' memory='0' unit='KiB'/>
<cell id='5' memory='0' unit='KiB'/>
<cell id='6' memory='0' unit='KiB'/>
<cell id='7' memory='0' unit='KiB'/>
<cell id='8' memory='0' unit='KiB'/>
</numa>
</cpu>
...
<devices>
...
<hostdev mode='subsystem' type='pci' managed='no'>
<source>
<address domain='0x0009' bus='0x01' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</hostdev>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>1</numa-node>
</acpi-generic-initiator>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>2</numa-node>
</acpi-generic-initiator>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>3</numa-node>
</acpi-generic-initiator>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>4</numa-node>
</acpi-generic-initiator>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>5</numa-node>
</acpi-generic-initiator>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>6</numa-node>
</acpi-generic-initiator>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>7</numa-node>
</acpi-generic-initiator>
<acpi-generic-initiator>
<pci-dev>hostdev0</pci-dev>
<numa-node>8</numa-node>
</acpi-generic-initiator>
</devices>
```
- Generated QEMU command line options:
```
... /usr/bin/qemu-system-aarch64 \
...
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":8589934592}' \
-numa node,nodeid=0,cpus=0-15,memdev=ram-node0 \
-numa node,nodeid=1 \
-numa node,nodeid=2 \
-numa node,nodeid=3 \
-numa node,nodeid=4 \
-numa node,nodeid=5 \
-numa node,nodeid=6 \
-numa node,nodeid=7 \
-numa node,nodeid=8 \
...
-device '{"driver":"vfio-pci","host":"0009:01:00.0","id":"hostdev0","bus":"pci.3","addr":"0x0"}'
...
-object acpi-generic-initiator,id=gi0,pci-dev=hostdev0,node=1 \
-object acpi-generic-initiator,id=gi1,pci-dev=hostdev0,node=2 \
-object acpi-generic-initiator,id=gi2,pci-dev=hostdev0,node=3 \
-object acpi-generic-initiator,id=gi3,pci-dev=hostdev0,node=4 \
-object acpi-generic-initiator,id=gi4,pci-dev=hostdev0,node=5 \
-object acpi-generic-initiator,id=gi5,pci-dev=hostdev0,node=6 \
-object acpi-generic-initiator,id=gi6,pci-dev=hostdev0,node=7 \
-object acpi-generic-initiator,id=gi7,pci-dev=hostdev0,node=8
```
= References =
[1] https://lore.kernel.org/all/20231225045603.7654-2-ankita@nvidia.com/
[2] https://www.nvidia.com/en-in/technologies/multi-instance-gpu/
This patchset is also available in the following git branch:
https://github.com/arighi/libvirt.git acpi-generic-initiator-v4
ChangeLog v3 -> v4:
- add acpi-generic-initiator documentation
- refactor virDomainAcpiInitiatorDef to use info->alias and drop the name
attribute
- auto-generate alias for the acpi-generic-initiator devices via
qemuAssignDeviceAliases()
- use g_autoptr() when possible
- add a new entry to NEWS.rst
ChangeLog v2 -> v3:
- replaced <text/> with proper types in the XML schema
- avoid mixing g_free() and VIR_FREE()
- use virXMLPropString() instead of looping all XML nodes
- report proper errors with virReportError()
- use virBufferEscapeString() to process strings passed by the user
- fix broken formatting of function headers
- misc coding style fixes
ChangeLog v1 -> v2:
- split parser and driver changes in separate patches
- introduce a new qemu capability flag
- introduce test in qemuxmlconftest
Andrea Righi (8):
schema: Introduce acpi-generic-initiator definition
conf: Introduce acpi-generic-initiator device
qemu: Allow to define NUMA nodes without memory or CPUs assigned
qemu: capabilies: Introduce QEMU_CAPS_ACPI_GENERIC_INITIATOR
qemu: Support acpi-generic-initiator
qemu: Add test case for acpi-generic-initiator
docs: Document acpi-generic-initiator device
NEWS: Mention new acpi-generic-initiator device
NEWS.rst | 8 ++
docs/formatdomain.rst | 36 ++++++
src/ch/ch_domain.c | 1 +
src/conf/domain_conf.c | 138 +++++++++++++++++++++
src/conf/domain_conf.h | 14 +++
src/conf/domain_postparse.c | 1 +
src/conf/domain_validate.c | 37 ++++++
src/conf/numa_conf.c | 3 +
src/conf/schemas/domaincommon.rng | 14 +++
src/conf/virconftypes.h | 2 +
src/hyperv/hyperv_driver.c | 1 +
src/libxl/libxl_driver.c | 6 +
src/lxc/lxc_driver.c | 6 +
src/qemu/qemu_alias.c | 11 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 49 ++++++--
src/qemu/qemu_domain.c | 2 +
src/qemu/qemu_domain_address.c | 4 +
src/qemu/qemu_driver.c | 3 +
src/qemu/qemu_hotplug.c | 5 +
src/qemu/qemu_postparse.c | 1 +
src/qemu/qemu_validate.c | 1 +
src/test/test_driver.c | 4 +
tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml | 1 +
.../caps_10.0.0_x86_64+amdsev.xml | 1 +
tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml | 1 +
.../caps_9.2.0_aarch64+hvf.xml | 1 +
.../caps_9.2.0_x86_64+amdsev.xml | 1 +
tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml | 1 +
.../acpi-generic-initiator.x86_64-latest.args | 55 ++++++++
.../acpi-generic-initiator.x86_64-latest.xml | 94 ++++++++++++++
tests/qemuxmlconfdata/acpi-generic-initiator.xml | 94 ++++++++++++++
tests/qemuxmlconftest.c | 1 +
37 files changed, 596 insertions(+), 7 deletions(-)
create mode 100644 tests/qemuxmlconfdata/acpi-generic-initiator.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/acpi-generic-initiator.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/acpi-generic-initiator.xml
1 day, 3 hours
[PATCH] NEWS: mention console type in domain capabilities
by Roman Bogorodskiy
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
NEWS.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 7d7df72a50..184df16547 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -47,6 +47,17 @@ v11.5.0 (unreleased)
* **Improvements**
+ * Include supported console types in domain capabilities
+
+ Domain capabilities now include information about supported console types, such as::
+
+ <console supported='yes'>
+ <enum name='type'>
+ <value>pty</value>
+ <value>tcp</value>
+ </enum>
+ </console>
+
* **Bug fixes**
--
2.49.0
3 days, 23 hours
[PATCH] qemu: Remove redundant kvm group config in sysusers.d
by fossdd
It's already defined by default in systemd:
https://github.com/systemd/systemd/blob/v257.6/sysusers.d/basic.conf.in#L32
Adding it again here in libvirt-qemu.sysusers.conf causes the following
warning by validating it with sd-sysuers:
/usr/lib/sysusers.d/libvirt-qemu.conf:1: Conflict with earlier configuration for group 'kvm' in /usr/lib/sysusers.d/basic.conf:32, ignoring line.
I don't know if the GID is important, but from simple grepping around it
doesn't seem that way.
Signed-off-by: fossdd <fossdd(a)pwned.life>
---
src/qemu/libvirt-qemu.sysusers.conf | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/qemu/libvirt-qemu.sysusers.conf b/src/qemu/libvirt-qemu.sysusers.conf
index 3189191e73..05c35f94d8 100644
--- a/src/qemu/libvirt-qemu.sysusers.conf
+++ b/src/qemu/libvirt-qemu.sysusers.conf
@@ -1,4 +1,3 @@
-g kvm 36
g qemu 107
u qemu 107:qemu "qemu user" - -
m qemu kvm
--
2.50.0
4 days, 17 hours