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: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices.
Date: Fri, 19 Nov 2010 20:30:35 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

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.

Since the PIIX3 lives in slot 1, our ACPI tables should not advertise slot 0 or slot 1 as supporting hotplug.

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.

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(-)







reply via email to

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