From 1a440963b9b3d76f0a9ba8d5cf7c9cdfa7a1ef06 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 17 Oct 2011 13:11:29 +0200 Subject: [PATCH] ioapic: Reject non-dword accesses to IOWIN register Aligns the model with the spec. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- hw/ioapic.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/ioapic.c b/hw/ioapic.c index 61991d7679..347536ec5f 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -206,6 +206,9 @@ static uint32_t ioapic_mem_readl(void *opaque, target_phys_addr_t addr) val = s->ioregsel; break; case IOAPIC_IOWIN: + if (size != 4) { + break; + } switch (s->ioregsel) { case IOAPIC_REG_ID: val = s->id << IOAPIC_ID_SHIFT; @@ -244,6 +247,9 @@ ioapic_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) s->ioregsel = val; break; case IOAPIC_IOWIN: + if (size != 4) { + break; + } DPRINTF("write: %08x = %08x\n", s->ioregsel, val); switch (s->ioregsel) { case IOAPIC_REG_ID: