From: Tim Deegan Subject: Re: [PATCH 01/10] VMX: Enable EPT A/D bit support Date: Thu, 9 Apr 2015 12:21:25 +0100 Message-ID: <20150409112125.GE17031@deinos.phlegethon.org> References: <1427423754-11841-1-git-send-email-kai.huang@linux.intel.com> <1427423754-11841-2-git-send-email-kai.huang@linux.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: <1427423754-11841-2-git-send-email-kai.huang@linux.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: Kai Huang Cc: yang.z.zhang@intel.com, andrew.cooper3@citrix.com, kevin.tian@intel.com, jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 10:35 +0800 on 27 Mar (1427452545), Kai Huang wrote: > @@ -233,6 +233,9 @@ static int ept_split_super_page(struct p2m_domain *p2m, ept_entry_t *ept_entry, > if ( !ept_set_middle_entry(p2m, &new_ept) ) > return 0; > > + /* It's better to copy A bit of Middle entry from original entry */ > + new_ept.a = ept_entry->a; Shouldn't this A bit always be set to 1? After all we're not using it for anything, and it doesn't mean the same thing as the A bit in the superpage entry did. In fact, thinking about that, we should probably be setting _all_ the A bits to 1, even in leaf entries, to avoid the overhead of the MMU having to write them later. Cheers, Tim.