Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3032b925 authored by Jes Sorensen's avatar Jes Sorensen Committed by Avi Kivity
Browse files

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: default avatarJes Sorensen <jes@sgi.com>
Acked-by : Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent c5ff41ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;