On Mon, Sep 24, 2018 at 09:57:35AM +0200, David Hildenbrand wrote: > On 24/09/2018 08:44, David Gibson wrote: > > On Thu, Sep 20, 2018 at 12:32:42PM +0200, David Hildenbrand wrote: > >> virtio-pmem devices will have to be hotplugged using the machine hotplug > >> handler just like other memory devices. Therefore, all machines that > >> want to support virtio-pmem will have to modify their machine hotplug > >> handler. > >> > >> virtio-pmem devices are realized when their parent proxy device > >> (virtio-pmem-pci) is realized. Therefore, they are attached to a bus > >> without a hotplug handler. This makes things a lot easier, because > >> without a hotplug handler, we can directly get control over the device > >> in the machine hotplug handler (otherwise we would have to overwrite > >> control and pass control to the bus hotplug handler from the machine > >> hotplug handler). > >> > >> As we have to implement support for each machine we want to support, > >> add a safety net ("pre_plugged") that catches if the pre_plug handler > >> was not called - if trying to realize it with a machine that does not > >> support it. > >> > >> Otherwise creating and realizing virtio-pmem-pci along with virtio-pmem > >> would work, however the memory-device part would not properly get > >> hotplugged. > >> > >> Signed-off-by: David Hildenbrand <da...@redhat.com> > > > > I'm thinking through how we'd make this work for pseries guests. > > > > Am I right in thinking that the stuff here is purely for getting the > > wiring correct on the qemu side. On the guest side, the hotplug event > > for the proxy device should be sufficient to trigger all the necessary > > stuff. Is that right? > > Yes, this is just wiring for to get the address assigned and the memory > region properly registered in guest physical address space. The "real" > hotplug ("notification") happens via the proxy device. Just like > detection and hotplug of other virtio devices (e.g. virtio-balloon).
Ok, that should be easy then. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature