[libvirt] [PATCH 5/8] qemu: use vfio-pci on commandline when appropriate

Eric Blake eblake at redhat.com
Thu Apr 25 21:07:50 UTC 2013


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130425/d40ed194/attachment-0001.sig>


More information about the libvir-list mailing list