qemu-e2k/target/s390x
David Hildenbrand 677ff32db1 s390x/cpumodel: fix segmentation fault when baselining models
Usually, when baselining two CPU models, whereby one of them has base
CPU features disabled (e.g. z14-base,msa=off), we fallback to an older
model that did not have these features in the base model. We always try to
create a "sane" CPU model (as far as possible), and one part of it is that
removing base features is no good and to be avoided.

Now, if we disable base features that were part of a z900, we're out of
luck. We won't find a CPU model and QEMU will segfault. This is a
scenario that should never happen in real life, but it can be used to
crash QEMU.

So let's properly report an error if we baseline e.g.:

{ "execute": "query-cpu-model-baseline",
  "arguments" : { "modela": { "name": "z14-base", "props": {"esan3" : false}},
                  "modelb": { "name": "z14"}} }

Instead of segfaulting.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180718092330.19465-1-david@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-07-18 14:20:02 +02:00
..
arch_dump.c compiler: add a sizeof_field() macro 2018-06-27 13:01:40 +01:00
cc_helper.c
cpu_features_def.h
cpu_features.c
cpu_features.h
cpu_models.c s390x/cpumodel: fix segmentation fault when baselining models 2018-07-18 14:20:02 +02:00
cpu_models.h
cpu-qom.h
cpu.c s390x/tcg: fix CPU hotplug with single-threaded TCG 2018-07-02 10:37:38 +02:00
cpu.h s390x/tcg: properly implement the TOD 2018-07-02 10:37:38 +02:00
crypto_helper.c
diag.c * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
excp_helper.c Make address_space_access_valid() take a MemTxAttrs argument 2018-05-31 16:32:35 +01:00
fpu_helper.c
gdbstub.c
gen-features.c s390x/cpumodel: default enable bpb and ppa15 for z196 and later 2018-07-02 10:37:38 +02:00
helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
helper.h s390x/tcg: implement SET CLOCK 2018-07-02 10:37:38 +02:00
insn-data.def s390x/tcg: implement SET CLOCK 2018-07-02 10:37:38 +02:00
insn-format.def
int_helper.c
internal.h s390x/tcg: properly implement the TOD 2018-07-02 10:37:38 +02:00
interrupt.c
ioinst.c
kvm_s390x.h s390x/tod: factor out TOD into separate device 2018-07-02 10:37:38 +02:00
kvm-stub.c s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*() 2018-07-02 10:37:38 +02:00
kvm.c s390x/kvm: indicate alignment in legacy_s390_alloc() 2018-07-02 10:37:38 +02:00
machine.c s390x/tcg: rearm the CKC timer during migration 2018-07-02 10:37:38 +02:00
Makefile.objs s390x/tcg: rearm the CKC timer during migration 2018-07-02 10:37:38 +02:00
mem_helper.c target: Do not include "exec/address-spaces.h" if it is not necessary 2018-05-31 19:12:13 +02:00
misc_helper.c s390x/tcg: fix locking problem with tcg_s390_tod_updated 2018-07-02 10:37:38 +02:00
mmu_helper.c Make address_space_access_valid() take a MemTxAttrs argument 2018-05-31 16:32:35 +01:00
sigp.c Make address_space_access_valid() take a MemTxAttrs argument 2018-05-31 16:32:35 +01:00
tcg_s390x.h s390x/tcg: properly implement the TOD 2018-07-02 10:37:38 +02:00
tcg-stub.c s390x/tcg: rearm the CKC timer during migration 2018-07-02 10:37:38 +02:00
trace-events
translate.c s390x/tcg: implement SET CLOCK 2018-07-02 10:37:38 +02:00