From: Tim Deegan Subject: Re: confusion about monitor table in shadow mode Date: Thu, 15 Jan 2009 10:09:35 +0000 Message-ID: <20090115100935.GQ12729@york.uk.xensource.com> References: <20090112124730.GE22263@york.uk.xensource.com> <1711104D07124007BB56F0FD798D6C50@oa.ncic.ac.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: <1711104D07124007BB56F0FD798D6C50@oa.ncic.ac.cn> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Li Yaqiong Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org At 11:32 +0800 on 15 Jan (1232019134), Li Yaqiong wrote: > #if SHADOW_PAGING_LEVELS == GUEST_PAGING_LEVELS > mfn_t > sh_make_monitor_table(struct vcpu *v) > { > ....... > } ... > If a 32-bit hvm is created, its GUEST_PAGING_LEVELS should be 2. In this > case, SHADOW_PAGING_LEVELS will be 3 and sh_make_monitor_table will not > be compiled. Guests with GUEST_PAGING_LEVELS == 2 will us the three-level version, because their SHADOW_PAGING_LEVELS will be 3. See the comment in shadow/types.h where the renaming is defined: /* sh_make_monitor_table depends only on the number of shadow levels */ #define sh_make_monitor_table \ SHADOW_INTERNAL_NAME(sh_make_monitor_table, SHADOW_PAGING_LEVELS) #define sh_destroy_monitor_table \ SHADOW_INTERNAL_NAME(sh_destroy_monitor_table, SHADOW_PAGING_LEVELS) Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]