We need to know if we run in pv state or not when emulating instructions. Signed-off-by: Janosch Frank <fran...@linux.ibm.com> --- hw/s390x/s390-virtio-ccw.c | 2 ++ target/s390x/cpu.h | 1 + 2 files changed, 3 insertions(+)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index e2a302398d..6fcd695b81 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -357,6 +357,7 @@ static void s390_machine_reset(MachineState *machine) s390_pv_vcpu_destroy(t); } s390_pv_vm_destroy(); + env->pv = false; } qemu_devices_reset(); @@ -406,6 +407,7 @@ static void s390_machine_reset(MachineState *machine) s390_ipl_pv_unpack(); /* Verify integrity */ s390_pv_verify(); + env->pv = true; s390_cpu_set_state(S390_CPU_STATE_OPERATING, cpu); break; default: diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index d2af13b345..43e6c286d2 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -116,6 +116,7 @@ struct CPUS390XState { /* Fields up to this point are cleared by a CPU reset */ struct {} end_reset_fields; + bool pv; /* protected virtualization */ #if !defined(CONFIG_USER_ONLY) uint32_t core_id; /* PoP "CPU address", same as cpu_index */ -- 2.20.1