qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH v3 21/22] virtio-pmem: hotplug support functions


From: David Hildenbrand
Subject: Re: [Qemu-ppc] [PATCH v3 21/22] virtio-pmem: hotplug support functions
Date: Mon, 24 Sep 2018 09:57:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

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 <address@hidden>
> 
> 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).

> 
> If not, pseries presents some problems, because we'd need to invent a
> way of notifying hotplug of a completely new type of device which
> would be pretty awkward.

Fortunately this is all handled by virtio (the proxy device) already.

Thanks!

-- 

Thanks,

David / dhildenb



reply via email to

[Prev in Thread] Current Thread [Next in Thread]