On Mon, 2018-08-20 at 16:04 +0800, Yi Min Zhao wrote: > 在 2018/8/18 上午12:10, Andrea Bolognani 写道: > > On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote: > > > 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. > > > > It looks like you ended up implementing explicit hot unplug at > > least for controllers. I think perhaps it would be a good idea > > to implement it for all devices instead of relying on QEMU's > > own unplug cascading so that we have more control over the whole > > process. > > It's different between controller and device. And we only hot unplug pci > controller, not for > all controller types. In addition, we only could do hot-unplug one time, > either zpci device > or corresponding pci device. It's due to Qemu logic. Qemu will > hot-unplug zpci device > automatically while doing hotplug pci device, and vice versa. Ouch, that's kinda nasty... And I wonder why that doesn't work for controllers too? They're not *that* special :) > > So, I'm very much not familiar with the hotplug code and seeing > > changes to stuff like qemuDomainAttachDiskGeneric() makes me a bit > > uncomfortable :) > > > > I can't spot anything obviously wrong in your changes, but I think > > perhaps you might want to enter and exit the monitor separately > > for the zpci device and for the virtio device? I'm not sure that's > > useful at all, but network devices for example seems to follow > > that pattern... It would be great if someone with more experience > > in this area could provide a review. > > We have to add zpci device firstly and add corresponding pci device > secondly. > Do you think it's redundant to call monitor twice to add two devices? Again, I'm not familiar at all with this code, but entering (and exiting) the monitor once for each device you're dealing with seems to be a pattern. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list