Skip to content

Commit d8111c8

Browse files
author
Juliette Pretot
committed
patch rdrand availability check for debuggingnd enable KVM
1 parent d73e848 commit d8111c8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

experimental/uefi/app/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runner = "qemu-system-x86_64 -nodefaults -nographic -bios /usr/share/OVMF/OVMF_C
77

88
# Otherwise, (a) the first serial port gets routed to a log, and (b) the second serial gets attached to stdio.
99
[target.'cfg(not(test))']
10-
runner = "qemu-system-x86_64 -nodefaults -nographic -bios /usr/share/OVMF/OVMF_CODE.fd -serial file:target/console.log -serial stdio -machine q35 -device isa-debug-exit,iobase=0xf4,iosize=0x04 -kernel"
10+
runner = "qemu-system-x86_64 -enable-kvm -cpu Broadwell-IBRS,vme=on,f16c=on,rdrand=on -nodefaults -nographic -bios /usr/share/OVMF/OVMF_CODE.fd -serial file:target/console.log -serial stdio -machine q35 -device isa-debug-exit,iobase=0xf4,iosize=0x04 -kernel"
1111

1212
[unstable]
1313
build-std = ["core", "alloc"]

third_party/ring/src/rand.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,11 @@ mod uefi {
452452
static mut OPENSSL_ia32cap_P: [u32; 4];
453453
}
454454
const FLAG: u32 = 1 << 30;
455-
unsafe { OPENSSL_ia32cap_P[1] & FLAG == FLAG }
455+
// Somehow this check continues to require patching, regardless
456+
// of qemu CPU config. :/. That is even though RDRAND is in fact
457+
// available and working.
458+
// unsafe { OPENSSL_ia32cap_P[1] & FLAG == FLAG }
459+
true
456460
}
457461

458462
// We must make sure current cpu support `rdrand`

0 commit comments

Comments
 (0)