qemu-e2k/hw
Jason A. Donenfeld 6233a13859 mips/malta: pass RNG seed via env var and re-randomize on reboot
As of the kernel commit linked below, Linux ingests an RNG seed
passed as part of the environment block by the bootloader or firmware.
This mechanism works across all different environment block types,
generically, which pass some block via the second firmware argument. On
malta, this has been tested to work when passed as an argument from
U-Boot's linux_env_set.

As is the case on most other architectures (such as boston), when
booting with `-kernel`, QEMU, acting as the bootloader, should pass the
RNG seed, so that the machine has good entropy for Linux to consume. So
this commit implements that quite simply by using the guest random API,
which is what is used on nearly all other archs too. It also
reinitializes the seed on reboot, so that it is always fresh.

Link: https://git.kernel.org/torvalds/c/056a68cea01
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-10-27 11:47:45 +01:00
..
9pfs Pull request 2022-10-25 11:37:17 -04:00
acpi hw/acpi: Add ospm_status hook implementation for acpi-ged 2022-09-22 16:38:28 +01:00
adc
alpha
arm arm: re-randomize rng-seed on reboot 2022-10-27 11:34:31 +01:00
audio
avr
block m25p80: Add the w25q01jvq SFPD table 2022-10-24 11:20:16 +02:00
char Drop useless casts from g_malloc() & friends to pointer 2022-10-22 23:15:40 +02:00
core reset: allow registering handlers that aren't called by snapshot loading 2022-10-27 11:34:31 +01:00
cpu
cris
cxl
display Drop useless casts from g_malloc() & friends to pointer 2022-10-22 23:15:40 +02:00
dma treewide: Remove the unnecessary space before semicolon 2022-10-24 13:41:10 +02:00
gpio hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx 2022-10-17 16:15:09 -03:00
hppa reset: allow registering handlers that aren't called by snapshot loading 2022-10-27 11:34:31 +01:00
hyperv hw/hyperv/hyperv.c: Use device_cold_reset() instead of device_legacy_reset() 2022-10-27 10:27:23 +01:00
i2c hw/i2c/aspeed: Fix old reg slave receive 2022-10-24 11:20:15 +02:00
i386 x86: do not re-randomize RNG seed on snapshot load 2022-10-27 11:34:31 +01:00
ide hw/ide/microdrive: Use device_cold_reset() for self-resets 2022-10-20 12:11:53 +01:00
input
intc hw/intc: Fix LoongArch ipi device emulation 2022-10-17 10:28:35 +08:00
ipack
ipmi
isa
loongarch hw/arm, loongarch: Move load_image_to_fw_cfg() to common location 2022-10-14 14:29:50 +10:00
m68k m68k/q800: do not re-randomize RNG seed on snapshot load 2022-10-27 11:34:31 +01:00
mem mem/cxl-type3: Add sn option to provide serial number for PCI ecap 2022-10-09 16:38:45 -04:00
microblaze hw/microblaze: pass random seed to fdt 2022-09-21 19:59:56 +02:00
mips mips/malta: pass RNG seed via env var and re-randomize on reboot 2022-10-27 11:47:45 +01:00
misc Drop useless casts from g_malloc() & friends to pointer 2022-10-22 23:15:40 +02:00
net treewide: Remove the unnecessary space before semicolon 2022-10-24 13:41:10 +02:00
nios2 hw/nios2: set machine->fdt in nios2_load_dtb() 2022-10-17 16:15:10 -03:00
nubus
nvme
nvram Drop useless casts from g_malloc() & friends to pointer 2022-10-22 23:15:40 +02:00
openrisc openrisc: re-randomize rng-seed on reboot 2022-10-27 11:34:31 +01:00
pci
pci-bridge
pci-host
pcmcia
ppc reset: allow registering handlers that aren't called by snapshot loading 2022-10-27 11:34:31 +01:00
rdma
remote Use g_new() & friends where that makes obvious sense 2022-10-04 00:10:11 +02:00
riscv riscv: re-randomize rng-seed on reboot 2022-10-27 11:34:31 +01:00
rtc
rx rx: re-randomize rng-seed on reboot 2022-10-27 11:34:31 +01:00
s390x reset: allow registering handlers that aren't called by snapshot loading 2022-10-27 11:34:31 +01:00
scsi hw/scsi/vmw_pvscsi.c: Use device_cold_reset() to reset SCSI devices 2022-10-18 13:58:04 +02:00
sd
sensor
sh4
smbios hw/smbios: support for type 8 (port connector) 2022-10-09 16:38:45 -04:00
sparc
sparc64
ssi aspeed/smc: Cache AspeedSMCClass 2022-10-24 11:20:15 +02:00
timer target/imx: reload cmp timer outside of the reload ptimer transaction 2022-10-27 10:27:23 +01:00
tpm
tricore
usb Drop useless casts from g_malloc() & friends to pointer 2022-10-22 23:15:40 +02:00
vfio vfio/common: Fix vfio_iommu_type1_info use after free 2022-09-27 14:26:42 -06:00
virtio treewide: Remove the unnecessary space before semicolon 2022-10-24 13:41:10 +02:00
watchdog watchdog: remove -watchdog option 2022-09-29 11:40:28 +02:00
xen hw/xen: set pci Atomic Ops requests for passthrough device 2022-09-27 14:23:23 +01:00
xenpv
xtensa
Kconfig
meson.build