Re: [Qemu-devel] [PATCH v2 08/14] util: Add qemu_getrandom and support functions

2019-03-14 Thread Eric Blake
On 3/13/19 11:55 PM, Richard Henderson wrote: > Initialize the system from system and linux-user arguments. > Propagate deterministic seeds when creating new cpu threads. > > Signed-off-by: Richard Henderson > --- > +/** > + * qemu_seedrandom_thread_part1(void) > + * > + * If qemu_getrandom is i

Re: [Qemu-devel] [PATCH v2 08/14] util: Add qemu_getrandom and support functions

2019-03-14 Thread Daniel P . Berrangé
On Thu, Mar 14, 2019 at 09:18:09AM -0700, Richard Henderson wrote: > On 3/14/19 8:57 AM, Daniel P. Berrangé wrote: > >> @@ -2070,6 +2078,7 @@ void qemu_init_vcpu(CPUState *cpu) > >> cpu->nr_cores = smp_cores; > >> cpu->nr_threads = smp_threads; > >> cpu->stopped = true; > >> +cpu

Re: [Qemu-devel] [PATCH v2 08/14] util: Add qemu_getrandom and support functions

2019-03-14 Thread Richard Henderson
On 3/14/19 8:57 AM, Daniel P. Berrangé wrote: >> tions.hx >> +++ b/qemu-options.hx >> @@ -3601,6 +3601,16 @@ the 0x200 sized block starting at 0xffc8 >> and another 0x1000 sized >> block starting at 0xffc5f000. >> ETEXI >> >> +DEF("seed", HAS_ARG, QEMU_OPTION_seed, \ >> +

Re: [Qemu-devel] [PATCH v2 08/14] util: Add qemu_getrandom and support functions

2019-03-14 Thread Richard Henderson
On 3/14/19 8:57 AM, Daniel P. Berrangé wrote: >> @@ -2070,6 +2078,7 @@ void qemu_init_vcpu(CPUState *cpu) >> cpu->nr_cores = smp_cores; >> cpu->nr_threads = smp_threads; >> cpu->stopped = true; >> +cpu->random_seed = qemu_seedrandom_thread_part1(); >> >> if (!cpu->as) { >>

Re: [Qemu-devel] [PATCH v2 08/14] util: Add qemu_getrandom and support functions

2019-03-14 Thread Daniel P . Berrangé
On Thu, Mar 14, 2019 at 09:15:39AM -0700, Richard Henderson wrote: > On 3/14/19 8:57 AM, Daniel P. Berrangé wrote: > >> tions.hx > >> +++ b/qemu-options.hx > >> @@ -3601,6 +3601,16 @@ the 0x200 sized block starting at > >> 0xffc8 and another 0x1000 sized > >> block starting at 0xf

Re: [Qemu-devel] [PATCH v2 08/14] util: Add qemu_getrandom and support functions

2019-03-14 Thread Daniel P . Berrangé
On Wed, Mar 13, 2019 at 09:55:20PM -0700, Richard Henderson wrote: > Initialize the system from system and linux-user arguments. > Propagate deterministic seeds when creating new cpu threads. > > Signed-off-by: Richard Henderson > --- > include/qemu/random.h | 58

[Qemu-devel] [PATCH v2 08/14] util: Add qemu_getrandom and support functions

2019-03-13 Thread Richard Henderson
Initialize the system from system and linux-user arguments. Propagate deterministic seeds when creating new cpu threads. Signed-off-by: Richard Henderson --- include/qemu/random.h | 58 +++ include/qom/cpu.h | 1 + cpus.c| 9 ++ linux-use