All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices.
Date: Fri, 19 Nov 2010 20:30:35 -0600	[thread overview]
Message-ID: <4CE732CB.2060708@codemonkey.ws> (raw)
In-Reply-To: <1290077118-11577-1-git-send-email-kraxel@redhat.com>

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

  parent reply	other threads:[~2010-11-20 16:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 10:45 [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices Gerd Hoffmann
2010-11-18 10:45 ` [Qemu-devel] [PATCH 1/3] qdev: allow devices being tagged as not hotpluggable Gerd Hoffmann
2010-11-18 10:45 ` [Qemu-devel] [PATCH 2/3] piix: tag " Gerd Hoffmann
2010-11-18 10:45 ` [Qemu-devel] [PATCH 3/3] vga: tag as not hotplugable Gerd Hoffmann
2010-11-18 11:01 ` [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices Gleb Natapov
2010-11-18 11:13   ` Gerd Hoffmann
2010-11-18 11:20     ` Gleb Natapov
2010-11-18 11:29       ` Gerd Hoffmann
2010-11-18 11:42         ` Gleb Natapov
2010-11-18 12:07           ` Michael Tokarev
2010-11-18 12:16             ` Gleb Natapov
2010-11-20  2:30 ` Anthony Liguori [this message]
2010-11-20 17:24   ` Gleb Natapov
2010-11-22 10:17   ` Gerd Hoffmann
2010-11-22 13:31     ` Gleb Natapov
2010-12-10 12:34     ` Markus Armbruster
2010-12-10 14:04       ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE732CB.2060708@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.