All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Halil Pasic <pasic@linux.ibm.com>
Cc: Pierre Morel <pmorel@linux.ibm.com>,
	Dong Jia Shi <bjsdjshi@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: [PATCH RFC 2/2] vfio-ccw: support for halt/clear subchannel
Date: Fri, 8 Jun 2018 16:45:14 +0200	[thread overview]
Message-ID: <20180608164514.2e8248f4.cohuck@redhat.com> (raw)
In-Reply-To: <d68340a2-bb1b-cef9-e394-f0d55983c0bb@linux.ibm.com>

On Fri, 8 Jun 2018 15:13:28 +0200
Halil Pasic <pasic@linux.ibm.com> wrote:

> On 06/08/2018 02:20 PM, Cornelia Huck wrote:
> >>> My proposal is to do the same
> >>> copying to scsw(r) again, which would mean we get a request with both
> >>> the halt and the start bit set. The vfio code now needs to do a hsch
> >>> (instead of a ssch). The real channel subsystem should figure this out,
> >>> as we can't reliably check whether the start function has concluded
> >>> already (there's always a race window).  
> >> This I do not agree scsw(r) is part of the driver.
> >> The interface here is not a device interface anymore but a driver
> >> interface.
> >> SCSW is a status, it is at its place in QEMU device interface with the
> >> guest
> >> but here pwrite() sends a command.  
> > Hm, I rather consider that "we write a status, and the backend figures
> > out what to do based on that status".
> >   
> 
> The status of what? Kind of a target status?
> 
> I think this approach is the source of lots of complications. For instance
> take xsch. How are we supposed to react to a guest xsch (in QEMU and
> in the kernel module)? My guess is that the right thing to do is to issue
> an xsch in the vfio-ccw kernel module on the passed through subchannel.
> But there is no bit in fctl for cancel.
> 
> Bottom line is: I'm not happy with the current design but I'm not sure
> if it's practical to do something about it (i.e. change it radically).

It might make sense to keep this for ssch, maybe reuse it for hsch/csch,
and think about something else for other things we want to handle
(xsch, channel monitoring, the path handling stuff for which we already
had a prototype etc.) It's probably not practical to do radical surgery
on the existing code.

[Speaking of which: Is there any current effort on the path handling
things?]

WARNING: multiple messages have this Message-ID (diff)
From: Cornelia Huck <cohuck@redhat.com>
To: Halil Pasic <pasic@linux.ibm.com>
Cc: Pierre Morel <pmorel@linux.ibm.com>,
	Dong Jia Shi <bjsdjshi@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: Fri, 8 Jun 2018 16:45:14 +0200	[thread overview]
Message-ID: <20180608164514.2e8248f4.cohuck@redhat.com> (raw)
In-Reply-To: <d68340a2-bb1b-cef9-e394-f0d55983c0bb@linux.ibm.com>

On Fri, 8 Jun 2018 15:13:28 +0200
Halil Pasic <pasic@linux.ibm.com> wrote:

> On 06/08/2018 02:20 PM, Cornelia Huck wrote:
> >>> My proposal is to do the same
> >>> copying to scsw(r) again, which would mean we get a request with both
> >>> the halt and the start bit set. The vfio code now needs to do a hsch
> >>> (instead of a ssch). The real channel subsystem should figure this out,
> >>> as we can't reliably check whether the start function has concluded
> >>> already (there's always a race window).  
> >> This I do not agree scsw(r) is part of the driver.
> >> The interface here is not a device interface anymore but a driver
> >> interface.
> >> SCSW is a status, it is at its place in QEMU device interface with the
> >> guest
> >> but here pwrite() sends a command.  
> > Hm, I rather consider that "we write a status, and the backend figures
> > out what to do based on that status".
> >   
> 
> The status of what? Kind of a target status?
> 
> I think this approach is the source of lots of complications. For instance
> take xsch. How are we supposed to react to a guest xsch (in QEMU and
> in the kernel module)? My guess is that the right thing to do is to issue
> an xsch in the vfio-ccw kernel module on the passed through subchannel.
> But there is no bit in fctl for cancel.
> 
> Bottom line is: I'm not happy with the current design but I'm not sure
> if it's practical to do something about it (i.e. change it radically).

It might make sense to keep this for ssch, maybe reuse it for hsch/csch,
and think about something else for other things we want to handle
(xsch, channel monitoring, the path handling stuff for which we already
had a prototype etc.) It's probably not practical to do radical surgery
on the existing code.

[Speaking of which: Is there any current effort on the path handling
things?]

  reply	other threads:[~2018-06-08 14:45 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 15:48 [PATCH RFC 0/2] vfio-ccw: support for {halt,clear} subchannel Cornelia Huck
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 ` [PATCH RFC 1/2] s390/cio: export hsch to modules Cornelia Huck
2018-05-09 15:48   ` [Qemu-devel] " Cornelia Huck
2018-05-11  9:36   ` Pierre Morel
2018-05-11  9:36     ` [Qemu-devel] " Pierre Morel
2018-05-09 15:48 ` [PATCH RFC 2/2] vfio-ccw: support for halt/clear subchannel Cornelia Huck
2018-05-09 15:48   ` [Qemu-devel] " Cornelia Huck
2018-05-11  9:33   ` Pierre Morel
2018-05-11  9:33     ` [Qemu-devel] " Pierre Morel
2018-05-15 16:10     ` Cornelia Huck
2018-05-15 16:10       ` [Qemu-devel] " Cornelia Huck
2018-05-16 13:32       ` Pierre Morel
2018-05-16 13:32         ` [Qemu-devel] " Pierre Morel
2018-05-22 12:52         ` Cornelia Huck
2018-05-22 12:52           ` [Qemu-devel] " Cornelia Huck
2018-05-22 15:10           ` Pierre Morel
2018-05-22 15:10             ` [Qemu-devel] " Pierre Morel
2018-06-05 13:14             ` Cornelia Huck
2018-06-05 13:14               ` [Qemu-devel] " Cornelia Huck
2018-06-05 15:23               ` Pierre Morel
2018-06-05 15:23                 ` [Qemu-devel] " Pierre Morel
2018-06-05 15:36                 ` Cornelia Huck
2018-06-05 15:36                   ` [Qemu-devel] " Cornelia Huck
2018-06-06 12:21                 ` Cornelia Huck
2018-06-06 12:21                   ` [Qemu-devel] " Cornelia Huck
2018-06-06 14:15                   ` Pierre Morel
2018-06-06 14:15                     ` [Qemu-devel] " Pierre Morel
2018-06-07  9:54                     ` Cornelia Huck
2018-06-07  9:54                       ` [Qemu-devel] " Cornelia Huck
2018-06-07 16:17                       ` [qemu-s390x] " Halil Pasic
2018-06-07 16:17                         ` [Qemu-devel] " Halil Pasic
2018-06-07 16:34                         ` Cornelia Huck
2018-06-07 16:34                           ` [Qemu-devel] " Cornelia Huck
2018-06-08 20:40                           ` Halil Pasic
2018-06-08 20:40                             ` [Qemu-devel] " Halil Pasic
2018-06-11 11:12                             ` Cornelia Huck
2018-06-11 11:12                               ` [Qemu-devel] " Cornelia Huck
2018-06-11 16:00                             ` Cornelia Huck
2018-06-11 16:00                               ` [Qemu-devel] " Cornelia Huck
2018-06-07 16:37                       ` Pierre Morel
2018-06-07 16:37                         ` [Qemu-devel] " Pierre Morel
2018-06-08 12:20                         ` Cornelia Huck
2018-06-08 12:20                           ` [Qemu-devel] " Cornelia Huck
2018-06-08 13:13                           ` Halil Pasic
2018-06-08 13:13                             ` [Qemu-devel] " Halil Pasic
2018-06-08 14:45                             ` Cornelia Huck [this message]
2018-06-08 14:45                               ` Cornelia Huck
2018-06-08 15:51                               ` Pierre Morel
2018-06-08 15:51                                 ` [Qemu-devel] " Pierre Morel
2018-06-12  9:59                                 ` Cornelia Huck
2018-06-12  9:59                                   ` [Qemu-devel] " Cornelia Huck
2018-06-12 13:56                                   ` Pierre Morel
2018-06-12 13:56                                     ` [Qemu-devel] " Pierre Morel
2018-06-12 14:08                                     ` Halil Pasic
2018-06-12 14:08                                       ` [Qemu-devel] " Halil Pasic
2018-06-12 15:25                                       ` Cornelia Huck
2018-06-12 15:25                                         ` [Qemu-devel] " 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=20180608164514.2e8248f4.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=bjsdjshi@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.