target/s390x: support PRNO_TRNG instruction
commit3dbc5fdacb5af08dffa408ac7315eae53c4d5497
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 21 Sep 2022 10:07:29 +0000 (21 12:07 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 26 Sep 2022 15:23:11 +0000 (26 17:23 +0200)
tree38b3f4c565db6558d1406b1b38d7b219031af263
parent9f17bfdab422887807cbd5260ed6b0b6e54ddb33
target/s390x: support PRNO_TRNG instruction

In order for hosts running inside of TCG to initialize the kernel's
random number generator, we should support the PRNO_TRNG instruction,
backed in the usual way with the qemu_guest_getrandom helper. This is
confirmed working on Linux 5.19.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Message-Id: <20220921100729.2942008-2-Jason@zx2c4.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
[thuth: turn prno-trng off in avocado test to avoid breaking it]
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/gen-features.c
target/s390x/tcg/crypto_helper.c
tests/avocado/machine_s390_ccw_virtio.py