]> 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:36:29 +0000 (12:36 +0300)
commit454d4e438022161c6488753a7b90e4f42dc7abbc
tree49965e366add35efbae1f69b15f884fd57a604c0
parent5cd229064af827e4ac8f178107352efab5715dab
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