Re: [PATCH v7 2/2] target/s390x: support PRNO_TRNG instruction

2022-09-21 Thread Thomas Huth
On 29/08/2022 18.29, Jason A. Donenfeld wrote: On Fri, Aug 26, 2022 at 01:28:11PM +0200, Thomas Huth wrote: +qemu_guest_getrandom_nofail(tmp, block); +for (size_t i = 0; i < block; ++i) { +cpu_stb_data_ra(env, wrap_address(env, *buf_reg), tmp[i], ra); +

Re: [PATCH v7 2/2] target/s390x: support PRNO_TRNG instruction

2022-08-29 Thread Jason A. Donenfeld
On Fri, Aug 26, 2022 at 01:28:11PM +0200, Thomas Huth wrote: > > +qemu_guest_getrandom_nofail(tmp, block); > > +for (size_t i = 0; i < block; ++i) { > > +cpu_stb_data_ra(env, wrap_address(env, *buf_reg), tmp[i], ra); > > +*buf_reg = deposit64(*buf_reg, 0,

Re: [PATCH v7 2/2] target/s390x: support PRNO_TRNG instruction

2022-08-26 Thread Thomas Huth
On 09/08/2022 17.03, Jason A. Donenfeld wrote: 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. Cc:

[PATCH v7 2/2] target/s390x: support PRNO_TRNG instruction

2022-08-09 Thread Jason A. Donenfeld
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. Cc: Thomas Huth Cc: David Hildenbrand Cc: Christian