[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/4] PPC: Round VGA BIOS size to page boundary
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 3/4] PPC: Round VGA BIOS size to page boundary |
Date: |
Sat, 25 Jul 2009 01:16:45 +0200 |
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 <address@hidden>
---
V2 removes a left over debug message
---
hw/ppc_newworld.c | 3 +++
hw/ppc_oldworld.c | 3 +++
2 files changed, 6 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..0bd6376 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) {
--
1.6.0.2
Re: [Qemu-devel] [PATCH 1/4] Move mp_state to CPU_COMMON, Anthony Liguori, 2009/07/27