From patchwork Fri Mar 27 13:59:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dong, Eddie" X-Patchwork-Id: 14725 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 n2RDxvwY006851 for ; Fri, 27 Mar 2009 13:59:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbZC0N74 (ORCPT ); Fri, 27 Mar 2009 09:59:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752760AbZC0N74 (ORCPT ); Fri, 27 Mar 2009 09:59:56 -0400 Received: from mga14.intel.com ([143.182.124.37]:55852 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752368AbZC0N7z convert rfc822-to-8bit (ORCPT ); Fri, 27 Mar 2009 09:59:55 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 27 Mar 2009 06:59:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.38,432,1233561600"; d="scan'208";a="124890707" Received: from pgsmsx602.gar.corp.intel.com ([10.221.43.81]) by azsmga001.ch.intel.com with ESMTP; 27 Mar 2009 06:59:53 -0700 Received: from pgsmsx601.gar.corp.intel.com (10.221.43.69) by pgsmsx602.gar.corp.intel.com (10.221.43.81) with Microsoft SMTP Server (TLS) id 8.1.340.0; Fri, 27 Mar 2009 21:59:52 +0800 Received: from pdsmsx602.ccr.corp.intel.com (172.16.12.184) by pgsmsx601.gar.corp.intel.com (10.221.43.69) with Microsoft SMTP Server (TLS) id 8.1.340.0; Fri, 27 Mar 2009 21:59:51 +0800 Received: from pdsmsx503.ccr.corp.intel.com ([172.16.12.95]) by pdsmsx602.ccr.corp.intel.com ([172.16.12.184]) with mapi; Fri, 27 Mar 2009 21:59:51 +0800 From: "Dong, Eddie" To: "Dong, Eddie" , Avi Kivity CC: "kvm@vger.kernel.org" , "Dong, Eddie" Date: Fri, 27 Mar 2009 21:59:49 +0800 Subject: RE: RFC: Add reserved bits check Thread-Topic: RFC: Add reserved bits check Thread-Index: AcmuvykHH+x6GPRmQeO+c5k5HXtRYgAIr4IgAACUkiA= Message-ID: <9832F13BD22FB94A829F798DA4A8280501A2107199@pdsmsx503.ccr.corp.intel.com> References: <9832F13BD22FB94A829F798DA4A8280501A21068EF@pdsmsx503.ccr.corp.intel.com> <9832F13BD22FB94A829F798DA4A8280501A2106E6A@pdsmsx503.ccr.corp.intel.com> <49CC9DAB.8090802@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A2107197@pdsmsx503.ccr.corp.intel.com> In-Reply-To: <9832F13BD22FB94A829F798DA4A8280501A2107197@pdsmsx503.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org >> Will never be use, PDPTEs are loaded by set_cr3(), not walk_addr(). >> > > I see, then how about to replace CR3_PAE_RESERVED_BITS check at cr3 > load with > rsvd_bits_mask[2]? Seems current code are lacking of enough reserved > bits check too. > typo, I mean this: (-- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -233,7 +233,7 @@ int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3) goto out; } for (i = 0; i < ARRAY_SIZE(pdpte); ++i) { - if ((pdpte[i] & 1) && (pdpte[i] & 0xfffffff0000001e6ull)) { + if ((pdpte[i] & 1) && (pdpte[i] & vcpu->arch.mmu.rsvd_bits_mask[0][2])) { ret = 0; goto out; }