From: Anthony Liguori <aliguori@us.ibm.com>
To: Alex_Rozenman@mentor.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] phys_page_find_alloc: Use correct initial region_offset.
Date: Thu, 15 Dec 2011 12:11:04 -0600 [thread overview]
Message-ID: <4EEA3838.3080701@us.ibm.com> (raw)
In-Reply-To: <1323773528-30485-1-git-send-email-Alex_Rozenman@mentor.com>
On 12/13/2011 04:52 AM, Alex_Rozenman@mentor.com wrote:
> From: Alex Rozenman<Alex_Rozenman@mentor.com>
>
> This fixes a common bug with initial region_offset value.
> Usually, the pages are re-assigned afterwards, so the bug
> has a very small effect on regular QEMU use flows.
>
> Signed-off-by: Alex Rozenman<Alex_Rozenman@mentor.com>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> exec.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index d8b2180..14628d9 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -418,6 +418,7 @@ static PhysPageDesc *phys_page_find_alloc(target_phys_addr_t index, int alloc)
> pd = *lp;
> if (pd == NULL) {
> int i;
> + int first_index = index& ~(L2_SIZE - 1);
>
> if (!alloc) {
> return NULL;
> @@ -427,7 +428,7 @@ static PhysPageDesc *phys_page_find_alloc(target_phys_addr_t index, int alloc)
>
> for (i = 0; i< L2_SIZE; i++) {
> pd[i].phys_offset = IO_MEM_UNASSIGNED;
> - pd[i].region_offset = (index + i)<< TARGET_PAGE_BITS;
> + pd[i].region_offset = (first_index + i)<< TARGET_PAGE_BITS;
> }
> }
>
prev parent reply other threads:[~2011-12-15 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 10:52 [Qemu-devel] [PATCH] phys_page_find_alloc: Use correct initial region_offset Alex_Rozenman
2011-12-15 18:11 ` Anthony Liguori [this message]
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=4EEA3838.3080701@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=Alex_Rozenman@mentor.com \
--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).