From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mvegh-0001t5-49 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 18:08:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mvegb-0001rV-J5 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 18:08:45 -0400 Received: from [199.232.76.173] (port=51533 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mvegb-0001rS-6x for qemu-devel@nongnu.org; Wed, 07 Oct 2009 18:08:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2578) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mvega-0006s5-KU for qemu-devel@nongnu.org; Wed, 07 Oct 2009 18:08:40 -0400 From: Glauber Costa Date: Wed, 7 Oct 2009 19:08:27 -0300 Message-Id: <1254953315-5761-2-git-send-email-glommer@redhat.com> In-Reply-To: <1254953315-5761-1-git-send-email-glommer@redhat.com> References: <1254953315-5761-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH v2 1/9] add base-addr field to io apic state List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com It is not saved in savevm. Will do it in another patch. Signed-off-by: Glauber Costa --- hw/ioapic.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index b0ad78f..e37157f 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -28,6 +28,7 @@ //#define DEBUG_IOAPIC #define IOAPIC_NUM_PINS 0x18 +#define IOAPIC_DEFAULT_BASE_ADDRESS 0xfec00000 #define IOAPIC_LVT_MASKED (1<<16) #define IOAPIC_TRIGGER_EDGE 0 @@ -45,6 +46,7 @@ struct IOAPICState { uint8_t id; uint8_t ioregsel; + uint64_t base_address; uint32_t irr; uint64_t ioredtbl[IOAPIC_NUM_PINS]; @@ -210,6 +212,7 @@ static void ioapic_reset(void *opaque) int i; memset(s, 0, sizeof(*s)); + s->base_address = IOAPIC_DEFAULT_BASE_ADDRESS; for(i = 0; i < IOAPIC_NUM_PINS; i++) s->ioredtbl[i] = 1 << 16; /* mask LVT */ } @@ -237,7 +240,7 @@ qemu_irq *ioapic_init(void) io_memory = cpu_register_io_memory(ioapic_mem_read, ioapic_mem_write, s); - cpu_register_physical_memory(0xfec00000, 0x1000, io_memory); + cpu_register_physical_memory(IOAPIC_DEFAULT_BASE_ADDRESS, 0x1000, io_memory); vmstate_register(0, &vmstate_ioapic, s); qemu_register_reset(ioapic_reset, s); -- 1.6.2.5