qemu/target/s390x
David Hildenbrand fbe8202ea8 s390x/cpumodel: improve defintion search without an IBC
Currently, under z/VM on a 0x2827, QEMU will detect a 0x2828 if no
IBC value is provided. QEMU will simply take the last model of that HW
generation, which happens to be the BC version.

Let's improve our search for that case by selecting the latest CPU
definition that matches the CPU type. This for example will avoid
detecting an z13 as a z13s.

We might still detect a GA2 version on a GA1 system, but as we don't
have further information at hand, there isn't too much we can do about
it. The alternative of always presenting the oldest GA is not backward
compatible, e.g:
You're running on 0x2827 GA2.
Old QEMU version indicated "0x2828 GA1 == 0x2827 GA2". After you updated
QEMU, you suddenly detect "0x2827 GA1". You're previous libvirt guest
might suddenly refuse to run.

In the end presenting a newer GA level does not matter because:

1: All GAX models share the same base feature set. A GAX++ might
support "more features".
2: Without an IBC, the guest can't detect the GA version.

If we have no IBC (esp. unblocked_ibc == 0), the IBC we will present
to the guest in read_SCP_info() will be 0. The guest will not know
which GA version it has. The problem of missing IBC propagates.

If we don't have a feature of the GA++ version, also our guest won't
have it. So in summary, the guest also has no idea of its GA version.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170531193434.6918-3-david@redhat.com>
Acked-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[improve patch description by reusing mailing list discussion]
2017-06-06 10:50:40 +02:00
..
arch_dump.c s390x/arch_dump: pass cpuid into notes sections 2017-02-24 10:15:18 +01:00
cc_helper.c
cpu_features_def.h
cpu_features.c
cpu_features.h
cpu_models.c s390x/cpumodel: improve defintion search without an IBC 2017-06-06 10:50:40 +02:00
cpu_models.h s390x/cpumodel: take care of the cpuid format bit for KVM 2017-06-06 10:50:40 +02:00
cpu-qom.h
cpu.c s390/kvm: do not reset riccb on initial cpu reset 2017-05-19 12:31:28 +02:00
cpu.h s390/kvm: do not reset riccb on initial cpu reset 2017-05-19 12:31:28 +02:00
fpu_helper.c
gdbstub.c * QOM interface fix (Eduardo) 2017-01-20 16:42:07 +00:00
gen-features.c
helper.c shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
helper.h target/s390x: Use atomic operations for COMPARE SWAP 2017-05-12 15:47:13 -07:00
insn-data.def target/s390x: Use atomic operations for LOAD AND OP 2017-05-12 15:47:13 -07:00
insn-format.def
int_helper.c target-s390x: Avoid a loop for popcnt 2017-01-10 08:48:57 -08:00
interrupt.c
ioinst.c s390x/css: fence off MIDA 2017-06-06 10:17:11 +02:00
kvm.c s390x/cpumodel: take care of the cpuid format bit for KVM 2017-06-06 10:50:40 +02:00
machine.c migration: consolidate VMStateField.start 2017-02-13 17:27:13 +00:00
Makefile.objs makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables 2017-03-16 11:51:15 +08:00
mem_helper.c target/s390x: Use atomic operations for COMPARE SWAP 2017-05-12 15:47:13 -07:00
misc_helper.c shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
mmu_helper.c
trace-events
translate.c target/s390x: implement serialization in BRANCH CONDITION 2017-05-12 15:48:41 -07:00