[PATCH 0/1] vfio-ccw: Fix garbage sense data on I/O error

Eric Farman posted 1 patch 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/next-importer-push tags/patchew/20210610202011.391029-1-farman@linux.ibm.com
Maintainers: David Hildenbrand <david@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Eric Farman <farman@linux.ibm.com>, Alex Williamson <alex.williamson@redhat.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, Halil Pasic <pasic@linux.ibm.com>, Thomas Huth <thuth@redhat.com>
hw/s390x/css.c | 3 ++-
hw/vfio/ccw.c  | 6 ------
2 files changed, 2 insertions(+), 7 deletions(-)

[PATCH 0/1] vfio-ccw: Fix garbage sense data on I/O error

Posted by Eric Farman 1 week, 3 days ago
Hi Conny,

Per our offline discussion, here's a fix for the error when a guest
issues "dasdfmt -M quick". It basically reverts commit 334e76850bbb
("vfio/ccw: update sense data if a unit check is pending")
and modifies the check that builds sense data in the TSCH handler.

I opted to NOT disable PMCW.CSENSE, because doing so prevents
vfio-ccw devices from coming online at all (didn't pursue deep
enough to explain why). Turning it off in reaction to a unit
check (in this now-reverted codepath) works, but only because of
the corresponding PMCW.CSENSE check in the TSCH code.

I don't know if anything is needed for the (unaltered) ECW data
that commit b498484ed49a ("s390x/css: sense data endianness")
addressed for the copied sense_data bytes, but figure we can
use this as a starting point. Thoughts?

Eric Farman (1):
  vfio-ccw: Keep passthrough sense data intact

 hw/s390x/css.c | 3 ++-
 hw/vfio/ccw.c  | 6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)

-- 
2.25.1


Re: [PATCH 0/1] vfio-ccw: Fix garbage sense data on I/O error

Posted by Cornelia Huck 1 week, 3 days ago
On Thu, Jun 10 2021, Eric Farman <farman@linux.ibm.com> wrote:

> Hi Conny,
>
> Per our offline discussion, here's a fix for the error when a guest
> issues "dasdfmt -M quick". It basically reverts commit 334e76850bbb
> ("vfio/ccw: update sense data if a unit check is pending")
> and modifies the check that builds sense data in the TSCH handler.
>
> I opted to NOT disable PMCW.CSENSE, because doing so prevents
> vfio-ccw devices from coming online at all (didn't pursue deep
> enough to explain why). Turning it off in reaction to a unit
> check (in this now-reverted codepath) works, but only because of
> the corresponding PMCW.CSENSE check in the TSCH code.

It's a bit puzzling why fencing it off in msch doesn't work; but maybe
it would not be the right thing to do anyway, if we can support some
concurrent sense operations. I'm still reading the PoP.

>
> I don't know if anything is needed for the (unaltered) ECW data
> that commit b498484ed49a ("s390x/css: sense data endianness")
> addressed for the copied sense_data bytes, but figure we can
> use this as a starting point. Thoughts?
>
> Eric Farman (1):
>   vfio-ccw: Keep passthrough sense data intact
>
>  hw/s390x/css.c | 3 ++-
>  hw/vfio/ccw.c  | 6 ------
>  2 files changed, 2 insertions(+), 7 deletions(-)
>


Re: [PATCH 0/1] vfio-ccw: Fix garbage sense data on I/O error

Posted by Matthew Rosato 1 week, 3 days ago
On 6/10/21 4:20 PM, Eric Farman wrote:
> Hi Conny,
> 
> Per our offline discussion, here's a fix for the error when a guest
> issues "dasdfmt -M quick". It basically reverts commit 334e76850bbb
> ("vfio/ccw: update sense data if a unit check is pending")
> and modifies the check that builds sense data in the TSCH handler.

Should it includes a Fixes: tag then?

> 
> I opted to NOT disable PMCW.CSENSE, because doing so prevents
> vfio-ccw devices from coming online at all (didn't pursue deep
> enough to explain why). Turning it off in reaction to a unit
> check (in this now-reverted codepath) works, but only because of
> the corresponding PMCW.CSENSE check in the TSCH code.
> 
> I don't know if anything is needed for the (unaltered) ECW data
> that commit b498484ed49a ("s390x/css: sense data endianness")
> addressed for the copied sense_data bytes, but figure we can
> use this as a starting point. Thoughts?
> 
> Eric Farman (1):
>    vfio-ccw: Keep passthrough sense data intact
> 
>   hw/s390x/css.c | 3 ++-
>   hw/vfio/ccw.c  | 6 ------
>   2 files changed, 2 insertions(+), 7 deletions(-)
> 


Re: [PATCH 0/1] vfio-ccw: Fix garbage sense data on I/O error

Posted by Eric Farman 1 week, 3 days ago
On Thu, 2021-06-10 at 16:25 -0400, Matthew Rosato wrote:
> On 6/10/21 4:20 PM, Eric Farman wrote:
> > Hi Conny,
> > 
> > Per our offline discussion, here's a fix for the error when a guest
> > issues "dasdfmt -M quick". It basically reverts commit 334e76850bbb
> > ("vfio/ccw: update sense data if a unit check is pending")
> > and modifies the check that builds sense data in the TSCH handler.
> 
> Should it includes a Fixes: tag then?

Yeah, probably. I'll fix it locally so it's prepped for a v2.

> 
> > I opted to NOT disable PMCW.CSENSE, because doing so prevents
> > vfio-ccw devices from coming online at all (didn't pursue deep
> > enough to explain why). Turning it off in reaction to a unit
> > check (in this now-reverted codepath) works, but only because of
> > the corresponding PMCW.CSENSE check in the TSCH code.
> > 
> > I don't know if anything is needed for the (unaltered) ECW data
> > that commit b498484ed49a ("s390x/css: sense data endianness")
> > addressed for the copied sense_data bytes, but figure we can
> > use this as a starting point. Thoughts?
> > 
> > Eric Farman (1):
> >    vfio-ccw: Keep passthrough sense data intact
> > 
> >   hw/s390x/css.c | 3 ++-
> >   hw/vfio/ccw.c  | 6 ------
> >   2 files changed, 2 insertions(+), 7 deletions(-)
> >