WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH] monitor_table not zeroed when enteringalloc_moni

To: "Khoa Huynh" <khoa@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] monitor_table not zeroed when enteringalloc_monitor_pagetable
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Sat, 26 Nov 2005 09:03:46 +0800
Delivery-date: Sat, 26 Nov 2005 01:03:50 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXfD2wf/7p6teMzQsCo2FgM1RrEuQTE/F4Q
Thread-topic: [Xen-devel] [PATCH] monitor_table not zeroed when enteringalloc_monitor_pagetable
>Problem (as reported by dsteklof@xxxxxxxxxx)
>>I'm hitting an ASSERT in alloc_monitor_pagetable() with debug=y and I
>>can reproduce the condition when debug isn't on. The monitor_table is
>>not zeroed when entering alloc_monitor_pagetable() - this 
>happens when I
>>create a vmx guest. I'm not sure why this happening at first glance.
>>File: xen/arch/x86/shadow32.c
>>Line: 689
>>System: VT/VMX FC3 x86_32 (I can reproduce on FC4 x86_64 too)
>>ASSERT(pagetable_get_paddr(v->arch.monitor_table) == 0);
>
>Solution:
>What happens is that the monitor page table is not zeroed out
>during the initial setup for VMX guests.  As a result, at a later
>time when we enable shadow mode for these VMX guests, we trip on
>the ASSERT problem above.  To fix this, we just need to initialize
>the monitor page table to 0 before calling vmx_final_setup_guest()
>and enabling shadow mode.
>
>This patch has been tested well with VMX guests running WinXP.
>Please let me know if you need further information, or if you
>have any comments, suggestions, etc.  Thanks.
>
>(See attached file: monitor_table.patch)

This patch doesn't really fix the issue here, actually in alloc_vcpu, we
do a memset on the allocated vcpu structure, so monitor_table should be
0, but I'm not seeing where it is set to a none 0 value.

The problem the patch will cause is, on a SMP VMX guest, monitor
pagetable is allocated for each vcpu in shadow_mode_enable, which is
called when we initialize vcpu 0, but it is set to 0 in
arch_set_info_guest later :(, so it's only OK to vcpu 0.

I think we need find the point where monitor_table is set to a none 0
value.

Any comments?

thanks

-Xin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [Xen-devel] [PATCH] monitor_table not zeroed when enteringalloc_monitor_pagetable, Li, Xin B <=