KVM: s390: disabled wait cares about machine checks, not PER
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 28 Sep 2015 11:32:38 +0000 (13:32 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 13 Oct 2015 13:50:32 +0000 (15:50 +0200)
We don't care about program event recording irqs (synchronous
program irqs) but asynchronous irqs when checking for disabled
wait. Machine checks were missing.

Let's directly switch to the functions we have for that purpose
instead of testing once again for magic bits.

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/interrupt.c

index ab9f525aa7cd8afb2c737957e9dbd31167d1b049..1058240b3db3dae3e33dd513876d297f1e60c30b 100644 (file)
@@ -51,11 +51,9 @@ static int psw_mchk_disabled(struct kvm_vcpu *vcpu)
 
 static int psw_interrupts_disabled(struct kvm_vcpu *vcpu)
 {
-       if ((vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PER) ||
-           (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_IO) ||
-           (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_EXT))
-               return 0;
-       return 1;
+       return psw_extint_disabled(vcpu) &&
+              psw_ioint_disabled(vcpu) &&
+              psw_mchk_disabled(vcpu);
 }
 
 static int ckc_interrupts_enabled(struct kvm_vcpu *vcpu)