summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2024-10-28 10:49:35 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-02-07 02:23:11 +0000
commit6d741357c2597c3e769f05d7ef698bf400c03d9b (patch)
tree585abc847a69cd2ba7cb9a0b0edc36f3151c76f2
parente6b6aa90d490c298da140bc118d73ceff510f563 (diff)
downloadedk2-6d741357c2597c3e769f05d7ef698bf400c03d9b.tar.gz
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 <osde@linux.microsoft.com>
-rw-r--r--OvmfPkg/PlatformCI/PlatformBuildLib.py3
1 files changed, 3 insertions, 0 deletions
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"