diff options
author | Eddie Dong <eddie.dong@intel.com> | 2007-09-03 16:15:12 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 10:18:26 +0200 |
commit | a3d7f85f471f889e4477863a7ca42828ae74e77d (patch) | |
tree | f75148a940f7e297da91f6a14ab573291ceb050f /drivers/kvm/vmx.c | |
parent | 1b9778dae71dc64d3678d766c0f1fbed79c80f9f (diff) | |
download | linux-a3d7f85f471f889e4477863a7ca42828ae74e77d.tar.bz2 |
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 eeecadf5da46..f4618b9edf9c 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) u64 phys_addr = __pa(vmx->vmcs); u64 tsc_this, delta; - if (vcpu->cpu != cpu) + if (vcpu->cpu != cpu) { vcpu_clear(vmx); + kvm_migrate_apic_timer(vcpu); + } if (per_cpu(current_vmcs, cpu) != vmx->vmcs) { u8 error; |