Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MUH29-0001fa-Ra for qemu-devel@nongnu.org; Fri, 24 Jul 2009 05:25:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUH24-0001aT-G3 for qemu-devel@nongnu.org; Fri, 24 Jul 2009 05:25:44 -0400 Received: from [199.232.76.173] (port=43784 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUH24-0001aH-3w for qemu-devel@nongnu.org; Fri, 24 Jul 2009 05:25:40 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49426 helo=mx2.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MUH23-0004Jd-J4 for qemu-devel@nongnu.org; Fri, 24 Jul 2009 05:25:39 -0400 Message-Id: <3B166CDB-8835-4535-AD94-98F6172E415E@suse.de> From: Alexander Graf In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Fri, 24 Jul 2009 11:25:32 +0200 References: <1248384704-47824-1-git-send-email-agraf@suse.de> <1248384704-47824-2-git-send-email-agraf@suse.de> <1248384704-47824-3-git-send-email-agraf@suse.de> <1248384704-47824-4-git-send-email-agraf@suse.de> Subject: [Qemu-devel] Re: [PATCH 3/3] PPC: Round VGA BIOS size to page boundary List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On 24.07.2009, at 09:26, Juan Quintela wrote: > Alexander Graf wrote: >> When giving KVM a slot of a size not on page boundary, it chokes. >> So let's >> just round up the VGA BIOS size so nobody complains anymore and we >> don't need >> to implement sub-page slots. >> >> Required for booting a PPC guest in KVM. >> >> Signed-off-by: Alexander Graf >> --- >> hw/ppc_newworld.c | 3 +++ >> hw/ppc_oldworld.c | 4 ++++ >> 2 files changed, 7 insertions(+), 0 deletions(-) >> >> diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c >> index 4e5043c..b28a23d 100644 >> --- a/hw/ppc_newworld.c >> +++ b/hw/ppc_newworld.c >> @@ -179,6 +179,9 @@ static void ppc_core99_init (ram_addr_t ram_size, >> vga_bios_ptr[3] = 'V'; >> cpu_to_be32w((uint32_t *)(vga_bios_ptr + 4), vga_bios_size); >> vga_bios_size += 8; >> + >> + /* Round to page boundary */ >> + vga_bios_size = (vga_bios_size + TARGET_PAGE_SIZE) & >> TARGET_PAGE_MASK; >> } >> >> if (linux_boot) { >> diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c >> index b26e407..0daa25b 100644 >> --- a/hw/ppc_oldworld.c >> +++ b/hw/ppc_oldworld.c >> @@ -212,6 +212,9 @@ static void ppc_heathrow_init (ram_addr_t >> ram_size, >> vga_bios_ptr[3] = 'V'; >> cpu_to_be32w((uint32_t *)(vga_bios_ptr + 4), vga_bios_size); >> vga_bios_size += 8; >> + >> + /* Round to page boundary */ >> + vga_bios_size = (vga_bios_size + TARGET_PAGE_SIZE) & >> TARGET_PAGE_MASK; >> } >> >> if (linux_boot) { >> @@ -310,6 +313,7 @@ static void ppc_heathrow_init (ram_addr_t >> ram_size, >> pic = heathrow_pic_init(&pic_mem_index, 1, heathrow_irqs); >> pci_bus = pci_grackle_init(0xfec00000, pic); >> pci_vga_init(pci_bus, vga_bios_offset, vga_bios_size); >> +printf("Mapping VGA to 0x%lx - 0x%lx\n", vga_bios_offset, >> vga_bios_offset + vga_bios_size); > > bad indentation. Thanks :-). I usually do this bad indentation to indicate to myself that this is a temporary debug line that I need to remove before committing. I think I wrote a reply to the post saying that this chunk should be removed, but it's good to know that someone glimpses over my patches :-). Thanks again! Alex