diff options
author | Eddie Dong <eddie.dong@intel.com> | 2007-09-03 09:15:12 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 04:18:26 -0400 |
commit | a3d7f85f471f889e4477863a7ca42828ae74e77d (patch) | |
tree | f75148a940f7e297da91f6a14ab573291ceb050f /drivers/kvm/vmx.c | |
parent | 1b9778dae71dc64d3678d766c0f1fbed79c80f9f (diff) |
KVM: Migrate lapic hrtimer when vcpu moves to another cpu
This reduces overhead by accessing cachelines from the wrong node, as well
as simplifying locking.
[Qing: fix for inactive or expired one-shot timer]
Signed-off-by: Yaozu (Eddie) Dong <Eddie.Dong@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r-- | drivers/kvm/vmx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index eeecadf5da4..f4618b9edf9 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -441,8 +441,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
441 | u64 phys_addr = __pa(vmx->vmcs); | 441 | u64 phys_addr = __pa(vmx->vmcs); |
442 | u64 tsc_this, delta; | 442 | u64 tsc_this, delta; |
443 | 443 | ||
444 | if (vcpu->cpu != cpu) | 444 | if (vcpu->cpu != cpu) { |
445 | vcpu_clear(vmx); | 445 | vcpu_clear(vmx); |
446 | kvm_migrate_apic_timer(vcpu); | ||
447 | } | ||
446 | 448 | ||
447 | if (per_cpu(current_vmcs, cpu) != vmx->vmcs) { | 449 | if (per_cpu(current_vmcs, cpu) != vmx->vmcs) { |
448 | u8 error; | 450 | u8 error; |