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>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Tony Krowiak <akrowiak@linux.ibm.com>,
Pierre Morel <pmorel@linux.ibm.com>, Qian Cai <cailca@icloud.com>
Subject: Re: [GIT PULL 1/1] KVM: s390: Remove false WARN_ON_ONCE for the PQAP instruction
Date: Wed, 6 May 2020 14:23:12 +0200 [thread overview]
Message-ID: <fe991071-25d0-3842-73cc-23cb365850f3@de.ibm.com> (raw)
In-Reply-To: <bcd98cbd-1e28-47a2-6cbd-668da4ddb9f5@redhat.com>
On 06.05.20 14:12, Paolo Bonzini wrote:
> On 06/05/20 13:59, Christian Borntraeger wrote:
>> 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.
>
> Possibly stupid question since I can only recognize some words here. :)
> But anyway... shouldn't z/VM trap this intercept when the guest has
> turned off the bit, and only reflect the SIE exit based on the function
> code?
So here is my theory.
the problem is that z/VM seems to have disabled that bit. The interpretion
only works when all layers have this bit set. (Its called an effective bit).
So we have
LPAR -> ECA_APIE = 1
Z/VM -> ECA_APIE = 0
KVM -> ECA_APIE = 1
nested KVM guest --> does during boot in ap_instructions_available PQAP with
FC==0 to test if crypto is available.
As the nested guest is in fact a shadow guest of z/VM
this will now intercept to z/VM, which will forward that to KVM.
As PQAP with FC==0 DOES work in the KVM, KVM believes that we have crypto
support and we will enable it for our guests. So all the early checks in
handle_pqap will succeed until we run in the check for fc!=3.
In the end this is obviously a case how this warning can trigger. So we better
remove it and rely on the error path to clean up.
next prev parent reply other threads:[~2020-05-06 12:23 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 ` [GIT PULL 1/1] KVM: s390: Remove false WARN_ON_ONCE for the PQAP instruction Christian Borntraeger
2020-05-06 12:12 ` Paolo Bonzini
2020-05-06 12:23 ` Christian Borntraeger [this message]
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=fe991071-25d0-3842-73cc-23cb365850f3@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