Skip to content
Snippets Groups Projects
  1. Jul 27, 2022
  2. Jul 26, 2022
  3. Jul 25, 2022
  4. Jul 22, 2022
    • Jason A. Donenfeld's avatar
      hw/i386: pass RNG seed via setup_data entry · 67f7e426
      Jason A. Donenfeld authored
      Tiny machines optimized for fast boot time generally don't use EFI,
      which means a random seed has to be supplied some other way. For this
      purpose, Linux (≥5.20) supports passing a seed in the setup_data table
      with SETUP_RNG_SEED, specially intended for hypervisors, kexec, and
      specialized bootloaders. The linked commit shows the upstream kernel
      implementation.
      
      At Paolo's request, we don't pass these to versioned machine types ≤7.0.
      
      Link: https://git.kernel.org/tip/tip/c/68b8e9713c8
      
      
      Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <richard.henderson@linaro.org>
      Cc: Eduardo Habkost <eduardo@habkost.net>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
      Cc: Laurent Vivier <laurent@vivier.eu>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Message-Id: <20220721125636.446842-1-Jason@zx2c4.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      67f7e426
    • Jason A. Donenfeld's avatar
      hw/rx: pass random seed to fdt · c287941a
      Jason A. Donenfeld authored
      
      If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to
      initialize early. Set this using the usual guest random number
      generation function. This FDT node is part of the DT specification.
      
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Message-Id: <20220719122033.135902-1-Jason@zx2c4.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c287941a
    • Jason A. Donenfeld's avatar
      hw/mips: boston: pass random seed to fdt · 5e19cc68
      Jason A. Donenfeld authored
      
      If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to
      initialize early. Set this using the usual guest random number
      generation function. This FDT node is part of the DT specification.
      
      I'd do the same for other MIPS platforms but boston is the only one that
      seems to use FDT.
      
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
      Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Message-Id: <20220719120843.134392-1-Jason@zx2c4.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      5e19cc68
Loading