On 20/11/2019 12.43, Janosch Frank wrote: > Handling of CPU reset and setting of the IPL psw from guest storage at > offset 0 is done by a Ultravisor call. Let's only fetch it if > necessary. > > Signed-off-by: Janosch Frank <fran...@linux.ibm.com> > --- > hw/s390x/pv.c | 5 +++++ > hw/s390x/pv.h | 1 + > hw/s390x/s390-virtio-ccw.c | 3 ++- > linux-headers/linux/kvm.h | 1 + > target/s390x/cpu.c | 9 ++++++++- > 5 files changed, 17 insertions(+), 2 deletions(-) [...] > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index 6fd50b4c42..e020b92854 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -404,7 +404,8 @@ static void s390_machine_reset(MachineState *machine) > s390_ipl_pv_unpack(); > /* Verify integrity */ > s390_pv_verify(); > - s390_cpu_set_state(S390_CPU_STATE_OPERATING, cpu); > + env->pv = true;
Ah, here you set env->pv = true manually ... so maybe that's another good reason to get rid of patch 05/15 ("s390x: protvirt: Sync PV state") in the end? Reviewed-by: Thomas Huth <th...@redhat.com>