ia64/xen-unstable

changeset 17734:14f03101b61c

x86 hvm: Drop pagetable reference when resetting a VCPU to real mode.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon May 26 08:45:59 2008 +0100 (2008-05-26)
parents 57923ddaacb9
children eafb252f1412
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Mon May 26 08:37:43 2008 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Mon May 26 08:45:59 2008 +0100
     1.3 @@ -2073,6 +2073,13 @@ void hvm_vcpu_reset_state(struct vcpu *v
     1.4      if ( v->is_initialised )
     1.5          goto out;
     1.6  
     1.7 +    if ( !paging_mode_hap(d) )
     1.8 +    {
     1.9 +        if ( v->arch.hvm_vcpu.guest_cr[0] & X86_CR0_PG )
    1.10 +            put_page(pagetable_get_page(v->arch.guest_table));
    1.11 +        v->arch.guest_table = pagetable_null();
    1.12 +    }
    1.13 +
    1.14      ctxt = &v->arch.guest_context;
    1.15      memset(ctxt, 0, sizeof(*ctxt));
    1.16      ctxt->flags = VGCF_online;