From: Tim Deegan Subject: Re: Two shadow page tables for HVM Date: Mon, 12 Jan 2009 09:46:09 +0000 Message-ID: <20090112094609.GN12729@york.uk.xensource.com> References: <494985DF.9040701@ncsu.edu> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: <4967CAFB.7090907@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 17:08 -0500 on 09 Jan (1231520939), Emre Can Sezer wrote: > I finally got around to implementing two paging modes. Everything works > fine until I swap modes :) > > I get a shadow page fault with error_code 0. This happens right after I > swap the paging mode. Any clues as to what might be the cause? > > I walked through the code that updates paging modes. It appears that we > simply make an *empty* top level shadow and install it as top level shadow > page table. If this is the case, shouldn't the first fault have a non-zero > error code? The TLB will be empty when you return so the first fault will be an instruction fetch, presumably from kernel space (since that's when you want to switch modes). If the guest has PAE or 64-bit pagetabels and EFER.NXE turned on, it should have error code 0x10; otherwise 0 is correct. Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]