On 04/25/2013 11:57 AM, Laine Stump wrote:
The device option for vfio-pci is nearly identical to that for
pci-assign - only the configfd parameter isn't supported (or needed).
Checking for presence of the bootindex parameter is done separately
from constructing the commandline, similar to how it is done for
pci-assign.
---
src/qemu/qemu_command.c | 48 ++++++++++++++++++++++++++++++++++++++----------
src/qemu/qemu_hotplug.c | 13 ++++++++++++-
2 files changed, 50 insertions(+), 11 deletions(-)
@@ -7850,12 +7855,23 @@ qemuBuildCommandLine(virConnectPtr conn,
" supported for PCI and USB devices"));
goto error;
} else {
- if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI
&&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_BOOTINDEX)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("booting from assigned PCI devices is
not"
- " supported with this version of
qemu"));
- goto error;
+ if (hostdev->source.subsys.type ==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
+ if (hostdev->source.subsys.u.pci.backend
+ == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_VFIO) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VFIO_PCI_BOOTINDEX)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("booting from PCI devices assigned
with VFIO "
+ "is not supported with this version of
qemu"));
Line break after space...
+ goto error;
+ }
+ } else {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_BOOTINDEX)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("booting from assigned PCI devices is
not"
+ " supported with this version of
qemu"));
...line break before space. Looks a bit inconsistent, but the end
result is the same.
ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org