|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] In alloc_vcpu_struct, after doing a memset on the new al
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 5ea875b72e0a9cd037093109cf8f1422789ede72
# Parent 66e16c4685f51986c56bb1f5ea9f5aaeab2c7301
In alloc_vcpu_struct, after doing a memset on the new allocated vcpu, we
do a memcpy from idle0_vcpu.arch to arch of the new vcpu, which causes
monitor_pagetable is set to a none 0 value. For VMX guest which is
using external shadow mode, this is not what we really need. the
previous patch is OK for UP VMX guest, but failed on SMP VMX guest.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
diff -r 66e16c4685f5 -r 5ea875b72e0a xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c Mon Nov 28 15:17:03 2005
+++ b/xen/arch/x86/domain.c Mon Nov 28 15:24:14 2005
@@ -414,9 +414,6 @@
d->arch.phys_table = v->arch.guest_table;
v->arch.guest_table = mk_pagetable(0);
- /* Initialize monitor page table */
- v->arch.monitor_table = mk_pagetable(0);
-
vmx_final_setup_guest(v);
}
diff -r 66e16c4685f5 -r 5ea875b72e0a xen/arch/x86/vmx.c
--- a/xen/arch/x86/vmx.c Mon Nov 28 15:17:03 2005
+++ b/xen/arch/x86/vmx.c Mon Nov 28 15:24:14 2005
@@ -61,23 +61,30 @@
{
v->arch.schedule_tail = arch_vmx_do_launch;
- if ( v == v->domain->vcpu[0] )
+ if ( v->vcpu_id == 0 )
{
- v->domain->arch.vmx_platform.lapic_enable =
- v->arch.guest_context.user_regs.ecx;
+ struct domain *d = v->domain;
+ struct vcpu *vc;
+
+ d->arch.vmx_platform.lapic_enable =
v->arch.guest_context.user_regs.ecx;
v->arch.guest_context.user_regs.ecx = 0;
VMX_DBG_LOG(DBG_LEVEL_VLAPIC, "lapic enable is %d.\n",
- v->domain->arch.vmx_platform.lapic_enable);
+ d->arch.vmx_platform.lapic_enable);
+
+ /* Initialize monitor page table */
+ for_each_vcpu(d, vc)
+ vc->arch.monitor_table = mk_pagetable(0);
+
/*
* Required to do this once per domain
* XXX todo: add a seperate function to do these.
*/
- memset(&v->domain->shared_info->evtchn_mask[0], 0xff,
- sizeof(v->domain->shared_info->evtchn_mask));
+ memset(&d->shared_info->evtchn_mask[0], 0xff,
+ sizeof(d->shared_info->evtchn_mask));
/* Put the domain in shadow mode even though we're going to be using
* the shared 1:1 page table initially. It shouldn't hurt */
- shadow_mode_enable(v->domain,
+ shadow_mode_enable(d,
SHM_enable|SHM_refcounts|
SHM_translate|SHM_external|SHM_wr_pt_pte);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] In alloc_vcpu_struct, after doing a memset on the new allocated vcpu, we,
Xen patchbot -unstable <=
|
|
|
|
|