From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFl6T-00063B-I7 for qemu-devel@nongnu.org; Mon, 17 Oct 2011 07:11:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFl6S-0008Bk-7Y for qemu-devel@nongnu.org; Mon, 17 Oct 2011 07:11:33 -0400 Received: from goliath.siemens.de ([192.35.17.28]:31373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFl6R-0008BT-Om for qemu-devel@nongnu.org; Mon, 17 Oct 2011 07:11:32 -0400 Message-ID: <4E9C0D61.8060208@siemens.com> Date: Mon, 17 Oct 2011 13:11:29 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4E9B12A4.30100@web.de> <4E9C04E7.9040807@redhat.com> In-Reply-To: <4E9C04E7.9040807@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/2] ioapic: Reject non-dword accesses to IOWIN register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel Aligns the model with the spec. Signed-off-by: Jan Kiszka --- hw/ioapic.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 56b1612..eb75766 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -208,6 +208,9 @@ ioapic_mem_read(void *opaque, target_phys_addr_t addr, unsigned int size) val = s->ioregsel; break; case IOAPIC_IOWIN: + if (size != 4) { + break; + } switch (s->ioregsel) { case IOAPIC_REG_ID: val = s->id << IOAPIC_ID_SHIFT; @@ -247,6 +250,9 @@ ioapic_mem_write(void *opaque, target_phys_addr_t addr, uint64_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: -- 1.7.3.4