mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
cpus: Initialize pseudo-random seeds for all guest cpus
When the -seed option is given, call qemu_guest_random_seed_main, putting the subsystem into deterministic mode. Pass derived seeds to each cpu created; which is a no-op unless the subsystem is in deterministic mode. Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
8d8404f156
commit
9c09a2518e
4 changed files with 24 additions and 0 deletions
4
vl.c
4
vl.c
|
@ -128,6 +128,7 @@ int main(int argc, char **argv)
|
|||
#include "qapi/qapi-commands-ui.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "sysemu/iothread.h"
|
||||
#include "qemu/guest-random.h"
|
||||
|
||||
#define MAX_VIRTIO_CONSOLES 1
|
||||
|
||||
|
@ -3349,6 +3350,9 @@ int main(int argc, char **argv, char **envp)
|
|||
case QEMU_OPTION_DFILTER:
|
||||
qemu_set_dfilter_ranges(optarg, &error_fatal);
|
||||
break;
|
||||
case QEMU_OPTION_seed:
|
||||
qemu_guest_random_seed_main(optarg, &error_fatal);
|
||||
break;
|
||||
case QEMU_OPTION_s:
|
||||
add_device_config(DEV_GDB, "tcp::" DEFAULT_GDBSTUB_PORT);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue