[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On 04/25/2013 05:07 PM, Eric Blake wrote:
> 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.

I fixed those all up so they have the space before the line break.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]