libvirt/tests/xmconfigdata
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
..
sexpr2xml-pv-bootloader.cfg
sexpr2xml-pv-bootloader.xml
test-disk-drv-blktap2-raw.cfg
test-disk-drv-blktap2-raw.xml
test-disk-drv-blktap-raw.cfg
test-disk-drv-blktap-raw.xml
test-escape-paths.cfg
test-escape-paths.xml
test-fullvirt-default-feature.cfg
test-fullvirt-default-feature.xml
test-fullvirt-force-hpet.cfg
test-fullvirt-force-hpet.xml
test-fullvirt-force-nohpet.cfg
test-fullvirt-force-nohpet.xml
test-fullvirt-localtime.cfg
test-fullvirt-localtime.xml
test-fullvirt-net-netfront.cfg xen: recognize device_model_override 2020-12-07 15:38:31 -07:00
test-fullvirt-net-netfront.xml
test-fullvirt-new-cdrom.cfg
test-fullvirt-new-cdrom.xml
test-fullvirt-nohap.cfg
test-fullvirt-nohap.xml
test-fullvirt-parallel-tcp.cfg
test-fullvirt-parallel-tcp.xml
test-fullvirt-serial-file.cfg
test-fullvirt-serial-file.xml
test-fullvirt-serial-null.cfg
test-fullvirt-serial-null.xml
test-fullvirt-serial-pipe.cfg
test-fullvirt-serial-pipe.xml
test-fullvirt-serial-pty.cfg
test-fullvirt-serial-pty.xml
test-fullvirt-serial-stdio.cfg
test-fullvirt-serial-stdio.xml
test-fullvirt-serial-tcp-telnet.cfg
test-fullvirt-serial-tcp-telnet.xml
test-fullvirt-serial-tcp.cfg
test-fullvirt-serial-tcp.xml
test-fullvirt-serial-udp.cfg
test-fullvirt-serial-udp.xml
test-fullvirt-serial-unix.cfg
test-fullvirt-serial-unix.xml
test-fullvirt-sound.cfg
test-fullvirt-sound.xml
test-fullvirt-usbmouse.cfg
test-fullvirt-usbmouse.xml
test-fullvirt-usbtablet-no-bus.xml
test-fullvirt-usbtablet.cfg
test-fullvirt-usbtablet.xml
test-fullvirt-utc.cfg
test-fullvirt-utc.xml
test-no-source-cdrom.cfg
test-no-source-cdrom.xml
test-paravirt-extra-root.cfg
test-paravirt-extra-root.xml
test-paravirt-maxvcpus.cfg
test-paravirt-maxvcpus.xml
test-paravirt-net-e1000.cfg
test-paravirt-net-e1000.xml
test-paravirt-net-fakemodel.cfg
test-paravirt-net-fakemodel.xml
test-paravirt-net-modelstr.cfg
test-paravirt-net-vifname.cfg
test-paravirt-net-vifname.xml
test-paravirt-new-pvfb-vncdisplay.cfg
test-paravirt-new-pvfb-vncdisplay.xml
test-paravirt-new-pvfb.cfg
test-paravirt-new-pvfb.xml
test-paravirt-root.cfg
test-paravirt-root.xml
test-paravirt-vcpu.cfg
test-paravirt-vcpu.xml
test-pci-dev-syntax.cfg
test-pci-dev-syntax.xml xen: explicitly set hostdev driver.name at runtime, not in postparse 2024-01-07 23:59:00 -05:00
test-pci-devs.cfg
test-pci-devs.xml xen: explicitly set hostdev driver.name at runtime, not in postparse 2024-01-07 23:59:00 -05:00