ia64/xen-unstable

changeset 6980:9776d03bf108

Put_page on vmx_set_cr0 for multiple protected/real mode switch.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Sep 20 13:07:10 2005 +0000 (2005-09-20)
parents f8e7af29daa1
children c174ac96a69d
files xen/arch/x86/vmx.c
line diff
     1.1 --- a/xen/arch/x86/vmx.c	Tue Sep 20 09:43:46 2005 +0000
     1.2 +++ b/xen/arch/x86/vmx.c	Tue Sep 20 13:07:10 2005 +0000
     1.3 @@ -1100,6 +1100,11 @@ static int vmx_set_cr0(unsigned long val
     1.4                      d->arch.arch_vmx.cpu_cr3, mfn);
     1.5      }
     1.6  
     1.7 +    if(!((value & X86_CR0_PE) && (value & X86_CR0_PG)) && paging_enabled)
     1.8 +        if(d->arch.arch_vmx.cpu_cr3)
     1.9 +            put_page(pfn_to_page(get_mfn_from_pfn(
    1.10 +                      d->arch.arch_vmx.cpu_cr3 >> PAGE_SHIFT)));
    1.11 +
    1.12      /*
    1.13       * VMX does not implement real-mode virtualization. We emulate
    1.14       * real-mode by performing a world switch to VMXAssist whenever