From mboxrd@z Thu Jan 1 00:00:00 1970 From: Halil Pasic Subject: Re: [PATCH RFC 2/2] vfio-ccw: support for halt/clear subchannel Date: Fri, 8 Jun 2018 15:13:28 +0200 Message-ID: References: <20180509154822.23510-1-cohuck@redhat.com> <20180509154822.23510-3-cohuck@redhat.com> <20180515181006.0cb1dfc2.cohuck@redhat.com> <20180522145208.310143ea.cohuck@redhat.com> <4e4001cc-540e-0f2b-bbd1-1f82ca594bb3@linux.ibm.com> <20180605151449.22aafbfc.cohuck@redhat.com> <20180606142131.74ea2eb7.cohuck@redhat.com> <5b77ec9c-41b8-2e32-ce79-d9005b93fdd0@linux.ibm.com> <20180607115442.6a779ed9.cohuck@redhat.com> <86d57698-3ea7-a390-2217-07c6d41ca9ed@linux.ibm.com> <20180608142022.7dd6a658.cohuck@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180608142022.7dd6a658.cohuck@redhat.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: To: Cornelia Huck , Pierre Morel Cc: Dong Jia Shi , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, qemu-s390x@nongnu.org, qemu-devel@nongnu.org List-ID: 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). Regards, Halil