From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Pierre Morel <pmorel@linux.ibm.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org, borntraeger@de.ibm.com,
frankja@linux.ibm.com, cohuck@redhat.com, david@redhat.com,
thuth@redhat.com, gor@linux.ibm.com, wintera@linux.ibm.com,
seiden@linux.ibm.com, nrb@linux.ibm.com
Subject: Re: [PATCH v8 1/2] s390x: KVM: guest support for topology function
Date: Wed, 20 Apr 2022 15:22:41 +0200 [thread overview]
Message-ID: <20220420152241.4d9edea5@p-imbrenda> (raw)
In-Reply-To: <Yl/27Pz3pvARmIHn@osiris>
On Wed, 20 Apr 2022 14:05:00 +0200
Heiko Carstens <hca@linux.ibm.com> wrote:
> > +static inline bool kvm_s390_topology_changed(struct kvm_vcpu *vcpu)
> > +{
> > + if (!test_kvm_facility(vcpu->kvm, 11))
> > + return false;
> > +
> > + /* A new vCPU has been hotplugged */
> > + if (vcpu->arch.prev_cpu == S390_KVM_TOPOLOGY_NEW_CPU)
> > + return true;
> > +
> > + /* The real CPU backing up the vCPU moved to another socket */
> > + if (cpumask_test_cpu(vcpu->cpu,
> > + topology_core_cpumask(vcpu->arch.prev_cpu)))
> > + return true;
> > +
> > + return false;
> > +}
>
> This seems to be wrong. I'd guess that you need
>
> if (cpumask_test_cpu(vcpu->cpu,
> topology_core_cpumask(vcpu->arch.prev_cpu)))
> --> return false;
> --> return true;
so if the CPU moved to a different socket, it's not a change?
and if nothing happened, it is a change?
next prev parent reply other threads:[~2022-04-20 13:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 11:34 [PATCH v8 0/2] s390x: KVM: CPU Topology Pierre Morel
2022-04-20 11:34 ` [PATCH v8 1/2] s390x: KVM: guest support for topology function Pierre Morel
2022-04-20 12:05 ` Heiko Carstens
2022-04-20 12:13 ` Pierre Morel
2022-04-20 13:22 ` Claudio Imbrenda [this message]
2022-04-20 18:25 ` Heiko Carstens
2022-04-20 18:31 ` Pierre Morel
2022-04-20 11:34 ` [PATCH v8 2/2] s390x: KVM: resetting the Topology-Change-Report Pierre Morel
2022-04-21 6:40 ` kernel test robot
2022-04-21 6:41 ` kernel test robot
2022-04-28 13:50 ` David Hildenbrand
2022-05-04 8:05 ` Pierre Morel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220420152241.4d9edea5@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=pmorel@linux.ibm.com \
--cc=seiden@linux.ibm.com \
--cc=thuth@redhat.com \
--cc=wintera@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox