kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>
Cc: KVM <kvm@vger.kernel.org>,
	Janosch Frank <frankja@linux.vnet.ibm.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 15:09:42 +0200	[thread overview]
Message-ID: <328f4d06-5c1e-5255-cb4f-e8534f2171bf@redhat.com> (raw)
In-Reply-To: <a8688ff1-edc6-fdd8-9575-adbf726f9f06@redhat.com>

On 06.05.20 15:04, Paolo Bonzini wrote:
> On 06/05/20 14:23, Christian Borntraeger wrote:
>>
>> 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.
> 
> Right, and I'd understand, that since KVM has set ECA_APIE=1, z/VM
> should either:
> 
> * not forward the intercept to KVM unless FC==3
> 
> * toggle ECA_APIE back to 1 while running the KVM nested guest.
> 
> Of course I have no idea if either of these choices is impossible, or
> too expensive, but this is how we'd try to handle it for x86 features.
> 
> So it would be a z/VM bug, because it's not virtualizing ECA_APIE=1
> correctly.  The next question is, if removing the WARN_ON is okay for
> you, should KVM not bother setting ECA_APIE=1 so that you don't trigger
> the z/VM bug at all?
> 

IIRC, it's perfectly valid - according to the documentation - to ignore
ECA_APIE. That's the weird thing about effective controls. You don't
really know what you get in the end.

But, it's a long time since I had the chance to look at that
documentation ...

-- 
Thanks,

David / dhildenb


  reply	other threads:[~2020-05-06 13:09 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
2020-05-06 13:04       ` Paolo Bonzini
2020-05-06 13:09         ` David Hildenbrand [this message]
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=328f4d06-5c1e-5255-cb4f-e8534f2171bf@redhat.com \
    --to=david@redhat.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cailca@icloud.com \
    --cc=cohuck@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).