From 4084df6360d91c82ed19e3cd97cdeafd11c48eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 8 Oct 2024 15:11:19 +0200 Subject: [PATCH] vbox6: enable RDRAND hardware instruction support Issue #5314 --- repos/ports/ports/virtualbox6.hash | 2 +- .../src/virtualbox6/patches/rdrand.patch | 20 +++++++++++++++++++ repos/ports/src/virtualbox6/patches/series | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 repos/ports/src/virtualbox6/patches/rdrand.patch diff --git a/repos/ports/ports/virtualbox6.hash b/repos/ports/ports/virtualbox6.hash index 9f9c8e7363..6ff69bd74b 100644 --- a/repos/ports/ports/virtualbox6.hash +++ b/repos/ports/ports/virtualbox6.hash @@ -1 +1 @@ -a58000c856a6a838d0da22df8c144a60211b4572 +969705fd5573cd8f85c9023e06a61bf2cb3cc37c diff --git a/repos/ports/src/virtualbox6/patches/rdrand.patch b/repos/ports/src/virtualbox6/patches/rdrand.patch new file mode 100644 index 0000000000..8826800a64 --- /dev/null +++ b/repos/ports/src/virtualbox6/patches/rdrand.patch @@ -0,0 +1,20 @@ +--- a/src/virtualbox6/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp ++++ b/src/virtualbox6/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp +@@ -4358,7 +4358,7 @@ + * the default is to only do this for VMs with nested paging and AMD-V or + * unrestricted guest mode. + */ +- rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "RDRAND", &pConfig->enmRdRand, fNestedPagingAndFullGuestExec); ++ rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "RDRAND", &pConfig->enmRdRand, fEnforceHWusage); + AssertLogRelRCReturn(rc, rc); + + /** @cfgm{/CPUM/IsaExts/RDSEED, isaextcfg, depends} +@@ -4366,7 +4366,7 @@ + * the default is to only do this for VMs with nested paging and AMD-V or + * unrestricted guest mode. + */ +- rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "RDSEED", &pConfig->enmRdSeed, fNestedPagingAndFullGuestExec); ++ rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "RDSEED", &pConfig->enmRdSeed, fEnforceHWusage); + AssertLogRelRCReturn(rc, rc); + + /** @cfgm{/CPUM/IsaExts/CLFLUSHOPT, isaextcfg, depends} diff --git a/repos/ports/src/virtualbox6/patches/series b/repos/ports/src/virtualbox6/patches/series index a5549d2c72..b879675db0 100644 --- a/repos/ports/src/virtualbox6/patches/series +++ b/repos/ports/src/virtualbox6/patches/series @@ -15,3 +15,4 @@ sup_ioctl_query_func_size.patch disk_geometry.patch stack_size.patch avx.patch +rdrand.patch