[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 3/3] PPC: Round VGA BIOS size to page boundary
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH 3/3] PPC: Round VGA BIOS size to page boundary |
Date: |
Fri, 24 Jul 2009 12:52:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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 <address@hidden>
> ---
> 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;
To be really nit-picky: ;)
(vga_bios_size + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
- [Qemu-devel] [PATCH 0/3] PPC KVM bringup patches round 2, Alexander Graf, 2009/07/23
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Jan Kiszka, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Alexander Graf, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Jan Kiszka, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Alexander Graf, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Jan Kiszka, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Alexander Graf, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Jan Kiszka, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Alexander Graf, 2009/07/24
- [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM, Jan Kiszka, 2009/07/24