All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
Cc: Alexander Graf <agraf@suse.de>, qemu-ppc <qemu-ppc@nongnu.org>,
	Nathan Whitehorn <nwhitehorn@freebsd.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] PPC: Fix large page support in TCG
Date: Sat, 03 Mar 2012 19:07:49 +0100	[thread overview]
Message-ID: <4F525DF5.2010403@suse.de> (raw)
In-Reply-To: <4F524946.1050001@freebsd.org>

Am 03.03.2012 17:39, schrieb Nathan Whitehorn:
> Fix large page support in TCG. The old code would overwrite the large
> page table entry with the fake 4 KB
> one generated here whenever the ref/change bits were updated, causing it
> to point to the wrong area of memory. Instead of creating a fake PTE,
> just update the real address at the end.
> 
> Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>

cc'ing Alex and qemu-ppc.

/-F

> ---
>  target-ppc/helper.c |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/target-ppc/helper.c b/target-ppc/helper.c
> index 928fbcf..0f5ad2e 100644
> --- a/target-ppc/helper.c
> +++ b/target-ppc/helper.c
> @@ -597,12 +597,6 @@ static inline int _find_pte(CPUState *env,
> mmu_ctx_t *ctx,
> int is_64b, int h,
>                  pte1 = ldq_phys(env->htab_base + pteg_off + (i * 16) + 8);
>              }
> 
> -            /* We have a TLB that saves 4K pages, so let's
> -             * split a huge page to 4k chunks */
> -            if (target_page_bits != TARGET_PAGE_BITS)
> -                pte1 |= (ctx->eaddr & (( 1 << target_page_bits ) - 1))
> - & TARGET_PAGE_MASK;
> -
>              r = pte64_check(ctx, pte0, pte1, h, rw, type);
>              LOG_MMU("Load pte from " TARGET_FMT_lx " => " TARGET_FMT_lx
> " "
>                      TARGET_FMT_lx " %d %d %d " TARGET_FMT_lx "\n",
> @@ -678,6 +672,11 @@ static inline int _find_pte(CPUState *env,
> mmu_ctx_t *ctx,
> int is_64b, int h,
>          }
>      }
> 
> +    /* We have a TLB that saves 4K pages, so let's
> +     * split a huge page to 4k chunks */
> +    if (target_page_bits != TARGET_PAGE_BITS)
> +       ctx->raddr |= (ctx->eaddr & (( 1 << target_page_bits ) - 1))
> + & TARGET_PAGE_MASK;
>      return ret;
>  }
> 
> -- 
> 1.7.9

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-03-03 18:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03 16:39 [Qemu-devel] [PATCH] PPC: Fix large page support in TCG Nathan Whitehorn
2012-03-03 18:07 ` Andreas Färber [this message]
2012-03-07 15:41   ` Alexander Graf
2012-03-08  1:25 ` David Gibson
2012-03-08 15:24   ` Nathan Whitehorn
2012-03-09  3:42     ` David Gibson
2012-03-09 13:13       ` Alexander Graf
2012-03-09 14:30         ` Nathan Whitehorn
2012-03-09 18:32           ` 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=4F525DF5.2010403@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=nwhitehorn@freebsd.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.