From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4u7D-0006ya-HI for qemu-devel@nongnu.org; Tue, 06 Mar 2012 08:07:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4u77-0005sY-9j for qemu-devel@nongnu.org; Tue, 06 Mar 2012 08:07:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4u77-0005sJ-1e for qemu-devel@nongnu.org; Tue, 06 Mar 2012 08:07:37 -0500 Message-ID: <4F560C13.4030900@redhat.com> Date: Tue, 06 Mar 2012 15:07:31 +0200 From: Avi Kivity MIME-Version: 1.0 References: <4F5601BF.3070107@siemens.com> <4F560980.2060803@redhat.com> In-Reply-To: <4F560980.2060803@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-i386: Mask NX bit from cpu_get_phys_page_debug result List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Blue Swirl , Anthony Liguori , qemu-devel 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