From: Tim Deegan Subject: Re: stale TLB contents? Date: Mon, 24 Jan 2011 13:21:32 +0000 Message-ID: <20110124132132.GO8286@whitby.uk.xensource.com> References: <4D3D780A.4030001@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap Cc: Juergen Gross , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 13:11 +0000 on 24 Jan (1295874671), George Dunlap wrote: > If you're talking about just TLB stuff (not changes to the EPT > tables), that should happen as a result of the context switch code > (nothing to do with EPT). The code in question is here: > > xen/arch/x86/domain.c:context_switch() > if ( unlikely(!cpu_isset(cpu, dirty_mask) && !cpus_empty(dirty_mask)) ) > { > /* Other cpus call __sync_local_execstate from flush ipi handler. */ > flush_tlb_mask(&dirty_mask); > } > > "Dirty mask" means "where this vcpu has run"; since the vcpu in > question will have run on another pcpu, this should happen before the > vcpu is allowed to run on cpu 0 again. Actually this code flushes the _other_ CPU's TLB, but I think the code in vmx_do_resume should be enough. Cheers, Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)