From: Tim Deegan Subject: Re: Two shadow page tables for HVM Date: Wed, 28 Jan 2009 09:25:35 +0000 Message-ID: <20090128092535.GA5300@york.uk.xensource.com> References: <20081218113225.GN460@york.uk.xensource.com> <494FC8C7.8030508@ncsu.edu> <20081223161006.GB28336@york.uk.xensource.com> <4958F7E0.8050207@ncsu.edu> <20081229165415.GB5734@york.uk.xensource.com> <4967CAFB.7090907@ncsu.edu> <20090112094609.GN12729@york.uk.xensource.com> <497E57AC.1090508@ncsu.edu> <20090127103413.GB990@york.uk.xensource.com> <497F5B8C.7030107@ncsu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: <497F5B8C.7030107@ncsu.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Emre Can Sezer Cc: Xen Devel List-Id: xen-devel@lists.xenproject.org At 14:07 -0500 on 27 Jan (1233065276), Emre Can Sezer wrote: > >> That is what I would expect. If you're not seeing that then either the >> TLB's not being flushed or your shadows are leaking from one mode to >> another. > Doesn't changing paging modes set and update the guest cr3 resulting in a > guest TLB flush? It's certainly supposed to. :) > I would like to manually flush them if there is a way but > I'm hopelessly confused about the tlbflush functions in tlbflush.h. Which > one do I call to flush guest TLBs? local_flush_tlb() (or is it tlb_flush_local() these days?) will flush the Xen TLB and as a side-effect flush all guest tags if you have a tagged TLB. If you _just_ want to make sure the guest TLB is flushed on the current pCPU , call hvm_flush_guest_tlbs(), which will throw away all the guest tags. (If you don't have a tagged TLB then each vmexit flushes the guest TLB entries). Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]