From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Subject: Re: [PATCH 2/2] KVM: MMU: Use base_role.nxe for mmu.nx Date: Wed, 15 Sep 2010 10:48:33 +0200 Message-ID: <20100915084833.GH17759@amd.com> References: <1284479173-4515-1-git-send-email-joerg.roedel@amd.com> <1284479173-4515-3-git-send-email-joerg.roedel@amd.com> <20100914220836.GA3553@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Avi Kivity , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" To: Marcelo Tosatti Return-path: Content-Disposition: inline In-Reply-To: <20100914220836.GA3553@amt.cnet> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, Sep 14, 2010 at 06:08:37PM -0400, Marcelo Tosatti wrote: > > For tdp better set base_role.nxe to zero, otherwise duplicate tdp > pagetables can be created if the guest switches between nx/non-nx. > This does not work because bit 63 is marked as reserved if base_role.nxe is 0. If the walk_addr_generic function then runs with tdp enabled it would report a set nx bit as a rsvd fault. We also can't use is_nx() in those path because it does not distinguish between l1 and l2 nx. Are there guests that switch the efer.nx bit regularly enough so that it matters? If so I would suggest to drop this patch and keep mmu.nx. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632