On Tue, 22 May 2018 17:10:44 +0200
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:
On 22/05/2018 14:52, Cornelia Huck wrote:[starting to look at this again]
On Wed, 16 May 2018 15:32:48 +0200
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:
On 15/05/2018 18:10, Cornelia Huck wrote:I found this to be a very easy way to implement halt/clear. This still
On Fri, 11 May 2018 11:33:35 +0200Why should we allow multiple commands in a single call ?
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:
On 09/05/2018 17:48, Cornelia Huck wrote:There may be multiple functions specified, but we need to process them
@@ -126,7 +192,24 @@ static void fsm_io_request(struct vfio_ccw_private *private,hum. The scsw here does not reflect the hardware state but the
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.
+ */
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.
in precedence order (and clear wins over the others, so to speak).
Would adding a sentence like "we always process just one function" help?
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.
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.It also mirrors the hardware, no?
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".Yes. There is a lot of common handling for each of these.
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 clearIt mirrors what the hardware does: you just set an additional bit if
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
processing has not yet finished.
- if yes, why should clear have precedence ?Because it does on the hardware?
 How do QEMU set more than one bit in fctl?In the future, we should return after we fired off the start etc.
 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?
request even if we did not receive an interrupt yet, so that the guest
might do a halt or clear before the start has finished.
IOW, make thisYes I think it is feasible and it is what we need to do.
as asynchronous as the hardware. That's why I'd like to simply
accumulate the things. The architecture already specified what happens
in the response.
Do you think that is feasible?