[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [patch 19/24] QEMU/KVM: handle SEJ notifications
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [patch 19/24] QEMU/KVM: handle SEJ notifications |
Date: |
Tue, 11 Mar 2008 17:12:10 -0300 |
User-agent: |
quilt/0.46-1 |
Handle the _EJ0 notifications.
Signed-off-by: Marcelo Tosatti <address@hidden>
Index: kvm-userspace.hotplug2/qemu/hw/acpi.c
===================================================================
--- kvm-userspace.hotplug2.orig/qemu/hw/acpi.c
+++ kvm-userspace.hotplug2/qemu/hw/acpi.c
@@ -26,6 +26,7 @@
#ifdef USE_KVM
#include "qemu-kvm.h"
#endif
+#include "string.h"
//#define DEBUG
@@ -539,6 +540,7 @@ void qemu_system_powerdown(void)
#define GPE_BASE 0xafe0
#define PROC_BASE 0xaf00
#define PCI_BASE 0xae00
+#define PCI_EJ_BASE 0xae08
struct gpe_regs {
uint16_t sts; /* status */
@@ -659,6 +661,23 @@ static void pcihotplug_write(void *opaqu
#endif
}
+static uint32_t pciej_read(void *opaque, uint32_t addr)
+{
+#if defined(DEBUG)
+ printf("pciej read %lx == %lx\n", addr, val);
+#endif
+ return 0;
+}
+
+static void pciej_write(void *opaque, uint32_t addr, uint32_t val)
+{
+ int slot = ffs(val) - 1;
+
+#if defined(DEBUG)
+ printf("pciej write %lx <== %d\n", addr, val);
+#endif
+}
+
static char *model;
@@ -673,6 +692,9 @@ void qemu_system_hot_add_init(char *cpu_
register_ioport_write(PCI_BASE, 8, 4, pcihotplug_write, &pci0_status);
register_ioport_read(PCI_BASE, 8, 4, pcihotplug_read, &pci0_status);
+ register_ioport_write(PCI_EJ_BASE, 4, 4, pciej_write, NULL);
+ register_ioport_read(PCI_EJ_BASE, 4, 4, pciej_read, NULL);
+
model = cpu_model;
}
--
- [Qemu-devel] [patch 10/24] QEMU/KVM: move drives_opt for external use, (continued)
- [Qemu-devel] [patch 10/24] QEMU/KVM: move drives_opt for external use, Marcelo Tosatti, 2008/03/12
- [Qemu-devel] [patch 12/24] QEMU/KVM: add net_client_uninit, Marcelo Tosatti, 2008/03/12
- [Qemu-devel] [patch 14/24] QEMU/KVM: add pci_find_device, Marcelo Tosatti, 2008/03/12
- [Qemu-devel] [patch 15/24] QEMU/KVM: virtio_blk_init return PCIDevice pointer, Marcelo Tosatti, 2008/03/12
- [Qemu-devel] [patch 11/24] QEMU/KVM: net/drive add/remove tweaks, Marcelo Tosatti, 2008/03/12
- [Qemu-devel] [patch 17/24] QEMU/KVM: add cpu_unregister_io_memory and make io mem table index dynamic, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 19/24] QEMU/KVM: handle SEJ notifications,
Marcelo Tosatti <=
[Qemu-devel] [patch 20/24] QEMU/KVM: add qemu_free_irqs, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 22/24] QEMU/KVM: LSI SCSI and e1000 unregister callbacks, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 23/24] QEMU/KVM: zero ioport_opaque on isa_unassign_ioport, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 24/24] QEMU/KVM: device hot-remove, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 08/24] QEMU/KVM: drive removal support, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 16/24] QEMU/KVM: device and disk hot-add, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 21/24] QEMU/KVM: add pci_unregister_device, Marcelo Tosatti, 2008/03/12
[Qemu-devel] [patch 18/24] QEMU/KVM: notify _EJ0 through _SEJ OperationRegion, Marcelo Tosatti, 2008/03/12
[Qemu-devel] Re: [kvm-devel] [patch 00/24] QEMU ACPI PCI hotplug support, Avi Kivity, 2008/03/16