* [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI
@ 2011-01-10 18:55 Marcelo Tosatti
2011-01-10 18:55 ` [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface Marcelo Tosatti
2011-01-10 18:55 ` [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port Marcelo Tosatti
0 siblings, 2 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-01-10 18:55 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
Indicate PCI removability through ACPI _RMV method, so that Windows
guests does not expose non-hotpluggable PCI devices as "hot removable".
Michael, please apply the newest no hotplug attribute patchset from Gerd
before applying this.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface
2011-01-10 18:55 [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI Marcelo Tosatti
@ 2011-01-10 18:55 ` Marcelo Tosatti
2011-01-10 18:55 ` [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port Marcelo Tosatti
1 sibling, 0 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-01-10 18:55 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Marcelo Tosatti, qemu-devel
[-- Attachment #1: document-acpi-pci-hotplug --]
[-- Type: text/plain, Size: 1653 bytes --]
Document how QEMU communicates with ACPI BIOS for PCI hotplug.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu/docs/specs/acpi_pci_hotplug.txt
===================================================================
--- /dev/null
+++ qemu/docs/specs/acpi_pci_hotplug.txt
@@ -0,0 +1,39 @@
+QEMU<->ACPI BIOS PCI hotplug interface
+--------------------------------------
+
+QEMU supports PCI hotplug via ACPI, for PCI bus 0. This document
+describes the interface between QEMU and the ACPI BIOS.
+
+ACPI GPE block (IO ports 0xafe0-0xafe3, byte access):
+-----------------------------------------
+
+Generic ACPI GPE block. Bit 1 (GPE.1) used to notify PCI hotplug/eject
+event to ACPI BIOS, via SCI interrupt.
+
+PCI slot injection notification pending (IO port 0xae00-0xae03, 4-byte access):
+---------------------------------------------------------------
+Slot injection notification pending. One bit per slot.
+
+Read by ACPI BIOS GPE.1 handler to notify OS of injection
+events.
+
+PCI slot removal notification (IO port 0xae04-0xae07, 4-byte access):
+-----------------------------------------------------
+Slot removal notification pending. One bit per slot.
+
+Read by ACPI BIOS GPE.1 handler to notify OS of removal
+events.
+
+PCI device eject (IO port 0xae08-0xae0b, 4-byte access):
+----------------------------------------
+
+Used by ACPI BIOS _EJ0 method to request device removal. One bit per slot.
+Reads return 0.
+
+PCI removability status (IO port 0xae0c-0xae0f, 4-byte access):
+-----------------------------------------------
+
+Used by ACPI BIOS _RMV method to indicate removability status to OS. One
+bit per slot.
+
+
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port
2011-01-10 18:55 [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI Marcelo Tosatti
2011-01-10 18:55 ` [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface Marcelo Tosatti
@ 2011-01-10 18:55 ` Marcelo Tosatti
2011-01-10 21:25 ` [Qemu-devel] " Michael S. Tsirkin
1 sibling, 1 reply; 9+ messages in thread
From: Marcelo Tosatti @ 2011-01-10 18:55 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Marcelo Tosatti, qemu-devel
[-- Attachment #1: expose-no-hotplug-via-acpi-bios --]
[-- Type: text/plain, Size: 2734 bytes --]
Expose no_hotplug attribute via I/O port, so ACPI BIOS can indicate
removability status to guest OS.
An updated seabios is required to make use of this feature (seabios.git
commit ID 3c241edf3d7ef29c21).
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Tested-by: Gleb Natapov <gleb@redhat.com>
Index: qemu/hw/acpi_piix4.c
===================================================================
--- qemu.orig/hw/acpi_piix4.c
+++ qemu/hw/acpi_piix4.c
@@ -37,6 +37,7 @@
#define GPE_BASE 0xafe0
#define PCI_BASE 0xae00
#define PCI_EJ_BASE 0xae08
+#define PCI_RMV_BASE 0xae0c
#define PIIX4_PCI_HOTPLUG_STATUS 2
@@ -73,6 +74,7 @@ typedef struct PIIX4PMState {
/* for pci hotplug */
struct gpe_regs gpe;
struct pci_status pci0_status;
+ uint32_t pci0_hotplug_enable;
} PIIX4PMState;
static void piix4_acpi_system_hot_add_init(PCIBus *bus, PIIX4PMState *s);
@@ -322,6 +324,25 @@ static const VMStateDescription vmstate_
}
};
+static void piix4_update_hotplug(PIIX4PMState *s)
+{
+ PCIDevice *dev = &s->dev;
+ BusState *bus = qdev_get_parent_bus(&dev->qdev);
+ DeviceState *qdev, *next;
+
+ s->pci0_hotplug_enable = 0;
+
+ QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
+ PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev);
+ PCIDevice *pdev = DO_UPCAST(PCIDevice, qdev, qdev);
+ int slot = PCI_SLOT(pdev->devfn);
+
+ if (!info->no_hotplug) {
+ s->pci0_hotplug_enable |= (1 << slot);
+ }
+ }
+}
+
static void piix4_reset(void *opaque)
{
PIIX4PMState *s = opaque;
@@ -336,6 +357,7 @@ static void piix4_reset(void *opaque)
/* Mark SMM as already inited (until KVM supports SMM). */
pci_conf[0x5B] = 0x02;
}
+ piix4_update_hotplug(s);
}
static void piix4_powerdown(void *opaque, int irq, int power_failing)
@@ -576,6 +598,18 @@ static void pciej_write(void *opaque, ui
PIIX4_DPRINTF("pciej write %x <== %d\n", addr, val);
}
+static uint32_t pcirmv_read(void *opaque, uint32_t addr)
+{
+ PIIX4PMState *s = opaque;
+
+ return s->pci0_hotplug_enable;
+}
+
+static void pcirmv_write(void *opaque, uint32_t addr, uint32_t val)
+{
+ return;
+}
+
static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
PCIHotplugState state);
@@ -592,6 +626,9 @@ static void piix4_acpi_system_hot_add_in
register_ioport_write(PCI_EJ_BASE, 4, 4, pciej_write, bus);
register_ioport_read(PCI_EJ_BASE, 4, 4, pciej_read, bus);
+ register_ioport_write(PCI_RMV_BASE, 4, 4, pcirmv_write, s);
+ register_ioport_read(PCI_RMV_BASE, 4, 4, pcirmv_read, s);
+
pci_bus_hotplug(bus, piix4_device_hotplug, &s->dev.qdev);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] Re: [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port
2011-01-10 18:55 ` [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port Marcelo Tosatti
@ 2011-01-10 21:25 ` Michael S. Tsirkin
2011-01-11 16:20 ` [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI (v2) Marcelo Tosatti
2011-01-11 16:25 ` [Qemu-devel] " Marcelo Tosatti
0 siblings, 2 replies; 9+ messages in thread
From: Michael S. Tsirkin @ 2011-01-10 21:25 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: qemu-devel
On Mon, Jan 10, 2011 at 04:55:03PM -0200, Marcelo Tosatti wrote:
> Expose no_hotplug attribute via I/O port, so ACPI BIOS can indicate
> removability status to guest OS.
>
> An updated seabios is required to make use of this feature (seabios.git
> commit ID 3c241edf3d7ef29c21).
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> Tested-by: Gleb Natapov <gleb@redhat.com>
>
> Index: qemu/hw/acpi_piix4.c
> ===================================================================
> --- qemu.orig/hw/acpi_piix4.c
> +++ qemu/hw/acpi_piix4.c
> @@ -37,6 +37,7 @@
> #define GPE_BASE 0xafe0
> #define PCI_BASE 0xae00
> #define PCI_EJ_BASE 0xae08
> +#define PCI_RMV_BASE 0xae0c
>
> #define PIIX4_PCI_HOTPLUG_STATUS 2
>
> @@ -73,6 +74,7 @@ typedef struct PIIX4PMState {
> /* for pci hotplug */
> struct gpe_regs gpe;
> struct pci_status pci0_status;
> + uint32_t pci0_hotplug_enable;
> } PIIX4PMState;
>
> static void piix4_acpi_system_hot_add_init(PCIBus *bus, PIIX4PMState *s);
> @@ -322,6 +324,25 @@ static const VMStateDescription vmstate_
> }
> };
>
> +static void piix4_update_hotplug(PIIX4PMState *s)
> +{
> + PCIDevice *dev = &s->dev;
> + BusState *bus = qdev_get_parent_bus(&dev->qdev);
> + DeviceState *qdev, *next;
> +
> + s->pci0_hotplug_enable = 0;
> +
> + QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
> + PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev);
> + PCIDevice *pdev = DO_UPCAST(PCIDevice, qdev, qdev);
> + int slot = PCI_SLOT(pdev->devfn);
> +
> + if (!info->no_hotplug) {
> + s->pci0_hotplug_enable |= (1 << slot);
> + }
> + }
> +}
> +
So a slot starts as non-removable and becomes removable when you add a
hotpluggable device? Isn't this a bit strange?
I would say all slots should be removable unless there's a
non hotpluggable device there ...
> static void piix4_reset(void *opaque)
> {
> PIIX4PMState *s = opaque;
> @@ -336,6 +357,7 @@ static void piix4_reset(void *opaque)
> /* Mark SMM as already inited (until KVM supports SMM). */
> pci_conf[0x5B] = 0x02;
> }
> + piix4_update_hotplug(s);
> }
>
> static void piix4_powerdown(void *opaque, int irq, int power_failing)
> @@ -576,6 +598,18 @@ static void pciej_write(void *opaque, ui
> PIIX4_DPRINTF("pciej write %x <== %d\n", addr, val);
> }
>
> +static uint32_t pcirmv_read(void *opaque, uint32_t addr)
> +{
> + PIIX4PMState *s = opaque;
> +
> + return s->pci0_hotplug_enable;
> +}
> +
> +static void pcirmv_write(void *opaque, uint32_t addr, uint32_t val)
> +{
> + return;
> +}
> +
> static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
> PCIHotplugState state);
>
> @@ -592,6 +626,9 @@ static void piix4_acpi_system_hot_add_in
> register_ioport_write(PCI_EJ_BASE, 4, 4, pciej_write, bus);
> register_ioport_read(PCI_EJ_BASE, 4, 4, pciej_read, bus);
>
> + register_ioport_write(PCI_RMV_BASE, 4, 4, pcirmv_write, s);
> + register_ioport_read(PCI_RMV_BASE, 4, 4, pcirmv_read, s);
> +
> pci_bus_hotplug(bus, piix4_device_hotplug, &s->dev.qdev);
> }
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI (v2)
2011-01-10 21:25 ` [Qemu-devel] " Michael S. Tsirkin
@ 2011-01-11 16:20 ` Marcelo Tosatti
2011-01-11 16:20 ` [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface Marcelo Tosatti
2011-01-11 16:20 ` [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port Marcelo Tosatti
2011-01-11 16:25 ` [Qemu-devel] " Marcelo Tosatti
1 sibling, 2 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-01-11 16:20 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
Indicate PCI removability through ACPI _RMV method, so that Windows
guests does not expose non-hotpluggable PCI devices as "hot removable".
v2:
- Mark slots with no present devices as hotpluggable.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface
2011-01-11 16:20 ` [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI (v2) Marcelo Tosatti
@ 2011-01-11 16:20 ` Marcelo Tosatti
2011-01-17 14:36 ` [Qemu-devel] " Michael S. Tsirkin
2011-01-11 16:20 ` [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port Marcelo Tosatti
1 sibling, 1 reply; 9+ messages in thread
From: Marcelo Tosatti @ 2011-01-11 16:20 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Marcelo Tosatti, qemu-devel
[-- Attachment #1: document-acpi-pci-hotplug --]
[-- Type: text/plain, Size: 1653 bytes --]
Document how QEMU communicates with ACPI BIOS for PCI hotplug.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu/docs/specs/acpi_pci_hotplug.txt
===================================================================
--- /dev/null
+++ qemu/docs/specs/acpi_pci_hotplug.txt
@@ -0,0 +1,39 @@
+QEMU<->ACPI BIOS PCI hotplug interface
+--------------------------------------
+
+QEMU supports PCI hotplug via ACPI, for PCI bus 0. This document
+describes the interface between QEMU and the ACPI BIOS.
+
+ACPI GPE block (IO ports 0xafe0-0xafe3, byte access):
+-----------------------------------------
+
+Generic ACPI GPE block. Bit 1 (GPE.1) used to notify PCI hotplug/eject
+event to ACPI BIOS, via SCI interrupt.
+
+PCI slot injection notification pending (IO port 0xae00-0xae03, 4-byte access):
+---------------------------------------------------------------
+Slot injection notification pending. One bit per slot.
+
+Read by ACPI BIOS GPE.1 handler to notify OS of injection
+events.
+
+PCI slot removal notification (IO port 0xae04-0xae07, 4-byte access):
+-----------------------------------------------------
+Slot removal notification pending. One bit per slot.
+
+Read by ACPI BIOS GPE.1 handler to notify OS of removal
+events.
+
+PCI device eject (IO port 0xae08-0xae0b, 4-byte access):
+----------------------------------------
+
+Used by ACPI BIOS _EJ0 method to request device removal. One bit per slot.
+Reads return 0.
+
+PCI removability status (IO port 0xae0c-0xae0f, 4-byte access):
+-----------------------------------------------
+
+Used by ACPI BIOS _RMV method to indicate removability status to OS. One
+bit per slot.
+
+
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port
2011-01-11 16:20 ` [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI (v2) Marcelo Tosatti
2011-01-11 16:20 ` [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface Marcelo Tosatti
@ 2011-01-11 16:20 ` Marcelo Tosatti
1 sibling, 0 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-01-11 16:20 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Marcelo Tosatti, qemu-devel
[-- Attachment #1: expose-no-hotplug-via-acpi-bios --]
[-- Type: text/plain, Size: 2735 bytes --]
Expose no_hotplug attribute via I/O port, so ACPI BIOS can indicate
removability status to guest OS.
An updated seabios is required to make use of this feature (seabios.git
commit ID 3c241edf3d7ef29c21).
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Tested-by: Gleb Natapov <gleb@redhat.com>
Index: qemu/hw/acpi_piix4.c
===================================================================
--- qemu.orig/hw/acpi_piix4.c
+++ qemu/hw/acpi_piix4.c
@@ -37,6 +37,7 @@
#define GPE_BASE 0xafe0
#define PCI_BASE 0xae00
#define PCI_EJ_BASE 0xae08
+#define PCI_RMV_BASE 0xae0c
#define PIIX4_PCI_HOTPLUG_STATUS 2
@@ -73,6 +74,7 @@ typedef struct PIIX4PMState {
/* for pci hotplug */
struct gpe_regs gpe;
struct pci_status pci0_status;
+ uint32_t pci0_hotplug_enable;
} PIIX4PMState;
static void piix4_acpi_system_hot_add_init(PCIBus *bus, PIIX4PMState *s);
@@ -322,6 +324,25 @@ static const VMStateDescription vmstate_
}
};
+static void piix4_update_hotplug(PIIX4PMState *s)
+{
+ PCIDevice *dev = &s->dev;
+ BusState *bus = qdev_get_parent_bus(&dev->qdev);
+ DeviceState *qdev, *next;
+
+ s->pci0_hotplug_enable = ~0;
+
+ QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
+ PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev);
+ PCIDevice *pdev = DO_UPCAST(PCIDevice, qdev, qdev);
+ int slot = PCI_SLOT(pdev->devfn);
+
+ if (info->no_hotplug) {
+ s->pci0_hotplug_enable &= ~(1 << slot);
+ }
+ }
+}
+
static void piix4_reset(void *opaque)
{
PIIX4PMState *s = opaque;
@@ -336,6 +357,7 @@ static void piix4_reset(void *opaque)
/* Mark SMM as already inited (until KVM supports SMM). */
pci_conf[0x5B] = 0x02;
}
+ piix4_update_hotplug(s);
}
static void piix4_powerdown(void *opaque, int irq, int power_failing)
@@ -576,6 +598,18 @@ static void pciej_write(void *opaque, ui
PIIX4_DPRINTF("pciej write %x <== %d\n", addr, val);
}
+static uint32_t pcirmv_read(void *opaque, uint32_t addr)
+{
+ PIIX4PMState *s = opaque;
+
+ return s->pci0_hotplug_enable;
+}
+
+static void pcirmv_write(void *opaque, uint32_t addr, uint32_t val)
+{
+ return;
+}
+
static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
PCIHotplugState state);
@@ -592,6 +626,9 @@ static void piix4_acpi_system_hot_add_in
register_ioport_write(PCI_EJ_BASE, 4, 4, pciej_write, bus);
register_ioport_read(PCI_EJ_BASE, 4, 4, pciej_read, bus);
+ register_ioport_write(PCI_RMV_BASE, 4, 4, pcirmv_write, s);
+ register_ioport_read(PCI_RMV_BASE, 4, 4, pcirmv_read, s);
+
pci_bus_hotplug(bus, piix4_device_hotplug, &s->dev.qdev);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Re: [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port
2011-01-10 21:25 ` [Qemu-devel] " Michael S. Tsirkin
2011-01-11 16:20 ` [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI (v2) Marcelo Tosatti
@ 2011-01-11 16:25 ` Marcelo Tosatti
1 sibling, 0 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-01-11 16:25 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
On Mon, Jan 10, 2011 at 11:25:48PM +0200, Michael S. Tsirkin wrote:
> On Mon, Jan 10, 2011 at 04:55:03PM -0200, Marcelo Tosatti wrote:
> > Expose no_hotplug attribute via I/O port, so ACPI BIOS can indicate
> > removability status to guest OS.
> >
> > An updated seabios is required to make use of this feature (seabios.git
> > commit ID 3c241edf3d7ef29c21).
> >
> > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> > Tested-by: Gleb Natapov <gleb@redhat.com>
> >
> > Index: qemu/hw/acpi_piix4.c
> > ===================================================================
> > --- qemu.orig/hw/acpi_piix4.c
> > +++ qemu/hw/acpi_piix4.c
> > @@ -37,6 +37,7 @@
> > #define GPE_BASE 0xafe0
> > #define PCI_BASE 0xae00
> > #define PCI_EJ_BASE 0xae08
> > +#define PCI_RMV_BASE 0xae0c
> >
> > #define PIIX4_PCI_HOTPLUG_STATUS 2
> >
> > @@ -73,6 +74,7 @@ typedef struct PIIX4PMState {
> > /* for pci hotplug */
> > struct gpe_regs gpe;
> > struct pci_status pci0_status;
> > + uint32_t pci0_hotplug_enable;
> > } PIIX4PMState;
> >
> > static void piix4_acpi_system_hot_add_init(PCIBus *bus, PIIX4PMState *s);
> > @@ -322,6 +324,25 @@ static const VMStateDescription vmstate_
> > }
> > };
> >
> > +static void piix4_update_hotplug(PIIX4PMState *s)
> > +{
> > + PCIDevice *dev = &s->dev;
> > + BusState *bus = qdev_get_parent_bus(&dev->qdev);
> > + DeviceState *qdev, *next;
> > +
> > + s->pci0_hotplug_enable = 0;
> > +
> > + QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
> > + PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev);
> > + PCIDevice *pdev = DO_UPCAST(PCIDevice, qdev, qdev);
> > + int slot = PCI_SLOT(pdev->devfn);
> > +
> > + if (!info->no_hotplug) {
> > + s->pci0_hotplug_enable |= (1 << slot);
> > + }
> > + }
> > +}
> > +
>
> So a slot starts as non-removable and becomes removable when you add a
> hotpluggable device? Isn't this a bit strange?
> I would say all slots should be removable unless there's a
> non hotpluggable device there ...
Ugh, thats right, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] Re: [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface
2011-01-11 16:20 ` [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface Marcelo Tosatti
@ 2011-01-17 14:36 ` Michael S. Tsirkin
0 siblings, 0 replies; 9+ messages in thread
From: Michael S. Tsirkin @ 2011-01-17 14:36 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: qemu-devel
On Tue, Jan 11, 2011 at 02:20:38PM -0200, Marcelo Tosatti wrote:
> Document how QEMU communicates with ACPI BIOS for PCI hotplug.
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This one seems to add whitespae errors:
/scm/qemu/.git/rebase-apply/patch:5: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
> Index: qemu/docs/specs/acpi_pci_hotplug.txt
> ===================================================================
> --- /dev/null
> +++ qemu/docs/specs/acpi_pci_hotplug.txt
> @@ -0,0 +1,39 @@
> +QEMU<->ACPI BIOS PCI hotplug interface
> +--------------------------------------
> +
> +QEMU supports PCI hotplug via ACPI, for PCI bus 0. This document
> +describes the interface between QEMU and the ACPI BIOS.
> +
> +ACPI GPE block (IO ports 0xafe0-0xafe3, byte access):
> +-----------------------------------------
> +
> +Generic ACPI GPE block. Bit 1 (GPE.1) used to notify PCI hotplug/eject
> +event to ACPI BIOS, via SCI interrupt.
> +
> +PCI slot injection notification pending (IO port 0xae00-0xae03, 4-byte access):
> +---------------------------------------------------------------
> +Slot injection notification pending. One bit per slot.
> +
> +Read by ACPI BIOS GPE.1 handler to notify OS of injection
> +events.
> +
> +PCI slot removal notification (IO port 0xae04-0xae07, 4-byte access):
> +-----------------------------------------------------
> +Slot removal notification pending. One bit per slot.
> +
> +Read by ACPI BIOS GPE.1 handler to notify OS of removal
> +events.
> +
> +PCI device eject (IO port 0xae08-0xae0b, 4-byte access):
> +----------------------------------------
> +
> +Used by ACPI BIOS _EJ0 method to request device removal. One bit per slot.
> +Reads return 0.
> +
> +PCI removability status (IO port 0xae0c-0xae0f, 4-byte access):
> +-----------------------------------------------
> +
> +Used by ACPI BIOS _RMV method to indicate removability status to OS. One
> +bit per slot.
> +
> +
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-01-17 14:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-10 18:55 [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI Marcelo Tosatti
2011-01-10 18:55 ` [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface Marcelo Tosatti
2011-01-10 18:55 ` [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port Marcelo Tosatti
2011-01-10 21:25 ` [Qemu-devel] " Michael S. Tsirkin
2011-01-11 16:20 ` [Qemu-devel] [patch 0/2] [pci branch] configure pci slot removability through ACPI (v2) Marcelo Tosatti
2011-01-11 16:20 ` [Qemu-devel] [patch 1/2] document QEMU<->ACPIBIOS PCI hotplug interface Marcelo Tosatti
2011-01-17 14:36 ` [Qemu-devel] " Michael S. Tsirkin
2011-01-11 16:20 ` [Qemu-devel] [patch 2/2] acpi_piix4: expose no_hotplug attribute via i/o port Marcelo Tosatti
2011-01-11 16:25 ` [Qemu-devel] " Marcelo Tosatti
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.