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

Re: [libvirt] [PATCH 15/18] qemu: Support input model=virtio-{non-}transitional



On 01/22/2019 12:32 PM, Cole Robinson wrote:
> On 01/21/2019 11:20 AM, Andrea Bolognani wrote:
>> On Thu, 2019-01-17 at 12:52 -0500, Cole Robinson wrote:
>> [...]
>>> @@ -1142,6 +1144,8 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
>>>      {"virtio-balloon-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_BALLOON_NON_TRANSITIONAL},
>>>      {"vhost-vsock-pci-transitional", QEMU_CAPS_DEVICE_VHOST_VSOCK_TRANSITIONAL},
>>>      {"vhost-vsock-pci-non-transitional", QEMU_CAPS_DEVICE_VHOST_VSOCK_NON_TRANSITIONAL},
>>> +    {"virtio-input-host-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_TRANSITIONAL},
>>> +    {"virtio-input-host-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_NON_TRANSITIONAL},
>>>  };
>>
>> Same comment as always for capabilities.
>>
>> [...]
>>> @@ -501,9 +501,14 @@ qemuBuildVirtioTransitional(virBufferPtr buf,
>>>              tmodel_cap = QEMU_CAPS_DEVICE_VHOST_VSOCK_TRANSITIONAL;
>>>              ntmodel_cap = QEMU_CAPS_DEVICE_VHOST_VSOCK_NON_TRANSITIONAL;
>>>              break;
>>
>> Empty line here.
>>
>> [...]
>>> @@ -917,6 +917,15 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
>>>      case VIR_DOMAIN_DEVICE_INPUT:
>>>          switch ((virDomainInputBus) dev->data.input->bus) {
>>>          case VIR_DOMAIN_INPUT_BUS_VIRTIO:
>>> +            switch ((virDomainInputModel) dev->data.input->model) {
>>> +            case VIR_DOMAIN_INPUT_MODEL_VIRTIO_TRANSITIONAL:
>>> +                return pciFlags;
>>> +            case VIR_DOMAIN_INPUT_MODEL_VIRTIO:
>>> +            case VIR_DOMAIN_INPUT_MODEL_VIRTIO_NON_TRANSITIONAL:
>>> +            case VIR_DOMAIN_INPUT_MODEL_DEFAULT:
>>> +            case VIR_DOMAIN_INPUT_MODEL_LAST:
>>> +                break;
>>> +            }
>>>              return virtioFlags;
>>
>> VIR_DOMAIN_INPUT_MODEL_DEFAULT and VIR_DOMAIN_INPUT_MODEL_LAST
>> should result in 0 rather than virtioFlags being returned.
>>
> 
> Oops good catch
> 

Actually this missed a case: at least DEFAULT (meaning no model=
specified) should return virtioFlags, since this block is already
conditional on bus='virtio'. I'll have DEFAULT return virtioFlags and
LAST return 0;

- Cole


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