qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices.


From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices.
Date: Sat, 20 Nov 2010 19:24:37 +0200

On Fri, Nov 19, 2010 at 08:30:35PM -0600, Anthony Liguori wrote:
> On 11/18/2010 04:45 AM, Gerd Hoffmann wrote:
> >   Hi,
> >
> >This patch series adds a qdev flag which allows devices being tagged as
> >not hotpluggable.  It also sets this flag for a number of devices.
> >
> 
> I understand why you're adding this but this is one of those
> horrible abuses of qdev that we really need to avoid.
> 
> There are two valid reasons why hotplug is not possible:
> 
> 1) Hotplugging is not supported by the *slot*.  This is something
> that needs to be exposes through ACPI.  This is not a qdev property,
> but a property of a PCI slot.  It's very important that we do this
> correctly because Windows puts a little icon in the systray that
> advertises quick-removal of devices in slots that support hotplug.
> 
> 2) The PCI device is soldered to the MB or is otherwise not part of
> a PCI slot.  Again, this is part of the ACPI definition.
> 
This patch series introduce "soldered" property for qdev device. It
means that device is not removable from the MB and thus can't be deleted
by issuing delete command in qemu monitor.

> Since the PIIX3 lives in slot 1, our ACPI tables should not
> advertise slot 0 or slot 1 as supporting hotplug.
> 
ACPI table may not advertise it, but it will not prevent removing of
PIIX3 by device_del command (or how it is called this days).

> Hotplug information has no business being part of the core qdev
> structures.  Hotplug is a PCI concept and the information needs to
> live at the PCI layer to be meaningfully.
> 
I am not sure that PCI is the only bus that supports hot-plug. USB and
SCSI support it to and I am sure many others.

> An ideal interface would explicitly allow a user to mark a series of
> PCI slots as no supporting hotplug.  It would be convenient in order
> to ensure that your virtio-net wasn't accidentally ejected by a
> click-happy Windows user.
> 
> Regards,
> 
> Anthony Liguori
> 
> >Gerd Hoffmann (3):
> >   qdev: allow devices being tagged as not hotpluggable.
> >   piix: tag as non-hotpluggable.
> >   vga: tag as not hotplugable.
> >
> >  hw/acpi_piix4.c |    2 ++
> >  hw/cirrus_vga.c |    1 +
> >  hw/ide/piix.c   |    2 ++
> >  hw/piix4.c      |    1 +
> >  hw/piix_pci.c   |    2 ++
> >  hw/qdev.c       |   16 +++++++++++++---
> >  hw/qdev.h       |    1 +
> >  hw/vga-pci.c    |    1 +
> >  hw/vmware_vga.c |    1 +
> >  qerror.c        |    4 ++++
> >  qerror.h        |    3 +++
> >  11 files changed, 31 insertions(+), 3 deletions(-)
> >
> >
> >
> 

--
                        Gleb.



reply via email to

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