From: Tim Deegan Subject: Re: reserved bit in ShadowPT Date: Tue, 1 Sep 2009 09:14:21 +0100 Message-ID: <20090901081421.GV5235@york.uk.xensource.com> References: <13451837.152251251775745912.JavaMail.coremail@bj163app62.163.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: <13451837.152251251775745912.JavaMail.coremail@bj163app62.163.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Wu Bingzheng Cc: xen-devel List-Id: xen-devel@lists.xenproject.org At 04:29 +0100 on 01 Sep (1251779345), Wu Bingzheng wrote: > Hi, > > Dose Shadow Page Table use reserved-bit (PFEC_reserved_bit) in Xen 3.3.0? Yes. It uses reserved bits in ptes to indicate entries that are known to be either emulated-MMIO or not-present in the guest pagetables. Then in the fault handler it can use PFEC_reserved_bit to branch onto a fast path for those cases without taking any locks or walking the guest pagetables. > In my test many page fault set reserved-bit. But I can't understand its function, after reading SPT's page-fault handler. Have a look at the definition of SH_L1E_MAGIC in arch/x86/mm/shadow/types.h Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]