From: Heiko Carstens <hca@linux.ibm.com>
To: Pierre Morel <pmorel@linux.ibm.com>
Cc: Nico Boehr <nrb@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, imbrenda@linux.ibm.com, gor@linux.ibm.com,
wintera@linux.ibm.com, seiden@linux.ibm.com
Subject: Re: [PATCH v7 1/1] s390x: KVM: guest support for topology function
Date: Fri, 18 Feb 2022 16:10:23 +0100 [thread overview]
Message-ID: <Yg+23xh7DDSRHFxK@osiris> (raw)
In-Reply-To: <97af6268-ff7a-cfb6-5ea4-217b5162cfe7@linux.ibm.com>
> > > + /* The real CPU backing up the vCPU moved to another socket
> > > */
> > > + if (topology_physical_package_id(vcpu->cpu) !=
> > > + topology_physical_package_id(vcpu->arch.prev_cpu))
> > > + return true;
> >
> > Why is it OK to look just at the physical package ID here? What if the
> > vcpu for example moves to a different book, which has a core with the
> > same physical package ID?
> >
>
> You are right, we should look at the drawer and book id too.
> Something like that I think:
>
> if ((topology_physical_package_id(vcpu->cpu) !=
> topology_physical_package_id(vcpu->arch.prev_cpu)) ||
> (topology_book_id(vcpu->cpu) !=
> topology_book_id(vcpu->arch.prev_cpu)) ||
> (topology_drawer_id(vcpu->cpu) !=
> topology_drawer_id(vcpu->arch.prev_cpu)))
> return true;
You only need to check if prev_cpu is present in topology_core_cpumask(cpu).
next prev parent reply other threads:[~2022-02-18 15:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 9:59 [PATCH v7 0/1] s390x: KVM: CPU Topology Pierre Morel
2022-02-17 9:59 ` [PATCH v7 1/1] s390x: KVM: guest support for topology function Pierre Morel
2022-02-17 17:17 ` Nico Boehr
2022-02-18 13:13 ` Pierre Morel
2022-02-18 14:28 ` Janosch Frank
2022-02-18 17:27 ` Pierre Morel
2022-02-18 18:24 ` Pierre Morel
2022-02-21 8:10 ` Janosch Frank
2022-02-18 15:10 ` Heiko Carstens [this message]
2022-02-18 17:08 ` 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=Yg+23xh7DDSRHFxK@osiris \
--to=hca@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=imbrenda@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