在 2018/5/29 下午5:04, Cornelia Huck 写道:
On Mon, 28 May 2018 16:26:57 +0800
Xiao Feng Ren <renxi...@linux.vnet.ibm.com> wrote:

On 5/25/2018 6:22 PM, Bjoern Walk wrote:
Cornelia Huck <coh...@redhat.com> [2018-05-24, 06:25PM +0200]:
On Thu, 24 May 2018 14:24:32 +0200
Xiao Feng Ren <renxi...@linux.vnet.ibm.com> wrote:
From: Yi Min Zhao <zyi...@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.
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.

Thanks for your check!

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?
This is a little bit hard to answer. Our patch adds the code calling the function which is to attach zpci address in rng attachment function. As the logic in libvirt, zpci could be generated for rng device. But it actually can't be supported in s390 qemu binary. If it is being plugged,
the error should be reported.

Thus, if we remove the attachement code for zpci in qemuDomainAttachRNGDevice(), we should update libvirt when rng supports msix in qemu. If we keep it here, then update for libvirt
is not needed.


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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to