diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-05-26 11:52:46 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-10-06 09:43:32 +0200 |
commit | 416343b144cb6a5d73b381e56f452fdbd5992522 (patch) | |
tree | c54ffc137abeeceb17bc110a9e9e7c4e710d7273 /hw/spapr_vio.c | |
parent | 77c7ea5ebbcf494f36f243d786e5f8409d7a4b85 (diff) | |
download | qemu-416343b144cb6a5d73b381e56f452fdbd5992522.tar.gz qemu-416343b144cb6a5d73b381e56f452fdbd5992522.tar.bz2 qemu-416343b144cb6a5d73b381e56f452fdbd5992522.zip |
spapr: make irq customizable via qdev
This also lets the user see the irq in "info qtree".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr_vio.c')
-rw-r--r-- | hw/spapr_vio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c index ba2e1c178b..0546ccb043 100644 --- a/hw/spapr_vio.c +++ b/hw/spapr_vio.c @@ -52,6 +52,10 @@ static struct BusInfo spapr_vio_bus_info = { .name = "spapr-vio", .size = sizeof(VIOsPAPRBus), + .props = (Property[]) { + DEFINE_PROP_UINT32("irq", VIOsPAPRDevice, vio_irq_num, 0), \ + DEFINE_PROP_END_OF_LIST(), + }, }; VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg) @@ -604,7 +608,9 @@ static int spapr_vio_busdev_init(DeviceState *qdev, DeviceInfo *qinfo) } dev->qdev.id = id; - dev->vio_irq_num = bus->irq++; + if (!dev->vio_irq_num) { + dev->vio_irq_num = bus->irq++; + } dev->qirq = spapr_find_qirq(spapr, dev->vio_irq_num); rtce_init(dev); |