From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v2 0/5] Fix EFER.NX=0 with EPT Date: Thu, 6 May 2010 16:43:17 -0300 Message-ID: <20100506194317.GC3432@amt.cnet> References: <1272793734-455-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38463 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757980Ab0EFULP (ORCPT ); Thu, 6 May 2010 16:11:15 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o46KBEZ7018543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 May 2010 16:11:14 -0400 Content-Disposition: inline In-Reply-To: <1272793734-455-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, May 02, 2010 at 12:48:49PM +0300, Avi Kivity wrote: > Currently we run with EFER.NX=1 on the guest even if the guest value is 0. > This is fine with shadow, since we check bit 63 when instantiating a page > table, and fault if bit 63 is set while EFER.NX is clear. > > This doesn't work with EPT, since we no longer get the change to check guest > ptes. So we need to run with EFER.NX=0. > > This is complicated by the fact that if we switch EFER.NX on the host, we'll > trap immediately, since some host pages are mapped with the NX bit set. As > a result, we need to switch the MSR atomically during guest entry and exit. > > This patchset implements the complications described above. > > v2: > Fix transition from long mode to legacy mode Reviewed-by: Marcelo Tosatti