From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH v3 07/10] nEPT: Use minimal permission for nested p2m. Date: Thu, 20 Dec 2012 13:10:37 +0000 Message-ID: <20121220131037.GL80837@ocelot.phlegethon.org> References: <1356018231-26440-1-git-send-email-xiantao.zhang@intel.com> <1356018231-26440-8-git-send-email-xiantao.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1356018231-26440-8-git-send-email-xiantao.zhang@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xiantao Zhang Cc: eddie.dong@intel.com, keir@xen.org, JBeulich@suse.com, jun.nakajima@intel.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 23:43 +0800 on 20 Dec (1356047028), Xiantao Zhang wrote: > @@ -206,12 +205,14 @@ nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa, > struct p2m_domain *p2m, *nested_p2m; > unsigned int page_order_21, page_order_10, page_order_20; > p2m_type_t p2mt_10; > + p2m_access_t p2ma_10 = p2m_access_rwx; > + uint8_t p2ma_21; > > p2m = p2m_get_hostp2m(d); /* L0 p2m */ > nested_p2m = p2m_get_nestedp2m(v, nhvm_vcpu_p2m_base(v)); > > /* walk the L1 P2M table */ > - rv = nestedhap_walk_L1_p2m(v, *L2_gpa, &L1_gpa, &page_order_21, > + rv = nestedhap_walk_L1_p2m(v, *L2_gpa, &L1_gpa, &page_order_21, &p2ma_21, > access_r, access_w, access_x); Once again, please either initialise p2ma_21 to rwx or have the SVM version of this lookup set it to something sensible. Cheers, Tim.