s390x: kvm: Fix number of cpu reports for stsi 3.2.2
commitedd075ae2baebf64b74e089457af6201362c9343
authorJanosch Frank <frankja@linux.ibm.com>
Tue, 31 Mar 2020 11:01:23 +0000 (31 07:01 -0400)
committerCornelia Huck <cohuck@redhat.com>
Thu, 2 Apr 2020 09:44:17 +0000 (2 11:44 +0200)
treef2bf9c99e76254b9d4f15399bf7cd8418e098a5e
parent2833ad487cfff7dc33703e4731b75facde1c561e
s390x: kvm: Fix number of cpu reports for stsi 3.2.2

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
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>
Message-Id: <20200331110123.3774-1-frankja@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/kvm.c