From: Cornelia Huck <cohuck@redhat.com>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v7 09/22] s390: vfio-ap: register matrix device with VFIO mdev framework
Date: Thu, 02 Aug 2018 11:18:53 +0000 [thread overview]
Message-ID: <20180802131853.2f2290c7.cohuck@redhat.com> (raw)
In-Reply-To: <46d292dd-7578-1ba6-4561-d42a6441debf@linux.ibm.com>
On Wed, 1 Aug 2018 17:34:26 -0400
Tony Krowiak <akrowiak@linux.ibm.com> wrote:
> On 07/27/2018 07:26 AM, Halil Pasic wrote:
> >
> >
> > On 07/27/2018 01:17 PM, Cornelia Huck wrote:
> >> On Fri, 27 Jul 2018 13:13:40 +0200
> >> Halil Pasic <pasic@linux.ibm.com> wrote:
> >>
> >>>>> @@ -65,6 +66,21 @@ static int vfio_ap_matrix_dev_create(void)
> >>>>> {
> >>>>> int ret;
> >>>>> + mutex_init(&matrix_dev.lock);
> >>>>> + INIT_LIST_HEAD(&matrix_dev.mdev_list);
> >>>>> +
> >>>>> + /* Test if PQAP(QCI) instruction is available */
> >>>>> + if (test_facility(12)) {
> >>>>> + ret = ap_qci(&matrix_dev.info);
> >>>>> + if (ret && (ret != -EOPNOTSUPP)) {
> >>>>
> >>>> So, is facility 12 a pre-req for PQAP(QCI)? Can the code work if
> >>>> matrix_dev.info is not populated?
> >>>
> >>> Yes and yes. It's basically only used in vfio_ap_matrix_init() and it
> >>> has fallbacks.
> >>
> >> Ok. So facility 12 is required but not sufficient for PQAP(QCI) to be
> >> available? (Just asking as I cannot check the doc; if it works with
> >> fallbacks I'm fine.)
>
> I took a look at the ap_qci() function. It returns:
>
> 0: success
> -EOPNOTSUPP: returned when an exception occurs executing the
> PQAP(QCI) instruction
>
> I conclude that if STFLE.12 is set, then the PQAP(QCI) instruction
> should work. If -ENOPNOTSUPP is returned, then this would be a
> serious error and I think we should return an error from this function.
Sounds reasonable to me.
>
> >>
> >
> > AFAIR it should be sufficient in our case. My guess is that the non 0
> > return code stands for program exceptions that are not related to the
> > availability of QCI.
>
>
>
>
next parent reply other threads:[~2018-08-02 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46d292dd-7578-1ba6-4561-d42a6441debf@linux.ibm.com>
2018-08-02 11:18 ` Cornelia Huck [this message]
[not found] <6a31797f-c8be-bb3d-c515-029ec52a56bf@linux.ibm.com>
2018-07-30 14:18 ` [PATCH v7 09/22] s390: vfio-ap: register matrix device with VFIO mdev framework Halil Pasic
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=20180802131853.2f2290c7.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/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