From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
Janosch Frank <frankja@linux.vnet.ibm.com>,
David Hildenbrand <david@redhat.com>,
Cornelia Huck <cohuck@redhat.com>,
linux-s390 <linux-s390@vger.kernel.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Tony Krowiak <akrowiak@linux.ibm.com>,
Pierre Morel <pmorel@linux.ibm.com>, Qian Cai <cailca@icloud.com>
Subject: [GIT PULL 1/1] KVM: s390: Remove false WARN_ON_ONCE for the PQAP instruction
Date: Wed, 6 May 2020 13:59:45 +0200 [thread overview]
Message-ID: <20200506115945.13132-2-borntraeger@de.ibm.com> (raw)
In-Reply-To: <20200506115945.13132-1-borntraeger@de.ibm.com>
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 <pmorel@linux.ibm.com>
Cc: Tony Krowiak <akrowiak@linux.ibm.com>
Cc: stable@vger.kernel.org # v5.3+
Fixes: e5282de93105 ("s390: ap: kvm: add PQAP interception for AQIC")
Link: https://lore.kernel.org/kvm/20200505083515.2720-1-borntraeger@de.ibm.com
Reported-by: Qian Cai <cailca@icloud.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
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 */
--
2.25.4
next prev parent reply other threads:[~2020-05-06 11:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 11:59 [GIT PULL 0/1] KVM: s390: Fix for running nested under z/VM Christian Borntraeger
2020-05-06 11:59 ` Christian Borntraeger [this message]
2020-05-06 12:12 ` [GIT PULL 1/1] KVM: s390: Remove false WARN_ON_ONCE for the PQAP instruction Paolo Bonzini
2020-05-06 12:23 ` Christian Borntraeger
2020-05-06 13:04 ` Paolo Bonzini
2020-05-06 13:09 ` David Hildenbrand
2020-05-06 16:32 ` Paolo Bonzini
2020-05-06 13:10 ` Christian Borntraeger
2020-05-06 12:12 ` [GIT PULL 0/1] KVM: s390: Fix for running nested under z/VM Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200506115945.13132-2-borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=cailca@icloud.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=pmorel@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).