mbox series

[kvm-unit-tests,v2,0/5] s390x: Dirty cc before executing tested instructions

Message ID 20240131074427.70871-1-frankja@linux.ibm.com (mailing list archive)
Headers show
Series s390x: Dirty cc before executing tested instructions | expand

Message

Janosch Frank Jan. 31, 2024, 7:44 a.m. UTC
A recent s390 KVM fixpatch [1] showed us that checking the cc is not
enough when emulation code forgets to set the cc. There might just be
the correct cc in the PSW which would make the cc check succeed.

This series intentionally dirties the cc for sigp, uvc, some io
instructions and sclp to make cc setting errors more apparent. I had a
cursory look through the tested instructions and those are the most
prominent ones with defined cc values.

Since the issue appeared in PQAP my AP test series is now dependent on
this series.

[1] https://lore.kernel.org/kvm/20231201181657.1614645-1-farman@linux.ibm.com/

v2:
	* Moved from spm to tmll (thanks Nina)

Janosch Frank (5):
  lib: s390x: sigp: Dirty CC before sigp execution
  lib: s390x: uv: Dirty CC before uvc execution
  lib: s390x: css: Dirty CC before css instructions
  s390x: mvpg: Dirty CC before mvpg execution
  s390x: sclp: Dirty CC before sclp execution

 lib/s390x/asm/sigp.h |  6 +++++-
 lib/s390x/asm/uv.h   |  4 +++-
 lib/s390x/css.h      | 16 ++++++++++++----
 s390x/mvpg.c         |  6 ++++--
 s390x/sclp.c         |  5 ++++-
 5 files changed, 28 insertions(+), 9 deletions(-)

Comments

Claudio Imbrenda Feb. 1, 2024, 5:49 p.m. UTC | #1
On Wed, 31 Jan 2024 07:44:22 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:

> A recent s390 KVM fixpatch [1] showed us that checking the cc is not
> enough when emulation code forgets to set the cc. There might just be
> the correct cc in the PSW which would make the cc check succeed.
> 
> This series intentionally dirties the cc for sigp, uvc, some io
> instructions and sclp to make cc setting errors more apparent. I had a
> cursory look through the tested instructions and those are the most
> prominent ones with defined cc values.
> 
> Since the issue appeared in PQAP my AP test series is now dependent on
> this series.
> 
> [1] https://lore.kernel.org/kvm/20231201181657.1614645-1-farman@linux.ibm.com/

whole series:
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>


> 
> v2:
> 	* Moved from spm to tmll (thanks Nina)
> 
> Janosch Frank (5):
>   lib: s390x: sigp: Dirty CC before sigp execution
>   lib: s390x: uv: Dirty CC before uvc execution
>   lib: s390x: css: Dirty CC before css instructions
>   s390x: mvpg: Dirty CC before mvpg execution
>   s390x: sclp: Dirty CC before sclp execution
> 
>  lib/s390x/asm/sigp.h |  6 +++++-
>  lib/s390x/asm/uv.h   |  4 +++-
>  lib/s390x/css.h      | 16 ++++++++++++----
>  s390x/mvpg.c         |  6 ++++--
>  s390x/sclp.c         |  5 ++++-
>  5 files changed, 28 insertions(+), 9 deletions(-)
>