On Fri, Jul 03, 2015 at 07:09:59PM +0800, Hong Bo Li wrote: > >But I would like to note that pci device drivers require driver handshake > >before device goes away. > >IIUC s390 hotplug is immediate, which is a problem. > >Maybe doing the change will help make sure device removal is acked > >by guest before it happens? > > > > I did some prototype today. If define zpci first, the progress of unplug > will get complicated.
The point is that you don't have to remove the zpci device at all. Remove pci device from zpci. I think the complication you refer to is the guest ack of the removal, isn't it? It's complicated, but it has a chance to actually work with pci device drivers. This, as opposed to just removing the device whenever host tells us to. > So I prefer defining vfio pci first. > And it looks like the vfio pci is the basic device, if we want this > vfio pci to work on s390, we have to define a zpci device to give some > additional information to it. if vfio connects to the bus internal to zpci, it can get things from the bus in a natural way. If zpci is connected to vfio, it becomes much messier. -- MST
