From: Pierre Morel <pmorel@linux.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Dong Jia Shi <bjsdjshi@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>,
linux-s390@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, qemu-s390x@nongnu.org,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC 2/2] vfio-ccw: support for halt/clear subchannel
Date: Tue, 22 May 2018 17:10:44 +0200 [thread overview]
Message-ID: <4e4001cc-540e-0f2b-bbd1-1f82ca594bb3@linux.ibm.com> (raw)
In-Reply-To: <20180522145208.310143ea.cohuck@redhat.com>
On 22/05/2018 14:52, Cornelia Huck wrote:
> On Wed, 16 May 2018 15:32:48 +0200
> Pierre Morel <pmorel@linux.ibm.com> wrote:
>
>> On 15/05/2018 18:10, Cornelia Huck wrote:
>>> On Fri, 11 May 2018 11:33:35 +0200
>>> Pierre Morel <pmorel@linux.ibm.com> wrote:
>>>
>>>> On 09/05/2018 17:48, Cornelia Huck wrote:
>>>>> @@ -126,7 +192,24 @@ static void fsm_io_request(struct vfio_ccw_private *private,
>>>>>
>>>>> memcpy(scsw, io_region->scsw_area, sizeof(*scsw));
>>>>>
>>>>> - if (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) {
>>>>> + /*
>>>>> + * Start processing with the clear function, then halt, then start.
>>>>> + * We may still be start pending when the caller wants to clean
>>>>> + * up things via halt/clear.
>>>>> + */
>>>> hum. The scsw here does not reflect the hardware state but the
>>>> command passed from the user interface.
>>>> Can we and should we authorize multiple commands in one call?
>>>>
>>>> If not, the comment is not appropriate and a switch on cmd.fctl
>>>> would be a clearer.
>>> There may be multiple functions specified, but we need to process them
>>> in precedence order (and clear wins over the others, so to speak).
>>> Would adding a sentence like "we always process just one function" help?
>> Why should we allow multiple commands in a single call ?
>> It brings no added value.
>> Is there a use case?
>> Currently QEMU does not do this and since we only have the SCSH there
>> is no difference having the bit set alone or not alone.
> I found this to be a very easy way to implement halt/clear. This still
> holds true if we switch to some kind of capabilities for this (did not
> have time to look at this further, though).
>
> As we have the fctl field anyway, I'm in favour of processing this all
> in one function.
>
Sorry, I do not understand if we agree or not.
I agree we have the fctl field and we must continue to use it
for backward compatibility.
I do not understand the "processing all in one function".
Since yo already have 3 function to process these three instructions.
Do you mean the if .. else if .. else if ?
Then I come back to what you said earlier on the precedence of the clear
instruction:
1) do we have a use case to have more than one bit set in the fctl field?
- if no, there is no need for precedence
- if yes, why should clear have precedence ?
How do QEMU set more than one bit in fctl?
why should we alter the order of the instructions given by the guest?
How can we know this order if there are multiple instructions at once?
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
next prev parent reply other threads:[~2018-05-22 15:11 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 15:48 [Qemu-devel] [PATCH RFC 0/2] vfio-ccw: support for {halt, clear} subchannel Cornelia Huck
2018-05-09 15:48 ` [Qemu-devel] [PATCH RFC 1/2] s390/cio: export hsch to modules Cornelia Huck
2018-05-11 9:36 ` Pierre Morel
2018-05-09 15:48 ` [Qemu-devel] [PATCH RFC 2/2] vfio-ccw: support for halt/clear subchannel Cornelia Huck
2018-05-11 9:33 ` Pierre Morel
2018-05-15 16:10 ` Cornelia Huck
2018-05-16 13:32 ` Pierre Morel
2018-05-22 12:52 ` Cornelia Huck
2018-05-22 15:10 ` Pierre Morel [this message]
2018-06-05 13:14 ` Cornelia Huck
2018-06-05 15:23 ` Pierre Morel
2018-06-05 15:36 ` Cornelia Huck
2018-06-06 12:21 ` Cornelia Huck
2018-06-06 14:15 ` Pierre Morel
2018-06-07 9:54 ` Cornelia Huck
2018-06-07 16:17 ` [Qemu-devel] [qemu-s390x] " Halil Pasic
2018-06-07 16:34 ` Cornelia Huck
2018-06-08 20:40 ` Halil Pasic
2018-06-11 11:12 ` Cornelia Huck
2018-06-11 16:00 ` Cornelia Huck
2018-06-07 16:37 ` [Qemu-devel] " Pierre Morel
2018-06-08 12:20 ` Cornelia Huck
2018-06-08 13:13 ` Halil Pasic
2018-06-08 14:45 ` Cornelia Huck
2018-06-08 15:51 ` Pierre Morel
2018-06-12 9:59 ` Cornelia Huck
2018-06-12 13:56 ` Pierre Morel
2018-06-12 14:08 ` Halil Pasic
2018-06-12 15:25 ` Cornelia Huck
2018-06-08 21:10 ` 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=4e4001cc-540e-0f2b-bbd1-1f82ca594bb3@linux.ibm.com \
--to=pmorel@linux.ibm.com \
--cc=bjsdjshi@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.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;
as well as URLs for NNTP newsgroup(s).