ia64/xen-unstable

changeset 11158:b127e557ee74

[HVM] Fix the HVM hypercall issue when paging is not enabled yet on 64bit host.
Signed-off-by: Xin Li <xin.b.li@intel.com>
author kfraser@localhost.localdomain
date Wed Aug 16 11:55:26 2006 +0100 (2006-08-16)
parents 7ed73735fd30
children 716ef8e8bddc
files xen/arch/x86/shadow_public.c
line diff
     1.1 --- a/xen/arch/x86/shadow_public.c	Wed Aug 16 11:53:37 2006 +0100
     1.2 +++ b/xen/arch/x86/shadow_public.c	Wed Aug 16 11:55:26 2006 +0100
     1.3 @@ -1104,6 +1104,9 @@ int __shadow_mode_enable(struct domain *
     1.4  {
     1.5      struct vcpu *v;
     1.6      int new_modes = (mode & ~d->arch.shadow_mode);
     1.7 +#if defined(CONFIG_PAGING_LEVELS)
     1.8 +    int initial_paging_levels = 3;
     1.9 +#endif
    1.10  
    1.11      // Gotta be adding something to call this function.
    1.12      ASSERT(new_modes);
    1.13 @@ -1112,8 +1115,10 @@ int __shadow_mode_enable(struct domain *
    1.14      ASSERT(!(d->arch.shadow_mode & ~mode));
    1.15  
    1.16  #if defined(CONFIG_PAGING_LEVELS)
    1.17 -    if(!shadow_set_guest_paging_levels(d,
    1.18 -                                       CONFIG_PAGING_LEVELS)) {
    1.19 +    if (  CONFIG_PAGING_LEVELS == 2 )
    1.20 +        initial_paging_levels = CONFIG_PAGING_LEVELS;
    1.21 +    if ( !shadow_set_guest_paging_levels(d,
    1.22 +                                         initial_paging_levels) ) {
    1.23          printk("Unsupported guest paging levels\n");
    1.24          domain_crash_synchronous(); /* need to take a clean path */
    1.25      }