[PATCH v2 0/2] target/s390x: Make PRNO TRNG interruptible

Ilya Leoshkevich posted 2 patches 4 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260714191948.342204-1-iii@linux.ibm.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>, Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>
target/s390x/tcg/crypto_helper.c | 22 ++++++++---
tests/tcg/s390x/Makefile.target  |  1 +
tests/tcg/s390x/prno-trng.c      | 67 ++++++++++++++++++++++++++++++++
3 files changed, 85 insertions(+), 5 deletions(-)
create mode 100644 tests/tcg/s390x/prno-trng.c
[PATCH v2 0/2] target/s390x: Make PRNO TRNG interruptible
Posted by Ilya Leoshkevich 4 weeks, 1 day ago
v1: https://lore.kernel.org/qemu-devel/20260714113946.275122-1-iii@linux.ibm.com/
v1 -> v2: Use cpu_loop_exit_requested() (Richard).
          Apply R-b, since the change is trivial enough.


Hi,

Christian has reported that one can make a TCG guest stuck by running
PRNO TRNG with a huge buffer. This series fixes this by making PRNO
TRNG end on cpu_loop_exit_requested().

Patch 1 is the fix, patch 2 is the test.

Cc: Harald, because this may conflict with the CPACF series.

Best regards,
Ilya


Ilya Leoshkevich (2):
  target/s390x: Make PRNO TRNG interruptible
  tests/tcg/s390x: Test PRNO TRNG interruptibility

 target/s390x/tcg/crypto_helper.c | 22 ++++++++---
 tests/tcg/s390x/Makefile.target  |  1 +
 tests/tcg/s390x/prno-trng.c      | 67 ++++++++++++++++++++++++++++++++
 3 files changed, 85 insertions(+), 5 deletions(-)
 create mode 100644 tests/tcg/s390x/prno-trng.c

-- 
2.55.0
Re: [PATCH v2 0/2] target/s390x: Make PRNO TRNG interruptible
Posted by Eric Farman 2 weeks, 2 days ago

On 7/14/26 3:17 PM, Ilya Leoshkevich wrote:
> v1: https://lore.kernel.org/qemu-devel/20260714113946.275122-1-iii@linux.ibm.com/
> v1 -> v2: Use cpu_loop_exit_requested() (Richard).
>            Apply R-b, since the change is trivial enough.
> 
> 
> Hi,
> 
> Christian has reported that one can make a TCG guest stuck by running
> PRNO TRNG with a huge buffer. This series fixes this by making PRNO
> TRNG end on cpu_loop_exit_requested().
> 
> Patch 1 is the fix, patch 2 is the test.
> 
> Cc: Harald, because this may conflict with the CPACF series.
> 
> Best regards,
> Ilya
> 
> 
> Ilya Leoshkevich (2):
>    target/s390x: Make PRNO TRNG interruptible
>    tests/tcg/s390x: Test PRNO TRNG interruptibility

Thanks! Applied for 11.2

> 
>   target/s390x/tcg/crypto_helper.c | 22 ++++++++---
>   tests/tcg/s390x/Makefile.target  |  1 +
>   tests/tcg/s390x/prno-trng.c      | 67 ++++++++++++++++++++++++++++++++
>   3 files changed, 85 insertions(+), 5 deletions(-)
>   create mode 100644 tests/tcg/s390x/prno-trng.c
>