[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [HVM] Initialise AP TSC to same as BP TSC.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Node ID a910bf123e5875681d925ad9981129485b1c8eaa # Parent 1db00df48218a4f58ca75910de9273fb4672af19 [HVM] Initialise AP TSC to same as BP TSC. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 9 +++++++-- xen/arch/x86/hvm/vmx/vmcs.c | 13 ------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff -r 1db00df48218 -r a910bf123e58 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Mon Nov 06 15:40:30 2006 +0000 +++ b/xen/arch/x86/hvm/hvm.c Mon Nov 06 15:46:28 2006 +0000 @@ -69,9 +69,9 @@ void hvm_set_guest_time(struct vcpu *v, void hvm_set_guest_time(struct vcpu *v, u64 gtime) { u64 host_tsc; - + rdtscll(host_tsc); - + v->arch.hvm_vcpu.cache_tsc_offset = gtime - host_tsc; hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset); } @@ -540,6 +540,11 @@ int hvm_bringup_ap(int vcpuid, int tramp } hvm_init_ap_context(ctxt, vcpuid, trampoline_vector); + + /* Sync AP's TSC with BSP's. */ + v->arch.hvm_vcpu.cache_tsc_offset = + v->domain->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset; + hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset); LOCK_BIGLOCK(d); rc = -EEXIST; diff -r 1db00df48218 -r a910bf123e58 xen/arch/x86/hvm/vmx/vmcs.c --- a/xen/arch/x86/hvm/vmx/vmcs.c Mon Nov 06 15:40:30 2006 +0000 +++ b/xen/arch/x86/hvm/vmx/vmcs.c Mon Nov 06 15:46:28 2006 +0000 @@ -285,19 +285,6 @@ static void vmx_set_host_env(struct vcpu error |= __vmwrite(HOST_RSP, (unsigned long)get_stack_bottom()); } -#if 0 -static void vmx_do_launch(struct vcpu *v) -{ - if ( v->vcpu_id != 0 ) - { - /* Sync AP's TSC with BSP's */ - v->arch.hvm_vcpu.cache_tsc_offset = - v->domain->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset; - hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset); - } -} -#endif - static int construct_vmcs(struct vcpu *v) { int error = 0; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |