From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv4 2/2] x86/ept: defer the invalidation until the p2m lock is released Date: Wed, 16 Dec 2015 17:55:26 +0000 Message-ID: <5671A58E.9020802@citrix.com> References: <1450103946-14232-1-git-send-email-david.vrabel@citrix.com> <1450103946-14232-3-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9GIt-0004ko-8p for xen-devel@lists.xenproject.org; Wed, 16 Dec 2015 17:55:55 +0000 In-Reply-To: <1450103946-14232-3-git-send-email-david.vrabel@citrix.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: David Vrabel , xen-devel@lists.xenproject.org Cc: Kevin Tian , Jun Nakajima , George Dunlap , Andrew Cooper , Tim Deegan , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 14/12/15 14:39, David Vrabel wrote: > Holding the p2m lock while calling ept_sync_domain() is very expensive > since it does a on_selected_cpus() call. IPIs on many socket machines > can be very slows and on_selected_cpus() is serialized. > > Defer the invalidate until the p2m lock is released. Since the processor > may cache partial translations, we also need to make sure any page table > pages to be freed are not freed until the invalidate is complete. Such > pages are temporarily stored in a list. This breaks PoD because we check for zeroed pages without doing a sync after the type change. This allows other VCPUs to write to a page that is now in the pod pool. The write will both be lost and will corrupt another zero page when the page is used to populate another GFN. David