[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 06/18] vfio-user: add HotplugHandler for remote machine
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v5 06/18] vfio-user: add HotplugHandler for remote machine |
Date: |
Wed, 26 Jan 2022 09:35:14 +0000 |
On Tue, Jan 25, 2022 at 06:12:48PM +0000, Jag Raman wrote:
>
>
> > On Jan 25, 2022, at 5:32 AM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > On Wed, Jan 19, 2022 at 04:41:55PM -0500, Jagannathan Raman wrote:
> >> Allow hotplugging of PCI(e) devices to remote machine
> >>
> >> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> >> Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
> >> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
> >> ---
> >> hw/remote/machine.c | 29 +++++++++++++++++++++++++++++
> >> 1 file changed, 29 insertions(+)
> >
> > Why is this code necessary? I expected the default hotplug behavior to
>
> I just discovered that TYPE_REMOTE_MACHINE wasn't setting up a hotplug
> handler for the root PCI bus.
>
> Looks like, some of the machines don’t support hotplugging PCI devices. I see
> that the ‘pc’ machine does support hotplug, whereas ‘q35’ does not.
Hotplug is definitely possible with q35. I'm not familiar with the
hotplug code though so I don't know how exactly that works for q35.
> We didn’t check hotplug in multiprocess-qemu previously because it was limited
> to one device per process, and the use cases attached the devices via
> command line.
>
> > pretty much handle this case - hotplugging device types that the bus
> > doesn't support should fail and unplug should already unparent/unrealize
> > the device.
>
> OK, that makes sense. We don’t need to test the device type during
> plug and unplug.
>
> Therefore, I don’t think we need a callback for the plug operation. We
> could set HotplugHandlerClass->unplug callback to the default
> qdev_simple_device_unplug_cb() callback.
Great!
Stefan
signature.asc
Description: PGP signature
- [PATCH v5 02/18] tests/avocado: Specify target VM argument to helper routines, (continued)
[PATCH v5 06/18] vfio-user: add HotplugHandler for remote machine, Jagannathan Raman, 2022/01/19
[PATCH v5 04/18] pci: create and free isolated PCI buses, Jagannathan Raman, 2022/01/19
[PATCH v5 07/18] vfio-user: set qdev bus callbacks for remote machine, Jagannathan Raman, 2022/01/19