summaryrefslogtreecommitdiffstats
path: root/hw/ioapic.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-10-17 13:11:29 +0200
committerAvi Kivity <avi@redhat.com>2011-11-24 18:31:56 +0200
commit1a440963b9b3d76f0a9ba8d5cf7c9cdfa7a1ef06 (patch)
tree734f0af48bd418c44d9640926c2532c2422ffb88 /hw/ioapic.c
parentcfee758cc768ba29ab5e8c4a68b4433df4422cc9 (diff)
downloadhqemu-1a440963b9b3d76f0a9ba8d5cf7c9cdfa7a1ef06.zip
hqemu-1a440963b9b3d76f0a9ba8d5cf7c9cdfa7a1ef06.tar.gz
ioapic: Reject non-dword accesses to IOWIN register
Aligns the model with the spec. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/ioapic.c')
-rw-r--r--hw/ioapic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/ioapic.c b/hw/ioapic.c
index 61991d7..347536e 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:
OpenPOWER on IntegriCloud