From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: MMU: Segregate mmu pages created with different cr4.pge settings Date: Wed, 07 Jan 2009 12:19:26 +0200 Message-ID: <496481AE.1060102@redhat.com> References: <20081221184146.8E00B250012@cleopatra.tlv.redhat.com> <49621FA9.5080903@suse.de> <49633564.7070403@redhat.com> <20090106141151.GA3701@amt.cnet> <49636AE7.4090108@redhat.com> <20090106164311.GA4902@amt.cnet> <49645066.4040009@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , "kvm@vger.kernel.org" , joerg.roedel@amd.com To: Alexander Graf Return-path: Received: from mx2.redhat.com ([66.187.237.31]:60603 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbZAGKTc (ORCPT ); Wed, 7 Jan 2009 05:19:32 -0500 In-Reply-To: <49645066.4040009@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf wrote: > Using this patch it works. But if I read it correctly, that doesn't > actually fix anything but only treats NPT/EPT special, which it > shouldn't, should it? The patch doesn't fix the bug but is nevertheless correct. cr4.pge only matters to the mmu if using the shadow mmu; with tdp it only wastes memory (and exposes the bug which you encountered). So, wrt to the bug you saw, it's a workaround, but it's also a correct fix for another bug. > Maybe this actually even breaks EPT? > It shouldn't. > I remember having seen a lot of CR4 hacks in svm.c when npt is enabled. > Maybe that is related? > No. cr4 controls the guest mmu, but with npt the guest mmu is completely virtualized, so we need to ignore those bits. -- error compiling committee.c: too many arguments to function