vfio-ccw fix for 5.3
Subsystems (4)
The following changes since commit 05f31e3bf6b34fe6e4922868d132f6455f81d5bf:
s390: ap: kvm: Enable PQAP/AQIC facility for the guest (2019-07-02 16:00:28 +0200)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git tags/vfio-ccw-20190705
for you to fetch changes up to c382cbc6dbf513d73cf896ad43a3789ad42c2e2f:
vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1 (2019-07-05 07:58:53 +0200)
----------------------------------------------------------------
Fix a bug introduced in the refactoring.
----------------------------------------------------------------
Eric Farman (1):
vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1
drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.20.1
[PULL 1/1] vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1
From: Eric Farman <[email protected]>
When processing Format-0 CCWs, we use the "len" variable as the number of CCWs to convert to Format-1. But that variable contains zero here, and is not a meaningful CCW count until ccwchain_calc_length() returns. Since that routine requires and expects Format-1 CCWs to identify the chaining behavior, the format conversion must be done first.
Convert the 2KB we copied even if it's more than we need.
Message-Id: <[email protected]>
--- drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/cio/vfio_ccw_cp.c +1 -1
@@ -431,7 +431,7 @@ static int ccwchain_handle_ccw(u32 cda, struct channel_program *cp)/* Convert any Format-0 CCWs to Format-1 */ if (!cp->orb.cmd.fmt) -convert_ccw0_to_ccw1 (cp->guest_cp, len); +convert_ccw0_to_ccw1 (cp->guest_cp,CCWCHAIN_LEN_MAX );/* Count the CCWs in the current chain */ len =ccwchain_calc_length (cda, cp);
Signature · 1 line
2.20.1
Vasily Gorbik
AppliedQuoted 15 lines · Cornelia Huck
The following changes since commit
05f31e3bf6b34fe6e4922868d132f6455f81d5bf:s390: ap: kvm: Enable PQAP/AQIC facility for the guest (2019-07-02 16:00:28 +0200)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git tags/vfio-ccw-20190705
for you to fetch changes up to
c382cbc6dbf513d73cf896ad43a3789ad42c2e2f:vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1 (2019-07-05 07:58:53 +0200)
----------------------------------------------------------------
Fix a bug introduced in the refactoring.
Quoted 11 lines
----------------------------------------------------------------
Eric Farman (1):
vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Signature · 1 line
2.20.1
Applied, thanks.