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>
This commit is contained in:
Oliver Smith-Denny 2024-10-28 10:49:35 -07:00 committed by mergify[bot]
parent e6b6aa90d4
commit 6d741357c2

View File

@ -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"