From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50058 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728402AbgEEJP4 (ORCPT ); Tue, 5 May 2020 05:15:56 -0400 Subject: Re: [PATCH v2] KVM: s390: Remove false WARN_ON_ONCE for the PQAP instruction References: <20200505083515.2720-1-borntraeger@de.ibm.com> From: Christian Borntraeger Message-ID: Date: Tue, 5 May 2020 11:15:49 +0200 MIME-Version: 1.0 In-Reply-To: <20200505083515.2720-1-borntraeger@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-s390-owner@vger.kernel.org List-ID: To: Janosch Frank Cc: KVM , Cornelia Huck , David Hildenbrand , linux-s390 , Qian Cai , Pierre Morel , Tony Krowiak On 05.05.20 10:35, Christian Borntraeger wrote: > 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 > Cc: Tony Krowiak > Cc: stable@vger.kernel.org > Link: https://lore.kernel.org/kvm/20200505073525.2287-1-borntraeger@de.ibm.com > Reported-by: Qian Cai > Signed-off-by: Christian Borntraeger > Reviewed-by: David Hildenbrand > Reviewed-by: Cornelia Huck > --- > arch/s390/kvm/priv.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c > index 69a824f9ef0b..893893642415 100644 > --- a/arch/s390/kvm/priv.c > +++ b/arch/s390/kvm/priv.c > @@ -626,10 +626,12 @@ static int handle_pqap(struct kvm_vcpu *vcpu) > * available for the guest are AQIC and TAPQ with the t bit set > * since we do not set IC.3 (FIII) we currently will only intercept > * the AQIC function code. > + * Note: running nested under z/VM can result in intercepts for other > + * function codes, e.g. PQAP(QCI). We do not support this and bail out. > */ > reg0 = vcpu->run->s.regs.gprs[0]; > fc = (reg0 >> 24) & 0xff; > - if (WARN_ON_ONCE(fc != 0x03)) > + if (fc != 0x03) > return -EOPNOTSUPP; > > /* PQAP instruction is allowed for guest kernel only */ > applied for kvms390/master. Qian Cai, can you verify that this fixes the issue?