From: Tim Deegan Subject: Re: Nested EPT flushes on p2m change? Date: Thu, 14 May 2015 16:57:56 +0100 Message-ID: <20150514155756.GB81534@deinos.phlegethon.org> References: <20150326110953.GD6519@deinos.phlegethon.org> <20150423084728.GA10824@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YsvWQ-0004ii-Gr for xen-devel@lists.xenproject.org; Thu, 14 May 2015 15:58:06 +0000 Content-Disposition: inline In-Reply-To: <20150423084728.GA10824@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Zhang, Yang Z" Cc: "Tian, Kevin" , "Dong, Eddie" , "White, Edmund H" , "Nakajima, Jun" , "xen-devel@lists.xenproject.org" , "xiantao.zxt@alibaba-inc.com" List-Id: xen-devel@lists.xenproject.org At 09:47 +0100 on 23 Apr (1429782448), Tim Deegan wrote: > At 05:43 +0000 on 10 Apr (1428644619), Zhang, Yang Z wrote: > > Tian, Kevin wrote on 2015-04-03: > > >> From: Tim Deegan [mailto:tim@xen.org] > > >> Sent: Thursday, March 26, 2015 7:10 PM > > >> > > >> Hi, VMX maintainers, > > >> > > >> I was looking at the nested EPT code while following up on Ed's > > >> email about altp2m design, and I can't see where nested-EPT entries > > >> get removed when a host EPT entry is removed/changed. > > >> > > >> On nested NPT, this is handled in hap_write_p2m_entry(), which > > >> detects that the domain has nested p2ms and calls > > >> p2m_flush_nestedp2m() if necessary. > > >> > > >> But nested EPT doesn't use the ->write_p2m_entry() hook to update > > >> entries, it uses atomic_write_ept_entry() instead. AFAICS the only > > >> flushing done on that path is ept_sync_domain(), which doesn't do > > >> anything about nested p2ms. > > >> > > >> Am I forgetting something? > > > > It looks like you are right. The original nested EPT doesn't consider it. > > > > CC Xiantao who is the author of the nested EPT. > > Any progress? AFAICT nested VMX is not safe to use until this is > fixed. Ping... Tim.