[Bug 203643] [bhyve] NetBSD causes bhyve to exit on AMD processors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Apr 2025 00:48:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203643
--- Comment #15 from Keith White <kwhite.uottawa@gmail.com> ---
No, I had not tried #10. I still wanted to see any errors and to be able to
turn any workaround on/off.
Thanks for the suggestion, though! I tried a modified version of #10 that
provides a hw.vmm.svm.disable_decode_assist sysctl that optionally disables the
decode_assist() check. This too works for me.
A long-winded way of saying "yes" #10 also works for me.
diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c
index 6c16daaa47c2..63f559037687 100644
--- a/sys/amd64/vmm/amd/svm.c
+++ b/sys/amd64/vmm/amd/svm.c
@@ -122,6 +122,11 @@ static uint32_t nasid;
SYSCTL_UINT(_hw_vmm_svm, OID_AUTO, num_asids, CTLFLAG_RDTUN, &nasid, 0,
"Number of ASIDs supported by this processor");
+/* AMD A8 has no decode_assist, allow disabling the check */
+static int disable_decode_assist;
+SYSCTL_INT(_hw_vmm_svm, OID_AUTO, disable_decode_assist, CTLFLAG_RWTUN,
+ &disable_decode_assist, 0, "Set to 1 to disable the decode_assist check");
+
/* Current ASID generation for each host cpu */
static struct asid asid[MAXCPU];
@@ -146,7 +151,7 @@ static __inline int
decode_assist(void)
{
- return (svm_feature & AMD_CPUID_SVM_DECODE_ASSIST);
+ return ((svm_feature & AMD_CPUID_SVM_DECODE_ASSIST) ||
disable_decode_assist);
}
static void
--
You are receiving this mail because:
You are the assignee for the bug.