From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH RFC] KVM MMU: fix hashing for TDP and non-paging modes Date: Mon, 26 Apr 2010 18:46:20 -0300 Message-ID: <20100426214620.GA27460@amt.cnet> References: <20100426213000.GK21425@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Eric Northup Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755324Ab0DZVsS (ORCPT ); Mon, 26 Apr 2010 17:48:18 -0400 Content-Disposition: inline In-Reply-To: <20100426213000.GK21425@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Apr 26, 2010 at 06:30:00PM -0300, Marcelo Tosatti wrote: > > @@ -2089,6 +2089,10 @@ static int mmu_alloc_roots(struct kvm_vcpu *vcpu) > > root_gfn = 0; > > if (mmu_check_root(vcpu, root_gfn)) > > return 1; > > + if (tdp_enabled) { > > + direct = 1; > > + root_gfn = i << 30; > > + } > > sp = kvm_mmu_get_page(vcpu, root_gfn, i << 30, > > PT32_ROOT_LEVEL, direct, > > ACC_ALL, NULL); > > There is no need to allocate 4 different roots for TDP tables if > kvm_x86_ops->get_tdp_level() == PT64_ROOT_LEVEL. Doh, and your patch does not. But it does not apply to kvm.git -next branch, can you regenerate please?