diff options
author | Jes Sorensen <jes@sgi.com> | 2009-05-25 10:22:17 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 08:32:42 +0300 |
commit | 3032b925f00ba2653f7695d356d6f8284c82038d (patch) | |
tree | 8f9523d50b3afe8ed3d426964a26dd70e54c2e9a | |
parent | c5ff41ce66382d657a76bc06ba252d848826950f (diff) | |
download | op-kernel-dev-3032b925f00ba2653f7695d356d6f8284c82038d.zip op-kernel-dev-3032b925f00ba2653f7695d356d6f8284c82038d.tar.gz |
KVM: ia64: Correct itc_offset calculations
Init the itc_offset for all possible vCPUs. The current code by
mistake ends up only initializing the offset on vCPU 0.
Spotted by Gleb Natapov.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by : Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/ia64/kvm/kvm-ia64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 80c57b0..3199221 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -1224,7 +1224,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) /*Initialize itc offset for vcpus*/ itc_offset = 0UL - kvm_get_itc(vcpu); - for (i = 0; i < kvm->arch.online_vcpus; i++) { + for (i = 0; i < KVM_MAX_VCPUS; i++) { v = (struct kvm_vcpu *)((char *)vcpu + sizeof(struct kvm_vcpu_data) * i); v->arch.itc_offset = itc_offset; |