From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 8/8] x86: KVM guest: VMX cr3 cache support Date: Thu, 06 Mar 2008 11:32:16 +0200 Message-ID: <47CFBA20.7050204@qumranet.com> References: <1204475481-16583-9-git-send-email-avi@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti To: Zhao Forrest Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Zhao Forrest wrote: >> * We only need to hook operations that are MMU writes. We hook these so >> that >> * we can use lazy MMU mode to batch these operations. We could probably >> * improve the performance of the host code if we used some of the >> information >> @@ -219,6 +359,9 @@ static void paravirt_ops_setup(void) >> pv_mmu_ops.lazy_mode.enter = kvm_enter_lazy_mmu; >> pv_mmu_ops.lazy_mode.leave = kvm_leave_lazy_mmu; >> } >> + >> + if (kvm_para_has_feature(KVM_FEATURE_CR3_CACHE)) >> > Here guest OS calls cpuid() to know if KVM_FEATURE_CR3_CACHE is > supported by KVM, so I think that the kernel counterpart of this > patch(i.e. [kvm-devel] [PATCH 7/8] KVM: MMU: VMX cr3 cache support) > should include the code to intercept cpuid trap and set > KVM_FEATURE_CR3_CACHE. But I didn't find such code in [PATCH 7/8] KVM: > MMU: VMX cr3 cache support. Do I miss anything relevant? > > Userspace sets the cpuid information; this allows, for example, command line switches to hide paravirtualization support. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/