From patchwork Wed Jun 10 15:27:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 29313 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5AFVcOa010937 for ; Wed, 10 Jun 2009 15:31:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759860AbZFJPbb (ORCPT ); Wed, 10 Jun 2009 11:31:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759903AbZFJPbb (ORCPT ); Wed, 10 Jun 2009 11:31:31 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56494 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757369AbZFJPb3 (ORCPT ); Wed, 10 Jun 2009 11:31:29 -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 n5AFVWAs018627 for ; Wed, 10 Jun 2009 11:31:32 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5AFVUDZ021569; Wed, 10 Jun 2009 11:31:31 -0400 Received: from amt.cnet (vpn-10-153.str.redhat.com [10.32.10.153]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5AFVPLs019115; Wed, 10 Jun 2009 11:31:29 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 1B57B550007; Wed, 10 Jun 2009 12:30:43 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n5AFUfE8011126; Wed, 10 Jun 2009 12:30:41 -0300 Message-Id: <20090610152747.803574209@localhost.localdomain> References: <20090610152702.666650177@localhost.localdomain> User-Agent: quilt/0.46-1 Date: Wed, 10 Jun 2009 12:27:06 -0300 From: Marcelo Tosatti To: avi@redhat.com Cc: kvm@vger.kernel.org, Marcelo Tosatti Subject: [patch 4/6] KVM: MMU audit: nontrapping ptes in nonleaf level Content-Disposition: inline; filename=mmu-audit-3 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org It is valid to set non leaf sptes as notrap. 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);