s390x/ioinst: Fix wrong MSCH alignment check on little endian
PATCH 1/1 s390x/ioinst: Fix wrong MSCH alignment check on little endian
schib->pmcw.chars is 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:
FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)
Because we end up not injecting an operand program exception.
--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/ioinst.c +1 -1
@@ -123,7 +123,7 @@ static int ioinst_schib_valid(SCHIB *schib) }/* for MB format 1 bits 26-31 of word 11 must be 0 */ /* MBA uses words 10 and 11, it means align on 2**6 */ -if ((be16_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && +if ((be32_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && (be64_to_cpu (schib->mba) &0x03fUL )) {return 0 ; }
Signature · 1 line
2.31.1
Quoted 27 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must be aligned")Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/s390x/ioinst.c +0
-0
target/s390x/ioinst.c static int ioinst_schib_valid(SCHIB *schib) · line 129
Quoted 8 lines
target/s390x/ioinst.c +1
-1@@ -123,7 +123,7 @@ static int ioinst_schib_valid(SCHIB *schib) }/* for MB format 1 bits 26-31 of word 11 must be 0 */ /* MBA uses words 10 and 11, it means align on 2**6 */ -if ((be16_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && +if ((be32_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && (be64_to_cpu (schib->mba) &0x03fUL )) {return 0 ; }
It is obviously a 32bit.
Signature · 2 lines
Pierre Morel IBM Lab Boeblingen
Quoted 27 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must be aligned")Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/s390x/ioinst.c +0
-0
target/s390x/ioinst.c static int ioinst_schib_valid(SCHIB *schib) · line 129
Quoted 8 lines
target/s390x/ioinst.c +1
-1@@ -123,7 +123,7 @@ static int ioinst_schib_valid(SCHIB *schib) }/* for MB format 1 bits 26-31 of word 11 must be 0 */ /* MBA uses words 10 and 11, it means align on 2**6 */ -if ((be16_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && +if ((be32_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && (be64_to_cpu (schib->mba) &0x03fUL )) {return 0 ; }
Quoted 17 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must be aligned")Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>
Quoted 3 lines
--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Same question here: still -rc worthy, or not?
Quoted 23 lines · Cornelia Huck
Quoted 17 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must be aligned")Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>Quoted 3 lines
--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 2 lines
Same question here: still -rc worthy, or not?
It's been broken forever, this can also wait I guess.
Signature · 3 lines
Thanks, David / dhildenb
Quoted 26 lines · David Hildenbrand
Quoted 25 lines · Cornelia Huck
Quoted 22 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must bealigned")
Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>---
target/s390x/ioinst.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Quoted 2 lines
Same question here: still -rc worthy, or not?
It's been broken forever, this can also wait I guess.
But the commit referenced is recent:
commit a54b8ac340c20531daa89929c5ce7fed89fa401d
Date: Fri Feb 19 14:39:33 2021 +0100
css: SCHIB measurement block origin must be aligned
Quoted 30 lines · Philippe Mathieu-Daudé
Quoted 29 lines · David Hildenbrand
Quoted 27 lines · Cornelia Huck
Quoted 19 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB
origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must bealigned")
Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>Quoted 3 lines
--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Same question here: still -rc worthy, or not?
Quoted 9 lines
Quoted 1 line
It's been broken forever, this can also wait I guess.
But the commit referenced is recent:
commit
a54b8ac340c20531daa89929c5ce7fed89fa401d
Date: Fri Feb 19 14:39:33 2021 +0100css: SCHIB measurement block origin must be aligned
Well, okay yes :) I don't think it's very urgent though.
Signature · 3 lines
Thanks, David / dhildenb
Quoted 35 lines · David Hildenbrand
Quoted 34 lines · Philippe Mathieu-Daudé
Quoted 26 lines · David Hildenbrand
Quoted 25 lines · Cornelia Huck
Quoted 22 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB
origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must bealigned")
Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 4 lines
Quoted 2 lines
Same question here: still -rc worthy, or not?
It's been broken forever, this can also wait I guess.
But the commit referenced is recent:
Quoted 7 lines
Quoted 5 lines
commit
a54b8ac340c20531daa89929c5ce7fed89fa401d
Date: Fri Feb 19 14:39:33 2021 +0100css: SCHIB measurement block origin must be aligned
Well, okay yes :) I don't think it's very urgent though.
I think I agree. Before the referenced commit, we did not do any alignment checks at all, now we still let some unaligned blocks pass. I don't think I've seen any issues before, the problem has only been uncovered by the kvm unit test. So fix-worthy, but probably not late-rc-worthy.
Quoted 8 lines · On Thu, 5 Aug 2021 16:37:53 +0200 David Hildenbrand <[email protected]> wrote:
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Quoted 9 lines
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must be aligned")Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>
Quoted 17 lines
--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/s390x/ioinst.c +1
-1@@ -123,7 +123,7 @@ static int ioinst_schib_valid(SCHIB *schib) }/* for MB format 1 bits 26-31 of word 11 must be 0 */ /* MBA uses words 10 and 11, it means align on 2**6 */ -if ((be16_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && +if ((be32_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_MBFC ) && (be64_to_cpu (schib->mba) &0x03fUL )) {return 0 ; }
Cornelia Huck
AppliedQuoted 17 lines · David Hildenbrand
schib->pmcw.charsis 32bit, not 16bit. This fixes the kvm-unit-tests "css" test, which fails with:FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin:
Program interrupt: expected(21) == received(0)Because we end up not injecting an operand program exception.
Fixes a54b8ac340c2 ("css: SCHIB measurement block origin must be aligned")Cc Halil Pasic <[email protected]>Cc Cornelia Huck <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Richard Henderson <[email protected]>Cc Thomas Huth <[email protected]>Cc Pierre Morel <[email protected]>Signed-off-by David Hildenbrand <[email protected]>
Quoted 3 lines
--- target/s390x/ioinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied.