From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [patch 3/4] KVM: MMU audit: nontrapping ptes in nonleaf level Date: Tue, 09 Jun 2009 10:13:06 -0300 Message-ID: <20090609131405.993541433@localhost.localdomain> References: <20090609131303.446673264@localhost.localdomain> Cc: avi@redhat.com, Marcelo Tosatti To: kvm@vger.kernel.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:42146 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757077AbZFINPz (ORCPT ); Tue, 9 Jun 2009 09:15:55 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n59DFwBd009266 for ; Tue, 9 Jun 2009 09:15:58 -0400 Content-Disposition: inline; filename=mmu-audit-3 Sender: kvm-owner@vger.kernel.org List-ID: update_pte sets nonleaf sptes as notrap, so either it or the audit code is broken. Choose the audit code. Signed-off-by: Marcelo Tosatti Index: kvm/arch/x86/kvm/mmu.c =================================================================== --- kvm.orig/arch/x86/kvm/mmu.c +++ kvm/arch/x86/kvm/mmu.c @@ -3084,12 +3084,7 @@ static void audit_mappings_page(struct k va = canonicalize(va); if (level > 1) { - if (ent == shadow_notrap_nonpresent_pte) - printk(KERN_ERR "audit: (%s) nontrapping pte" - " in nonleaf level: levels %d gva %lx" - " level %d pte %llx\n", audit_msg, - vcpu->arch.mmu.root_level, va, level, ent); - else + if (is_shadow_present_pte(ent)) audit_mappings_page(vcpu, ent, va, level - 1); } else { gpa_t gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, va); --