From: "Zhai, Edwin" Subject: [PATCH] [PATCH] fix system crash when vmx guest startx or restore Date: Fri, 14 Jul 2006 19:37:05 +0800 Message-ID: <20060714113705.GA21620@edwin-gen.ccr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt , Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org [PATCH] fix system crash when vmx guest startx or restore Add this safety check like alloc_l4_table Signed-off-by: Edwin Zhai Signed-off-by: Xiaohui Xin diff -r f692a0a476c5 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Thu Jul 13 15:33:08 2006 +0100 +++ b/xen/arch/x86/mm.c Fri Jul 14 17:45:28 2006 +0800 @@ -1008,6 +1008,10 @@ static int alloc_l3_table(struct page_in l3_pgentry_t *pl3e; int i; + /* See the code in shadow_promote() to understand why this is here. */ + if ( (PGT_base_page_table == PGT_l3_page_table) && + shadow_mode_refcounts(d) ) + return 1; ASSERT(!shadow_mode_refcounts(d)); #ifdef CONFIG_X86_PAE