ia64/xen-unstable

changeset 7982:060a6634d9ec

SHADOW_CONTROL_OP_OFF should be checkign whether shadow mode
is actually currently enabled.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Nov 22 11:53:45 2005 +0100 (2005-11-22)
parents faf5c318f9b0
children 13b2e5c94595
files xen/arch/x86/shadow32.c xen/arch/x86/shadow_public.c
line diff
     1.1 --- a/xen/arch/x86/shadow32.c	Tue Nov 22 07:08:57 2005 +0100
     1.2 +++ b/xen/arch/x86/shadow32.c	Tue Nov 22 11:53:45 2005 +0100
     1.3 @@ -1381,8 +1381,11 @@ int shadow_mode_control(struct domain *d
     1.4      switch ( op )
     1.5      {
     1.6      case DOM0_SHADOW_CONTROL_OP_OFF:
     1.7 -        __shadow_sync_all(d);
     1.8 -        __shadow_mode_disable(d);
     1.9 +        if ( shadow_mode_enabled(d) )
    1.10 +        {
    1.11 +            __shadow_sync_all(d);
    1.12 +            __shadow_mode_disable(d);
    1.13 +        }
    1.14          break;
    1.15  
    1.16      case DOM0_SHADOW_CONTROL_OP_ENABLE_TEST:
     2.1 --- a/xen/arch/x86/shadow_public.c	Tue Nov 22 07:08:57 2005 +0100
     2.2 +++ b/xen/arch/x86/shadow_public.c	Tue Nov 22 11:53:45 2005 +0100
     2.3 @@ -1290,8 +1290,11 @@ int shadow_mode_control(struct domain *d
     2.4      switch ( op )
     2.5      {
     2.6      case DOM0_SHADOW_CONTROL_OP_OFF:
     2.7 -        __shadow_sync_all(d);
     2.8 -        __shadow_mode_disable(d);
     2.9 +        if ( shadow_mode_enabled(d) )
    2.10 +        {
    2.11 +            __shadow_sync_all(d);
    2.12 +            __shadow_mode_disable(d);
    2.13 +        }
    2.14          break;
    2.15  
    2.16      case DOM0_SHADOW_CONTROL_OP_ENABLE_TEST: