aboutsummaryrefslogtreecommitdiff
path: root/hw/spapr_vio.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-04-01 15:15:26 +1100
committerAlexander Graf <agraf@suse.de>2011-04-01 18:34:56 +0200
commit00dc738d8a08fce0f0d327e081bb2bd7b6fba888 (patch)
tree01f3616328994f4680cb6dd0bc1cc9aa3e6f9858 /hw/spapr_vio.h
parentb5cec4c5f294ca3af24e7edf4f37cc2de0ae0e03 (diff)
downloadqemu-00dc738d8a08fce0f0d327e081bb2bd7b6fba888.zip
qemu-00dc738d8a08fce0f0d327e081bb2bd7b6fba888.tar.gz
qemu-00dc738d8a08fce0f0d327e081bb2bd7b6fba888.tar.bz2
Add PAPR H_VIO_SIGNAL hypercall and infrastructure for VIO interrupts
This patch adds infrastructure to support interrupts from PAPR virtual IO devices. This includes correctly advertising those interrupts in the device tree, and implementing the H_VIO_SIGNAL hypercall, used to enable and disable individual device interrupts. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr_vio.h')
-rw-r--r--hw/spapr_vio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/spapr_vio.h b/hw/spapr_vio.h
index b164ad3..8a000c6 100644
--- a/hw/spapr_vio.h
+++ b/hw/spapr_vio.h
@@ -24,6 +24,9 @@
typedef struct VIOsPAPRDevice {
DeviceState qdev;
uint32_t reg;
+ qemu_irq qirq;
+ uint32_t vio_irq_num;
+ target_ulong signal_state;
} VIOsPAPRDevice;
typedef struct VIOsPAPRBus {
@@ -33,6 +36,7 @@ typedef struct VIOsPAPRBus {
typedef struct {
DeviceInfo qdev;
const char *dt_name, *dt_type, *dt_compatible;
+ target_ulong signal_mask;
int (*init)(VIOsPAPRDevice *dev);
void (*hcalls)(VIOsPAPRBus *bus);
int (*devnode)(VIOsPAPRDevice *dev, void *fdt, int node_off);
@@ -43,6 +47,8 @@ extern VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg);
extern void spapr_vio_bus_register_withprop(VIOsPAPRDeviceInfo *info);
extern int spapr_populate_vdevice(VIOsPAPRBus *bus, void *fdt);
+extern int spapr_vio_signal(VIOsPAPRDevice *dev, target_ulong mode);
+
void vty_putchars(VIOsPAPRDevice *sdev, uint8_t *buf, int len);
void spapr_vty_create(VIOsPAPRBus *bus,
uint32_t reg, CharDriverState *chardev);