Skip to content

Commit e769ece

Browse files
heicarstbonzini
authored andcommitted
KVM: s390: fix pfmf non-quiescing control handling
Fix the test within handle_pfmf() if the host has the NQ key-setting facility installed. Right now the code would incorrectly generate a program check in the guest if the NQ control bit for a pfmf request was set and if the host has the NQ key-setting facility installed. Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 2b29a9f commit e769ece

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/kvm/priv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/errno.h>
1717
#include <linux/compat.h>
1818
#include <asm/asm-offsets.h>
19+
#include <asm/facility.h>
1920
#include <asm/current.h>
2021
#include <asm/debug.h>
2122
#include <asm/ebcdic.h>
@@ -532,8 +533,7 @@ static int handle_pfmf(struct kvm_vcpu *vcpu)
532533
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
533534

534535
/* Only provide non-quiescing support if the host supports it */
535-
if (vcpu->run->s.regs.gprs[reg1] & PFMF_NQ &&
536-
S390_lowcore.stfl_fac_list & 0x00020000)
536+
if (vcpu->run->s.regs.gprs[reg1] & PFMF_NQ && !test_facility(14))
537537
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
538538

539539
/* No support for conditional-SSKE */

0 commit comments

Comments
 (0)