From 6d741357c2597c3e769f05d7ef698bf400c03d9b Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Mon, 28 Oct 2024 10:49:35 -0700 Subject: [PATCH] OvmfPkg: Add RDRAND Support To QEMU In order to use dynamic stack cookies, we need RDRAND support from QEMU, so this updates the QEMU launching code for OvmfPkg to include RDRAND support. Signed-off-by: Oliver Smith-Denny --- OvmfPkg/PlatformCI/PlatformBuildLib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OvmfPkg/PlatformCI/PlatformBuildLib.py b/OvmfPkg/PlatformCI/PlatformBuildLib.py index 3fe80f5c1c..4d7b787d13 100644 --- a/OvmfPkg/PlatformCI/PlatformBuildLib.py +++ b/OvmfPkg/PlatformCI/PlatformBuildLib.py @@ -207,6 +207,9 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager): args += " -global isa-debugcon.iobase=0x402" # debug messages out thru virtual io port args += " -net none" # turn off network args += " -smp 4" + args += " -cpu IvyBridge,+rdrand" # IvyBridge is the first CPU that supported + # RDRAND, which is required for dynamic + # stack cookies args += f" -drive file=fat:rw:{VirtualDrive},format=raw,media=disk" # Mount disk with startup.nsh # Provides Rng services to the Guest VM args += " -device virtio-rng-pci"