qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/3] PPC: Round VGA BIOS size to page boundary
Date: Fri, 24 Jul 2009 12:52:26 +0200	[thread overview]
Message-ID: <4A69926A.2020005@siemens.com> (raw)
In-Reply-To: <1248384704-47824-4-git-send-email-agraf@suse.de>

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 <agraf@suse.de>
> ---
>  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

  parent reply	other threads:[~2009-07-24 10:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 21:31 [Qemu-devel] [PATCH 0/3] PPC KVM bringup patches round 2 Alexander Graf
2009-07-23 21:31 ` [Qemu-devel] [PATCH 1/3] Move mp_state to CPU_COMMON Alexander Graf
2009-07-23 21:31   ` [Qemu-devel] [PATCH 2/3] Assume PPC64 host on PPC32 KVM Alexander Graf
2009-07-23 21:31     ` [Qemu-devel] [PATCH 3/3] PPC: Round VGA BIOS size to page boundary Alexander Graf
2009-07-23 21:50       ` Alexander Graf
     [not found]       ` <m33a8m35kn.fsf@neno.mitica>
2009-07-24  9:25         ` [Qemu-devel] " Alexander Graf
2009-07-24 10:52       ` Jan Kiszka [this message]
2009-07-24 11:00         ` Alexander Graf
2009-07-24 10:59     ` [Qemu-devel] Re: [PATCH 2/3] Assume PPC64 host on PPC32 KVM Jan Kiszka
2009-07-24 11:03       ` Alexander Graf
2009-07-24 11:17         ` Jan Kiszka
2009-07-24 11:23           ` Alexander Graf
2009-07-24 11:51             ` Jan Kiszka
2009-07-24 11:56               ` Alexander Graf
2009-07-24 12:57                 ` Jan Kiszka
2009-07-24 13:05                   ` Alexander Graf
2009-07-24 13:15                     ` Jan Kiszka
2009-07-24 13:26                       ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A69926A.2020005@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).