From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3tN3-0000qa-EU for qemu-devel@nongnu.org; Sat, 03 Mar 2012 13:07:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3tN1-0008IY-FT for qemu-devel@nongnu.org; Sat, 03 Mar 2012 13:07:52 -0500 Message-ID: <4F525DF5.2010403@suse.de> Date: Sat, 03 Mar 2012 19:07:49 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <4F524946.1050001@freebsd.org> In-Reply-To: <4F524946.1050001@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] PPC: Fix large page support in TCG List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Graf , qemu-ppc , Nathan Whitehorn , QEMU Developers 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 i= t > to point to the wrong area of memory. Instead of creating a fake PTE, > just update the real address at the end. >=20 > Signed-off-by: Nathan Whitehorn cc'ing Alex and qemu-ppc. /-F > --- > target-ppc/helper.c | 11 +++++------ > 1 files changed, 5 insertions(+), 6 deletions(-) >=20 > 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 =3D ldq_phys(env->htab_base + pteg_off + (i * 16)= + 8); > } >=20 > - /* We have a TLB that saves 4K pages, so let's > - * split a huge page to 4k chunks */ > - if (target_page_bits !=3D TARGET_PAGE_BITS) > - pte1 |=3D (ctx->eaddr & (( 1 << target_page_bits ) - 1= )) > - & TARGET_PAGE_MASK; > - > r =3D pte64_check(ctx, pte0, pte1, h, rw, type); > LOG_MMU("Load pte from " TARGET_FMT_lx " =3D> " 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, > } > } >=20 > + /* We have a TLB that saves 4K pages, so let's > + * split a huge page to 4k chunks */ > + if (target_page_bits !=3D TARGET_PAGE_BITS) > + ctx->raddr |=3D (ctx->eaddr & (( 1 << target_page_bits ) - 1)) > + & TARGET_PAGE_MASK; > return ret; > } >=20 > --=20 > 1.7.9 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg