ia64/xen-unstable

changeset 10764:32dccb981757

[HVM] fix system crash when vmx guest startx or restore
Add this safety check like alloc_l4_table
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jul 14 13:59:53 2006 +0100 (2006-07-14)
parents 3fa8b914e2b5
children dc5f894d6834
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Fri Jul 14 13:59:15 2006 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Fri Jul 14 13:59:53 2006 +0100
     1.3 @@ -1008,6 +1008,10 @@ static int alloc_l3_table(struct page_in
     1.4      l3_pgentry_t  *pl3e;
     1.5      int            i;
     1.6  
     1.7 +    /* See the code in shadow_promote() to understand why this is here. */
     1.8 +    if ( (PGT_base_page_table == PGT_l3_page_table) &&
     1.9 +         shadow_mode_refcounts(d) )
    1.10 +        return 1;
    1.11      ASSERT(!shadow_mode_refcounts(d));
    1.12  
    1.13  #ifdef CONFIG_X86_PAE