css: SCHIB measurement block origin must be aligned
cover css: SCHIB measurement block origin must be aligned
Hi,
By testing Measurement with KVM unit tests I fall on this:
we forgot to test the alignment of the MBO for measurement format 1.
The MB must be aligned on 128bits otherwise an operand exception is recognized.
Regards,
Pierre
Pierre Morel (1):
css: SCHIB measurement block origin must be aligned
target/s390x/ioinst.c | 6 ++++++ 1 file changed, 6 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/1 css: SCHIB measurement block origin must be aligned
The Measurement Block Origin inside the SCHIB is used when Mesurement Block format 1 is in used and must be aligned on 128bits.
Signed-off-by Pierre Morel <[email protected]>
--- target/s390x/ioinst.c | 6 ++++++ 1 file changed, 6 insertions(+)
target/s390x/ioinst.c +6 -0
@@ -121,6 +121,12 @@ static int ioinst_schib_valid(SCHIB *schib)if (be32_to_cpu (schib->pmcw.chars) &PMCW_CHARS_MASK_XMWME ) {return 0 ; } +/* 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 ) && + (be64_to_cpu (schib->mba) &0x03fUL )) { +return 0 ; + }return 1 ; }
Signature · 1 line
2.25.1