From: Michalis Pappas Date: Fri, 4 Oct 2024 09:57:26 +0000 (+0200) Subject: plat/xen: Relax requirement for RDRAND X-Git-Tag: RELEASE-0.18.0~44 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c90d46d30e1b86a0fa805a1ad851eadcc6a8527e;p=unikraft%2Funikraft.git plat/xen: Relax requirement for RDRAND Enabling cpu-generated randomness by default breaks execution on legacy x86_64 CPUs that don't support RDRAND. Update config to enable CPU-generated randomness conditionally to the selection of libukrandom. In x86_64 libukrandom will seed the CSPRNG using RDRAND if the CPU implements these instruction, unless LIBUKRANDOM_CMDLINE_SEED is selected in the config. On arm64 libukrandom will check if a device-tree is provided and if a seed is set in the `/chosen/rng-seed` property, and otherwise fall back to RNDR / RNDRRS if the CPU implements FEAT_RNG. Signed-off-by: Michalis Pappas Reviewed-by: Maria Pana Reviewed-by: Alex Apostolescu Reviewed-by: Simon Kuenzer Approved-by: Simon Kuenzer GitHub-Closes: #1496 --- diff --git a/plat/xen/Config.uk b/plat/xen/Config.uk index 6e574fdd7..b83b10065 100644 --- a/plat/xen/Config.uk +++ b/plat/xen/Config.uk @@ -14,13 +14,11 @@ menuconfig PLAT_XEN select LIBUKRELOC if OPTIMIZE_PIE imply LIBUKOFW if ARCH_ARM_64 select HAVE_INTCTLR - select HAVE_RANDOM imply LIBUKINTCTLR_GICV3 if ARCH_ARM_64 imply LIBXEN_NETFRONT if LIBUKNETDEV imply LIBXEN_9PFRONT if LIBUK9P imply LIBXEN_BLKFRONT if LIBUKBLKDEV imply LIBXEN_CONSOLE - imply LIBUKRANDOM if HAVE_RANDOM help Create a Unikraft image that runs as a Xen guest