[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-i386: Mask NX bit from cpu_get_phys_page
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH] target-i386: Mask NX bit from cpu_get_phys_page_debug result |
Date: |
Tue, 06 Mar 2012 15:07:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 |
On 03/06/2012 02:56 PM, Avi Kivity wrote:
> > diff --git a/target-i386/helper.c b/target-i386/helper.c
> > index af6bba2..40fe407 100644
> > --- a/target-i386/helper.c
> > +++ b/target-i386/helper.c
> > @@ -947,7 +947,7 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState
> > *env, target_ulong addr)
> > }
> >
> > page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
> > - paddr = (pte & TARGET_PAGE_MASK) + page_offset;
> > + paddr = (pte & TARGET_PAGE_MASK & ~PG_NX_MASK) + page_offset;
> > return paddr;
> > }
> >
>
> Should we not, in addition, mask the software available bits (53-62 IIRC)?
>
Also intermediate PTEs want this treatment, not just the last one.
--
error compiling committee.c: too many arguments to function