From: Cornelia Huck <cohuck@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: borntraeger@de.ibm.com, qemu-s390x@nongnu.org,
qemu-devel@nongnu.org, david@redhat.com
Subject: Re: [PATCH v2] s390x: kvm: Fix number of cpu reports for stsi 3.2.2
Date: Tue, 31 Mar 2020 14:01:04 +0200 [thread overview]
Message-ID: <20200331140104.179fed21.cohuck@redhat.com> (raw)
In-Reply-To: <20200331110123.3774-1-frankja@linux.ibm.com>
On Tue, 31 Mar 2020 07:01:23 -0400
Janosch Frank <frankja@linux.ibm.com> wrote:
> The cpu number reporting is handled by KVM and QEMU only fills in the
> VM name, uuid and other values.
>
> Unfortunately KVM doesn't report reserved cpus and doesn't even know
> they exist until the are created via the ioctl.
>
> So let's fix up the cpu values after KVM has written its values to the
> 3.2.2 sysib. To be consistent We use the same code to retrieve the cpu
"...consistent, we..." (fixed up while applying)
> numbers as the STSI TCG code in target/s390x/misc_helper.c:HELPER(stsi).
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> ---
>
> * Fixed commit message and add rev-by
> * Calculating total_cpus from configured + reserved
>
> ---
> target/s390x/kvm.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index 3630c15f45a48864..69881a0da0b31f72 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -1819,8 +1819,10 @@ static int handle_tsch(S390CPU *cpu)
>
> static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr, uint8_t ar)
> {
> + const MachineState *ms = MACHINE(qdev_get_machine());
> + uint16_t conf_cpus = 0, reserved_cpus = 0;
> SysIB_322 sysib;
> - int del;
> + int del, i;
>
> if (s390_is_pv()) {
> s390_cpu_pv_mem_read(cpu, 0, &sysib, sizeof(sysib));
This is against s390-next; rebased and applied to s390-fixes (please
double check).
[I'm holding off rebasing s390-next on top of s390-fixes resp. master;
I'll rather do that once after all pieces including the headers update
are in place.]
prev parent reply other threads:[~2020-03-31 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 15:38 [PATCH] s390x: kvm: Fix number of cpu reports for stsi 3.2.2 Janosch Frank
2020-03-30 16:04 ` David Hildenbrand
2020-03-31 10:11 ` Cornelia Huck
2020-03-31 10:38 ` David Hildenbrand
2020-03-31 11:01 ` [PATCH v2] " Janosch Frank
2020-03-31 12:01 ` Cornelia Huck [this message]
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=20200331140104.179fed21.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).