Skip to content

Commit 5615e74

Browse files
committed
KVM: s390: Remove false WARN_ON_ONCE for the PQAP instruction
In LPAR we will only get an intercept for FC==3 for the PQAP instruction. Running nested under z/VM can result in other intercepts as well as ECA_APIE is an effective bit: If one hypervisor layer has turned this bit off, the end result will be that we will get intercepts for all function codes. Usually the first one will be a query like PQAP(QCI). So the WARN_ON_ONCE is not right. Let us simply remove it. Cc: Pierre Morel <[email protected]> Cc: Tony Krowiak <[email protected]> Cc: [email protected] # v5.3+ Fixes: e5282de ("s390: ap: kvm: add PQAP interception for AQIC") Link: https://lore.kernel.org/kvm/[email protected] Reported-by: Qian Cai <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]>
1 parent 2a173ec commit 5615e74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/s390/kvm/priv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,12 @@ static int handle_pqap(struct kvm_vcpu *vcpu)
626626
* available for the guest are AQIC and TAPQ with the t bit set
627627
* since we do not set IC.3 (FIII) we currently will only intercept
628628
* the AQIC function code.
629+
* Note: running nested under z/VM can result in intercepts for other
630+
* function codes, e.g. PQAP(QCI). We do not support this and bail out.
629631
*/
630632
reg0 = vcpu->run->s.regs.gprs[0];
631633
fc = (reg0 >> 24) & 0xff;
632-
if (WARN_ON_ONCE(fc != 0x03))
634+
if (fc != 0x03)
633635
return -EOPNOTSUPP;
634636

635637
/* PQAP instruction is allowed for guest kernel only */

0 commit comments

Comments
 (0)