aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2009-05-25 04:22:17 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:42 -0400
commit3032b925f00ba2653f7695d356d6f8284c82038d (patch)
tree8f9523d50b3afe8ed3d426964a26dd70e54c2e9a
parentc5ff41ce66382d657a76bc06ba252d848826950f (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 80c57b0a21c4..319922137fdd 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)
1224 1224
1225 /*Initialize itc offset for vcpus*/ 1225 /*Initialize itc offset for vcpus*/
1226 itc_offset = 0UL - kvm_get_itc(vcpu); 1226 itc_offset = 0UL - kvm_get_itc(vcpu);
1227 for (i = 0; i < kvm->arch.online_vcpus; i++) { 1227 for (i = 0; i < KVM_MAX_VCPUS; i++) {
1228 v = (struct kvm_vcpu *)((char *)vcpu + 1228 v = (struct kvm_vcpu *)((char *)vcpu +
1229 sizeof(struct kvm_vcpu_data) * i); 1229 sizeof(struct kvm_vcpu_data) * i);
1230 v->arch.itc_offset = itc_offset; 1230 v->arch.itc_offset = itc_offset;