qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-4.1 1/7] util: Add qemu_getrandom and suppor


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH for-4.1 1/7] util: Add qemu_getrandom and support functions
Date: Wed, 13 Mar 2019 08:55:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 13/03/2019 07:26, 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 <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",

s/psudorandom/pseudo random/

+    QEMU_ARCH_ALL)
+STEXI
address@hidden -seed @var{number}
address@hidden -seed
+Force qemu to use a deterministic pseudo random number generator,
+seeded with @var{number}.
+ETEXI
+

Thanks,
Laurent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]