On 05/29/2018 05:04 AM, Cornelia Huck wrote:
On Mon, 28 May 2018 16:26:57 +0800
Xiao Feng Ren <renxiaof(a)linux.vnet.ibm.com> wrote:
> On 5/25/2018 6:22 PM, Bjoern Walk wrote:
>> Cornelia Huck <cohuck(a)redhat.com> [2018-05-24, 06:25PM +0200]:
>>> On Thu, 24 May 2018 14:24:32 +0200
>>> Xiao Feng Ren <renxiaof(a)linux.vnet.ibm.com> wrote:
>>>
>>>> From: Yi Min Zhao <zyimin(a)linux.ibm.com>
>>>>
>>>> This commit adds hotplug support for PCI devices on S390 guests.
>>>> There's no need to implement hot unplug for zPCI as QEMU implements
>>>> an unplug callback which will unplug both PCI and zPCI device in a
>>>> cascaded way.
>>>> Currently, the following PCI devices are supported:
>>>> virtio-blk-pci
>>>> virtio-net-pci
>>>> virtio-rng-pci
>>>> virtio-input-host-pci
>>>> virtio-keyboard-pci
>>>> virtio-mouse-pci
>>>> virtio-tablet-pci
>>>> vfio-pci
>>>> Shmem device
>>>> SCSIVhost device
>>> Hm, how did you arrive at this list? Is it 'anything that uses
msi-x'?
>> I guess it's just any device that libvirt actually supports hotplug for,
>> with a few exceptions (cf. patch 3 and 6). Not familiar wuth msi-x.
Note that, lacking specific information to the contrary, libvirt should
be assuming that every device supports hotplug and should attempt to
hotplug the device when requested. If the device can't be hotplugged,
then qemu will return an error, and libvirt will fail the operation
accordingly. (No, this doesn't match libvirt behavior - hotplug for some
devices simply isn't implemented, but it should be.)
> The list should be the devices that support MSI-X and have
realized the
> hotplug in qemu,
> we support the hotplug for them in the libvirt. So the list will be
> updated to:
>
> virtio-blk-pci
> virtio-net-pci
> virtio-input-host-pci
> virtio-keyboard-pci
> virtio-mouse-pci
> virtio-tablet-pci
> vfio-pci
> SCSIVhost device
Ok, that makes sense.
I also checked that libvirt only allows setting the vectors property
for virtio-serial and shmem (vectors == 0 turns msi-x off), so that
should be fine.
> As the model of Shmem is not support in qemu, the rng device doesn't
> support MSI-X. So remove them.
So, should qemu add support for msi-x with virtio-rng-pci in the
future, we'd want to update libvirt as well, correct?
>
> In addition, the bug found need to be fixed for the hotplug of tablet,
> in the virDomainDeviceIsUSB()
> if ((t == VIR_DOMAIN_DEVICE_DISK &&
> dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB) ||
> (t == VIR_DOMAIN_DEVICE_INPUT &&
> dev->data.input->type == VIR_DOMAIN_INPUT_BUS_USB) ||
> ---------->dev->data.input->bus == VIR_DOMAIN_INPUT_BUS_USB
> (t == VIR_DOMAIN_DEVICE_HOSTDEV &&
> I will send the fix if this bug is agreed.
>
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list