mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
9363c1cb69
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> |
||
---|---|---|
.. | ||
basic-hvm.json | ||
basic-hvm.xml | ||
basic-pv.json | ||
basic-pv.xml | ||
basic-pvh.json | ||
basic-pvh.xml | ||
cpu-shares-hvm.json | ||
cpu-shares-hvm.xml | ||
efi-hvm.json | ||
efi-hvm.xml | ||
fullvirt-acpi-slic.json | ||
fullvirt-acpi-slic.xml | ||
fullvirt-cpuid-legacy-nest.json | ||
fullvirt-cpuid-legacy-nest.xml | ||
fullvirt-cpuid.json | ||
fullvirt-cpuid.xml | ||
max-eventchannels-hvm.json | ||
max-eventchannels-hvm.xml | ||
max-gntframes-hvm.json | ||
max-gntframes-hvm.xml | ||
moredevs-hvm.json | ||
moredevs-hvm.xml | ||
multiple-ip.json | ||
multiple-ip.xml | ||
variable-clock-hvm.json | ||
variable-clock-hvm.xml | ||
vnuma-hvm-legacy-nest.json | ||
vnuma-hvm-legacy-nest.xml | ||
vnuma-hvm.json | ||
vnuma-hvm.xml |