qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] PCI hotplug fixes/cleanup
@ 2012-04-05  5:51 Alex Williamson
  2012-04-05  5:51 ` [Qemu-devel] [PATCH 1/5] acpi_piix4: Disallow write to up/down PCI hotplug registers Alex Williamson
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Alex Williamson @ 2012-04-05  5:51 UTC (permalink / raw)
  To: qemu-devel, mst
  Cc: aliguori, gleb, jbaron, yamahata, alex.williamson, kraxel,
	pbonzini, imammedo, aurelien

We've been batting this one back and forth.  This series includes
several of the cleanups and specification clarifications from my
series awhile back.  Patch 5 is my proposed alternative to
Michael's PCI hotplug race fix.  Since that version I added slot
present tracking so we can be a little more strategic about which
slots we ask the guest to check.  The approach for that path is
described in the commit log.  I tested hotplug on both Linux an
Windows guests (XP + 2k8), intentionally trying to do back to back
device_add and device_del to get a race, but couldn't (I did
however get a glibc double free that seems unrelated to this
series).

Long term I'd like to deprecate the up/down PCI hotplug interface
and move to a new model.  I think perhaps we should define 3 new
registers:

1) Device present in slot bitmap (foundation already in 5/5 here)
2) Virtual slot power state bitmap
3) Requested slot date bitmap

With these we should be able to do proper _STA, _PS0, and _PS3.
We'd maintain the eject register for _EJ0, but deprecate up/down.

For a device_add, the 'present' & 'request' bitmaps gets set for
the slot by qemu, gpe.sts set and SCI interrupt sent.  The OSPM
can simply compare requested state vs power state and send the
appropriate notify.  Same general idea for removal.  _STA can be
formed by looking at the 'present' and 'power' bitmaps, and
_PS0/3 perform writes to the power register to indicate the virtual
state.  I think this provides a better register ownership model
(qemu owns present/request, OSPM owns power) and also allows us
to differentiate between a guest initiated remove and a platform
(vm manager) initiated remove so we can avoid changing the vm
state in the former case.  I'll try to send a patch for this out
soon, but let me know if there are any concerns or suggestions for
a redesign.  Thanks,

Alex

---

Alex Williamson (5):
      acpi_piix4: Fix PCI hotplug race
      acpi_piix4: Remove PCI_RMV_BASE write code
      acpi_piix4: Use pci_get/set_byte
      acpi_piix4: Only allow writes to PCI hotplug eject register
      acpi_piix4: Disallow write to up/down PCI hotplug registers


 docs/specs/acpi_pci_hotplug.txt |    8 +-
 hw/acpi_piix4.c                 |  178 ++++++++++++++++++++-------------------
 2 files changed, 95 insertions(+), 91 deletions(-)

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-04-05 15:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05  5:51 [Qemu-devel] [PATCH 0/5] PCI hotplug fixes/cleanup Alex Williamson
2012-04-05  5:51 ` [Qemu-devel] [PATCH 1/5] acpi_piix4: Disallow write to up/down PCI hotplug registers Alex Williamson
2012-04-05  5:51 ` [Qemu-devel] [PATCH 2/5] acpi_piix4: Only allow writes to PCI hotplug eject register Alex Williamson
2012-04-05  8:21   ` Igor Mammedov
2012-04-05  9:04     ` Michael S. Tsirkin
2012-04-05  9:12       ` Gleb Natapov
2012-04-05  9:37         ` Michael S. Tsirkin
2012-04-05  9:40           ` Gleb Natapov
2012-04-05  9:53             ` Michael S. Tsirkin
2012-04-05 10:08               ` Gleb Natapov
2012-04-05 10:20                 ` Michael S. Tsirkin
2012-04-05 10:48                   ` Gleb Natapov
2012-04-05 15:12                     ` Alex Williamson
2012-04-05 15:38                       ` Michael S. Tsirkin
2012-04-05 14:28     ` Alex Williamson
2012-04-05  5:51 ` [Qemu-devel] [PATCH 3/5] acpi_piix4: Use pci_get/set_byte Alex Williamson
2012-04-05  5:51 ` [Qemu-devel] [PATCH 4/5] acpi_piix4: Remove PCI_RMV_BASE write code Alex Williamson
2012-04-05  5:51 ` [Qemu-devel] [PATCH 5/5] acpi_piix4: Fix PCI hotplug race Alex Williamson
2012-04-05 10:03 ` [Qemu-devel] [PATCH 0/5] PCI hotplug fixes/cleanup Michael S. Tsirkin
2012-04-05 11:32 ` Gleb Natapov
2012-04-05 12:31 ` Michael S. Tsirkin
2012-04-05 15:14   ` Alex Williamson
2012-04-05 15:39     ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).