Initialize the system from system and linux-user arguments.
Propagate deterministic seeds when creating new cpu threads.
Signed-off-by: Richard Henderson <address@hidden>
---
include/qemu/random.h | 58 +++++++++++++++++++++++++++++++++
include/qom/cpu.h | 1 +
cpus.c | 9 +++++
linux-user/main.c | 9 ++---
linux-user/syscall.c | 3 ++
util/random.c | 76 +++++++++++++++++++++++++++++++++++++++++++
vl.c | 4 +++
qemu-options.hx | 10 ++++++
util/Makefile.objs | 1 +
9 files changed, 164 insertions(+), 7 deletions(-)
create mode 100644 include/qemu/random.h
create mode 100644 util/random.c
diff --git a/qemu-options.hx b/qemu-options.hx
index 8693f5fa3c..a45ae70d33 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3598,6 +3598,16 @@ the 0x200 sized block starting at 0xffffffc000080000 and
another 0x1000 sized
block starting at 0xffffffc00005f000.
ETEXI
+DEF("seed", HAS_ARG, QEMU_OPTION_seed, \
+ "-seed number seed the psudorandom number generator\n",