On Mon, 3 Feb 2020 08:19:56 -0500 Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote: > As PSW restart is handled by the ultravisor (and we only get a start > notification) we must re-check the PSW after a start before injecting > interrupts. > > Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > --- > arch/s390/kvm/kvm-s390.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c > index 137ae5dc9101..3e4716b3fc02 100644 > --- a/arch/s390/kvm/kvm-s390.c > +++ b/arch/s390/kvm/kvm-s390.c > @@ -4451,6 +4451,12 @@ void kvm_s390_vcpu_start(struct kvm_vcpu *vcpu) > /* Let's tell the UV that we want to start again */ > kvm_s390_pv_set_cpu_state(vcpu, PV_CPU_STATE_OPR); > kvm_s390_clear_cpuflags(vcpu, CPUSTAT_STOPPED); > + /* > + * The real PSW might have changed due to an interpreted RESTART. "a RESTART interpreted by the ultravisor" ? > + * We block all interrupts and let the next sie exit refresh our view. > + */ > + if (kvm_s390_pv_is_protected(vcpu->kvm)) > + vcpu->arch.sie_block->gpsw.mask &= ~PSW_INT_MASK; > /* > * Another VCPU might have used IBS while we were offline. > * Let's play safe and flush the VCPU at startup. Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>