mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
c5955a561c
commit
2f5a3b1252
hw/intc
|
@ -156,15 +156,13 @@ ioapic_mem_read(void *opaque, hwaddr addr, unsigned int size)
|
||||||
}
|
}
|
||||||
switch (s->ioregsel) {
|
switch (s->ioregsel) {
|
||||||
case IOAPIC_REG_ID:
|
case IOAPIC_REG_ID:
|
||||||
|
case IOAPIC_REG_ARB:
|
||||||
val = s->id << IOAPIC_ID_SHIFT;
|
val = s->id << IOAPIC_ID_SHIFT;
|
||||||
break;
|
break;
|
||||||
case IOAPIC_REG_VER:
|
case IOAPIC_REG_VER:
|
||||||
val = IOAPIC_VERSION |
|
val = IOAPIC_VERSION |
|
||||||
((IOAPIC_NUM_PINS - 1) << IOAPIC_VER_ENTRIES_SHIFT);
|
((IOAPIC_NUM_PINS - 1) << IOAPIC_VER_ENTRIES_SHIFT);
|
||||||
break;
|
break;
|
||||||
case IOAPIC_REG_ARB:
|
|
||||||
val = 0;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
index = (s->ioregsel - IOAPIC_REG_REDTBL_BASE) >> 1;
|
index = (s->ioregsel - IOAPIC_REG_REDTBL_BASE) >> 1;
|
||||||
if (index >= 0 && index < IOAPIC_NUM_PINS) {
|
if (index >= 0 && index < IOAPIC_NUM_PINS) {
|
||||||
|
|
Loading…
Reference in New Issue