From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCHv3 1/2] x86/ept: invalidate guest physical mappings on VMENTER Date: Wed, 16 Dec 2015 16:04:57 +0000 Message-ID: <56718BA9.2040803@citrix.com> References: <1449160950-31722-1-git-send-email-david.vrabel@citrix.com> <1449160950-31722-2-git-send-email-david.vrabel@citrix.com> <56617254.1070904@citrix.com> <5661977E.6080409@citrix.com> <566ED527.8020007@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 1a9EZm-0003sT-RU for xen-devel@lists.xenproject.org; Wed, 16 Dec 2015 16:05:14 +0000 In-Reply-To: <566ED527.8020007@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 , George Dunlap Cc: Kevin Tian , Jan Beulich , Andrew Cooper , Tim Deegan , Jun Nakajima , xen-devel List-Id: xen-devel@lists.xenproject.org On 14/12/15 14:41, David Vrabel wrote: > On 07/12/15 10:25, George Dunlap wrote: >> >> I took the past tense ("synced") to mean, "These CPUs have been >> brought into sync (or are no longer out of sync)". So they start out >> not-synced, so you initialize the bit to be clear; when an INVEPT is >> executed, they become synced, so you set the bit; and when you change >> the EPT tables, they are no longer synced so you clear the bit. > > It didn't work like that though. I have retained the changed name and > meaning. I'm not sure what you mean here. vmx_ctx_switch_to() would check to see if the bit corresponding to the current cpu was set; if it wasn't, it would set the bit and call INVEPT flush. The mask started out zero (which would cause a sync on all cpus); and in the original version of ept_sync_domain(), all the cpus which were about to be synced by the on_selected_cpus() call are set while the other ones are clear. -George