aboutsummaryrefslogtreecommitdiff
path: root/arch/ia64/kvm
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2009-05-25 10:22:17 +0200
committerAvi Kivity <avi@redhat.com>2009-09-10 08:32:42 +0300
commit3032b925f00ba2653f7695d356d6f8284c82038d (patch)
tree8f9523d50b3afe8ed3d426964a26dd70e54c2e9a /arch/ia64/kvm
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>
Diffstat (limited to 'arch/ia64/kvm')
-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 80c57b0a21c..319922137fd 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;