]> git.ipfire.org Git - thirdparty/qemu.git/commit
s390x/tcg: Fix CPU address returned by STIDP
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 5 Jun 2023 11:39:47 +0000 (13:39 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 7 Jun 2023 09:04:45 +0000 (12:04 +0300)
commit03727054dce3131529ca5668ffd653470000064d
tree28b95a3a973b7ad436074f8ff9922f896ca61fc7
parentc06ca3aa33b039c09166334ebc417a89bf2ecfec
s390x/tcg: Fix CPU address returned by STIDP

In qemu-user-s390x, /proc/cpuinfo contains:

processor 0: version = 00,  identification = 000000,  machine = 8561
processor 1: version = 00,  identification = 400000,  machine = 8561

The highest nibble is supposed to contain the CPU address, but it's off
by 2 bits. Fix the shift value and provide a symbolic constant for it.

With the fix we get:

processor 0: version = 00,  identification = 000000,  machine = 8561
processor 1: version = 00,  identification = 100000,  machine = 8561

Fixes: 076d4d39b65f ("s390x/cpumodel: wire up cpu type + id for TCG")
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230605113950.1169228-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 71b11cbe1c34411238703abe24bfaf2e9712c30d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/s390x/cpu_models.c
target/s390x/cpu_models.h