From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLxJj-0007rG-CF for qemu-devel@nongnu.org; Mon, 25 Aug 2014 12:40:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLxJc-0001XE-Gj for qemu-devel@nongnu.org; Mon, 25 Aug 2014 12:40:27 -0400 Received: from mail-qc0-x232.google.com ([2607:f8b0:400d:c01::232]:52578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLxJc-0001Vw-Bs for qemu-devel@nongnu.org; Mon, 25 Aug 2014 12:40:20 -0400 Received: by mail-qc0-f178.google.com with SMTP id x3so13783486qcv.23 for ; Mon, 25 Aug 2014 09:40:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53FB66EA.1010107@redhat.com> Date: Mon, 25 Aug 2014 18:40:10 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <53F9748C.4080406@ubuntu.com> In-Reply-To: <53F9748C.4080406@ubuntu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-i386: Don't forbid NX bit on PAE PDEs and PTEs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: William Grant , qemu-devel@nongnu.org Il 24/08/2014 07:13, William Grant ha scritto: > Commit e8f6d00c30ed88910d0d985f4b2bf41654172ceb ("target-i386: raise > page fault for reserved physical address bits") added a check that the > NX bit is not set on PAE PDPEs, but it also added it to rsvd_mask for > the rest of the function. This caused any PDEs or PTEs with NX set to be > erroneously rejected, making PAE guests with NX support unusable. > > Signed-off-by: William Grant > --- > target-i386/helper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-i386/helper.c b/target-i386/helper.c > index 47b982b..30cb0d0 100644 > --- a/target-i386/helper.c > +++ b/target-i386/helper.c > @@ -615,8 +615,8 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr, > if (!(pdpe & PG_PRESENT_MASK)) { > goto do_fault; > } > - rsvd_mask |= PG_HI_USER_MASK | PG_NX_MASK; > - if (pdpe & rsvd_mask) { > + rsvd_mask |= PG_HI_USER_MASK; > + if (pdpe & (rsvd_mask | PG_NX_MASK)) { > goto do_fault_rsvd; > } > ptep = PG_NX_MASK | PG_USER_MASK | PG_RW_MASK; > Thanks, applied to uq/master. Paolo