[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210827232344.431e3114.pasic@linux.ibm.com>
Date: Fri, 27 Aug 2021 23:23:44 +0200
From: Halil Pasic <pasic@...ux.ibm.com>
To: Christian Borntraeger <borntraeger@...ibm.com>
Cc: Claudio Imbrenda <imbrenda@...ux.ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
David Hildenbrand <david@...hat.com>,
Cornelia Huck <cohuck@...hat.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>, kvm@...r.kernel.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Michael Mueller <mimu@...ux.ibm.com>,
Halil Pasic <pasic@...ux.ibm.com>
Subject: Re: [PATCH 1/1] KVM: s390: index kvm->arch.idle_mask by vcpu_idx
On Fri, 27 Aug 2021 18:36:48 +0200
Christian Borntraeger <borntraeger@...ibm.com> wrote:
> On 27.08.21 16:06, Claudio Imbrenda wrote:
> > On Fri, 27 Aug 2021 14:54:29 +0200
> > Halil Pasic <pasic@...ux.ibm.com> wrote:
> >
> >> While in practice vcpu->vcpu_idx == vcpu->vcp_id is often true,
s/vcp_id/vcpu_id/
> >> 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 match
> >
> >>
> >> 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.
> >
> >> 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).
Thanks!
Halil
Powered by blists - more mailing lists