bugfix, correct itc_offset calculations
PATCH 1/1 bugfix, correct itc_offset calculations
Hi,
Gleb Natapov spotted that I had been a little over aggressive when I introduced the vcpu_online counter, so the code in kvm_arch_vcpu_init() only calculated the itc_offset for vCPU 0.
Please apply.
Cheers,
Jes
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
--- arch/ia64/kvm/kvm-ia64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/kvm/kvm-ia64.c +1 -1
@@ -1166,7 +1166,7 @@/*Initialize itc offset for vcpus*/ itc_offset =0UL -ia64_getreg (_IA64_REG_AR_ITC); -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;
Aha, it should be introduced when implement vcpu_online mechanism.
Xiantao
Quoted 10 lines · Jes Sorensen
Hi,
Gleb Natapov spotted that I had been a little over aggressive when I introduced the
vcpu_onlinecounter, so the code inkvm_arch_vcpu_init()only calculated theitc_offsetfor vCPU 0.Please apply.
Cheers,
Jes
Avi Kivity
AppliedQuoted 5 lines · Jes Sorensen
Hi,
Gleb Natapov spotted that I had been a little over aggressive when I introduced the
vcpu_onlinecounter, so the code inkvm_arch_vcpu_init()only calculated theitc_offsetfor vCPU 0.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function