public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.ibm.com>
To: Pierre Morel <pmorel@linux.ibm.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
	borntraeger@de.ibm.com, alex.williamson@redhat.com,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
	kvm@vger.kernel.org, frankja@linux.ibm.com,
	akrowiak@linux.ibm.com, david@redhat.com, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, freude@linux.ibm.com,
	mimu@linux.ibm.com
Subject: Re: [PATCH v5 1/7] s390: ap: kvm: add PQAP interception for AQIC
Date: Tue, 19 Mar 2019 15:54:21 +0100	[thread overview]
Message-ID: <20190319155421.0f0e51c2@oc2783563651> (raw)
In-Reply-To: <0351d631-b756-dd22-0848-6f30747dc5e2@linux.ibm.com>

On Tue, 19 Mar 2019 11:01:44 +0100
Pierre Morel <pmorel@linux.ibm.com> wrote:

> On 15/03/2019 18:28, Halil Pasic wrote:

[..]

> > 
> > Things get complicated when one considers that ECA.28 is an effective
> > control.
> 
> I don't think so, ECA_28 is not really a problem.
> We do not propagate ECA_AIV in VSIE and ECA_AIV is tested in the vfio 
> driver to support GISA.
> So that the guest 3 will not support interrupt.
> 

That was not my concern, but while we are at it... I guess you refer to
the check in handle_pqap(). That seems to do -EOPNOTSUPP, i.e. got to
userspace, i.e. with today's QEMU operation exception. Which does not
seem right.

My concern was the following. Let assume 
ECA.28 == 1 and EECA.28 == 0 != 1
and guest issues a PQAP (for simplicity AQIC).

Currently I guess we take a 0x04 interception and go to userspace, which
may or may not be the best thing to do.

With this patch we would take a 0x04, but (opposed to before) if guest
does not have facility 65 we go with a specification exception.
Operation exception should however take priority over this kind of
specification exception. So basically everything except PQAP/AQIC would
give you and operation exception (with current QEMU), but PQAP/AQIC would
give you a specification exception. Which is wrong!

AFAICT there is no way to tell if we got a 04 interception because
EECA.28 != 1 (and ECA.28 == 1) and FW won't interpret the AP
instructions for us, or because it PQAP/AQIC is a mandatory intercept.
In other words I don't see a way to tell if EECA.28 is 1 when
interpreting PQAP/AQIC.

Do you agree?

[..]

> 
> Yes, the alternative is:
> 
> 1) We do things right but this mean we change the ABI (SPECIFICATION 
> instead of OPERATION)
> 
> I thing this is the best thing to do, it is the implementation
> proposed by this patch where all is done in Kernel, so that we are
> right what ever the userland user is (QEMU or other).
> 
> 2) We want to preserve the old ABI for old QEMU
> Then I proposed the implementation here under.
> 
> 
> My personal opinion, is that we should change the ABI and do things 
> right now.

I tend to agree. Giving an operation exception instead of a specification
exception is a bug. If it is a kernel or qemu bug it ain't clear to me
at the moment. 

> We should also do it right for TAPQ with t bit set. I remember
> Christian already warned about this but we did not implement it.
> 

Yes, I have some blurry memories of something similar myself. I wonder
if there was a reason, or did we just forget to address this issue.

Regards,
Halil

  reply	other threads:[~2019-03-19 14:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 16:04 [PATCH v5 0/7] vfio: ap: AP Queue Interrupt Control Pierre Morel
2019-03-13 16:04 ` [PATCH v5 1/7] s390: ap: kvm: add PQAP interception for AQIC Pierre Morel
2019-03-15 10:20   ` Cornelia Huck
2019-03-15 13:26     ` Pierre Morel
2019-03-15 13:41       ` Cornelia Huck
2019-03-15 13:44         ` Pierre Morel
2019-03-15 14:10       ` Pierre Morel
2019-03-15 17:43         ` Halil Pasic
2019-03-19  9:55         ` Pierre Morel
2019-03-15 17:28       ` Halil Pasic
2019-03-19 10:01         ` Pierre Morel
2019-03-19 14:54           ` Halil Pasic [this message]
2019-03-19 17:07             ` Pierre Morel
2019-03-21 14:05               ` Pierre Morel
2019-03-13 16:04 ` [PATCH v5 2/7] s390: ap: new vfio_ap_queue structure Pierre Morel
2019-03-15 10:33   ` Cornelia Huck
2019-03-15 13:29     ` Pierre Morel
2019-03-13 16:05 ` [PATCH v5 3/7] vfio: ap: register IOMMU VFIO notifier Pierre Morel
2019-03-13 16:05 ` [PATCH v5 4/7] s390: ap: setup relation betwen KVM and mediated device Pierre Morel
2019-03-15 18:15   ` Halil Pasic
2019-03-19  9:38     ` Pierre Morel
2019-03-19 11:54       ` Halil Pasic
2019-03-19 14:23         ` Pierre Morel
2019-03-19 14:47           ` Pierre Morel
2019-03-19 15:27             ` Halil Pasic
2019-03-19 16:48               ` Pierre Morel
2019-03-13 16:05 ` [PATCH v5 5/7] s390: ap: implement PAPQ AQIC interception in kernel Pierre Morel
2019-03-13 16:05 ` [PATCH v5 6/7] s390: ap: Cleanup on removing the AP device Pierre Morel
2019-03-13 16:05 ` [PATCH v5 7/7] s390: ap: kvm: Enable PQAP/AQIC facility for the guest Pierre Morel

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=20190319155421.0f0e51c2@oc2783563651 \
    --to=pasic@linux.ibm.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mimu@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=schwidefsky@de.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