summary refs log tree commit diff stats
path: root/hw/intc
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-07-30 10:21:00 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-25 12:04:42 +0200
commit2f5a3b1252ac238590cba83a38494e1103c32e4e (patch)
tree55824fdabf96035d63d1e61494db8dff82acac00 /hw/intc
parentc5955a561ccdb95ede14e83de0ee8eec00868bd3 (diff)
downloadfocaccia-qemu-2f5a3b1252ac238590cba83a38494e1103c32e4e.tar.gz
focaccia-qemu-2f5a3b1252ac238590cba83a38494e1103c32e4e.zip
ioapic: fix contents of arbitration register
The arbitration register should read to the same value as the
IOAPIC id register.  Fixes kvm-unit-tests ioapic.flat.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/ioapic.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c
index 6ad3c66c1b..bde52e8953 100644
--- a/hw/intc/ioapic.c
+++ b/hw/intc/ioapic.c
@@ -156,15 +156,13 @@ ioapic_mem_read(void *opaque, hwaddr addr, unsigned int size)
         }
         switch (s->ioregsel) {
         case IOAPIC_REG_ID:
+        case IOAPIC_REG_ARB:
             val = s->id << IOAPIC_ID_SHIFT;
             break;
         case IOAPIC_REG_VER:
             val = IOAPIC_VERSION |
                 ((IOAPIC_NUM_PINS - 1) << IOAPIC_VER_ENTRIES_SHIFT);
             break;
-        case IOAPIC_REG_ARB:
-            val = 0;
-            break;
         default:
             index = (s->ioregsel - IOAPIC_REG_REDTBL_BASE) >> 1;
             if (index >= 0 && index < IOAPIC_NUM_PINS) {