libvirt/tests/libxlxml2domconfigdata
Laine Stump 9363c1cb69 xen: explicitly set hostdev driver.name at runtime, not in postparse
Xen only supports a single type of PCI hostdev assignment, so it is
superfluous to have <driver name='xen'/> peppered throughout the
config. It *is* necessary to have the driver type explicitly set in
the hostdev object before calling into the hypervisor-agnostic "hostdev
manager" though (otherwise the hostdev manager doesn't know whether it
should do Xen-specific setup, or VFIO-specific setup).

Historically, the Xen driver has checked for "default" driver name
(i.e. not set in the XML), and set it to "xen', during the XML
postparse, thus guaranteeing that it will be set by the time the
object is sent to the hostdev manager at runtime, but also setting it
so early that a simple round-trip of parse-format results in the XML
always containing an explicit <driver name='xen'/>, even if that
wasn't specified in the original XML.

The QEMU driver *doesn't* set driver.name during postparse though;
instead, it waits until domain startup time (or device attach time for
hotplug), and sets the driver.name then. The result is that a
parse-format round trip of the XML in the QEMU driver *doesn't* add in
the <driver name='vfio'/>.

This patch modifies the Xen driver to behave similarly to the QEMU
driver - the PostParse just checks for a driver.name that isn't
supported by the Xen driver, and any explicit setting to "xen" is
deferred until domain runtime rather than during the postparse, thus
Xen domain XML also doesn't get extraneous <driver name='xen'/>.

This delayed setting of driver.name of course results in slightly
different xml2xml parse-format results, so the unit test data is
modified accordingly.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-01-07 23:59:00 -05:00
..
basic-hvm.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
basic-hvm.xml Misc XML schema fixes for libxl 2017-11-30 10:20:06 +00:00
basic-pv.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
basic-pv.xml
basic-pvh.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
basic-pvh.xml tests: add basic Xen PVH test 2018-11-26 16:33:25 -07:00
cpu-shares-hvm.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
cpu-shares-hvm.xml libxl: don't hardcode scheduler weight 2018-03-21 15:12:24 -06:00
efi-hvm.json libxl: Support specifying a custom firmware path 2023-03-10 11:01:42 -07:00
efi-hvm.xml libxl: Support specifying a custom firmware path 2023-03-10 11:01:42 -07:00
fullvirt-acpi-slic.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
fullvirt-acpi-slic.xml tests: libxl: ACPI slic table test 2019-10-10 21:02:03 -06:00
fullvirt-cpuid-legacy-nest.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
fullvirt-cpuid-legacy-nest.xml tests: reintroduce tests for libxl's legacy nested setting 2018-10-01 10:33:19 +02:00
fullvirt-cpuid.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
fullvirt-cpuid.xml tests: check CPU features handling in libxl driver 2018-04-17 21:15:27 -06:00
max-eventchannels-hvm.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
max-eventchannels-hvm.xml libxl: Add support for max_event_channels 2020-04-09 15:45:05 -06:00
max-gntframes-hvm.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
max-gntframes-hvm.xml libxl: Add support for max_grant_frames 2019-03-13 12:06:52 -06:00
moredevs-hvm.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
moredevs-hvm.xml xen: explicitly set hostdev driver.name at runtime, not in postparse 2024-01-07 23:59:00 -05:00
multiple-ip.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
multiple-ip.xml tests: add test for multiple IPs for libxl and xenconfig driver 2017-12-08 14:04:57 -07:00
variable-clock-hvm.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
variable-clock-hvm.xml libxl: add support for specifying clock offset and adjustment 2018-02-21 12:28:49 -07:00
vnuma-hvm-legacy-nest.json tests: Fix libxlxml2domconfigtest with latest xen 2022-10-30 12:34:02 -04:00
vnuma-hvm-legacy-nest.xml tests: reintroduce tests for libxl's legacy nested setting 2018-10-01 10:33:19 +02:00
vnuma-hvm.json tests: Fix libxlxml2domconfigtest 2022-11-11 08:10:34 -07:00
vnuma-hvm.xml Misc XML schema fixes for libxl 2017-11-30 10:20:06 +00:00