Re: [PATCH 1/1] KVM: s390: index kvm->arch.idle_mask by vcpu_idx
From: Christian Borntraeger <hidden>
Date: 2021-08-29 06:25:22
Also in:
kvm, lkml
From: Christian Borntraeger <hidden>
Date: 2021-08-29 06:25:22
Also in:
kvm, lkml
On 27.08.21 23:23, Halil Pasic wrote:
On Fri, 27 Aug 2021 18:36:48 +0200 Christian Borntraeger [off-list ref] wrote:quoted
On 27.08.21 16:06, Claudio Imbrenda wrote:quoted
On Fri, 27 Aug 2021 14:54:29 +0200 Halil Pasic [off-list ref] wrote:quoted
While in practice vcpu->vcpu_idx == vcpu->vcp_id is often true,s/vcp_id/vcpu_id/quoted
quoted
quoted
it may not always be, and we must not rely on this.why? maybe add a simple explanation of why vcpu_idx and vcpu_id can be different, namely: KVM decides the vcpu_idx, userspace decides the vcpu_id, thus the two might not matchquoted
Currently kvm->arch.idle_mask is indexed by vcpu_id, which implies that code like for_each_set_bit(vcpu_id, kvm->arch.idle_mask, online_vcpus) { vcpu = kvm_get_vcpu(kvm, vcpu_id);you can also add a sentence to clarify that kvm_get_vcpu expects an vcpu_idx, not an vcpu_id.quoted
do_stuff(vcpu);I will modify the patch description accordingly before sending to Paolo. Thanks for noticing.Can you also please fix the typo I pointed out above (in the first line of the long description).
I already queued, but I think this is not a big deal.