From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management Date: Tue, 2 Jun 2009 19:31:08 +0800 Message-ID: <200906021931.08737.sheng@linux.intel.com> References: <1243862524-22120-1-git-send-email-avi@redhat.com> <200906021756.50038.sheng@linux.intel.com> <4A24FBEE.60409@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Marcelo Tosatti , Joerg Roedel To: Avi Kivity Return-path: Received: from mga05.intel.com ([192.55.52.89]:12604 "EHLO fmsmga101.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755717AbZFBLbK (ORCPT ); Tue, 2 Jun 2009 07:31:10 -0400 In-Reply-To: <4A24FBEE.60409@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Tuesday 02 June 2009 18:16:14 Avi Kivity wrote: > Sheng Yang wrote: > > On Tuesday 02 June 2009 17:46:39 Avi Kivity wrote: > >> Sheng Yang wrote: > >>> No, no, not with the new code. For CPU can load pdptrs if EPT enabled > >>> with PAE from VM exit, there should not be necessary load it > >>> explicitly. So I estimate the ept_load_pdptr() in exit handler, and put > >>> it in CR0 handling. Just tried to optimize load-pdptr according to the > >>> spec, but not got the desired result... > >>> > >>> So I am trying to find the failure reason... > >> > >> so from your point of view, the patches are okay? > > > > Yes. But we should can optimize it more by avoiding most of PDPTR > > loading, according to the spec. > > Patch 3 makes reloading a very rare event. It only happens on pae mode > changes or if userspace sets cr3. Yes, you are right. Quite beautiful. :) Sorry for misunderstood the meaning of "on demand" without looking at the patch carefully... Looks fine now. Thanks! BTW: one extra blank line above function kvm_pdptr_read() in patch 3. ;) -- regards Yang, Sheng