Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Apr 2025 16:51:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 203643] [bhyve] NetBSD causes bhyve to exit on AMD processors
Message-ID:  <bug-203643-27103-awMAxpdYmn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-203643-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-203643-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203643

Keith White <kwhite.uottawa@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kwhite.uottawa@gmail.com

--- Comment #13 from Keith White <kwhite.uottawa@gmail.com> ---
A "me too" on this.

I'm using a quite old Lenovo Ideapad Z575 and vm-bhyve.  The SVM error is
slightly different, it looks like EDK2 is trying to access 0x511 (Firmware
port?). I used a different workaround: update bhyve(8) to log and ignore SVM
errors if environment variable "_BHYVE_AMD_A8_ENABLE_" is set.

=3D=3D=3D=3D head /var/run/dmesg.boot =3D=3D=3D=3D=3D
Copyright (c) 1992-2025 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 15.0-CURRENT #4 main-n276261-297473069610-dirty: Mon Apr  7 12:16:25
EDT 2025
    root@dell7390:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64
FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git
llvmorg-19.1.7-0-gcd708029e0b2)
VT(vga): resolution 640x480
CPU: AMD A8-3500M APU with Radeon(tm) HD Graphics (1497.33-MHz K8-class CPU)
  Origin=3D"AuthenticAMD"  Id=3D0x300f10  Family=3D0x12  Model=3D0x1  Stepp=
ing=3D0
=20
Features=3D0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,=
MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=3D0x802009<SSE3,MON,CX16,POPCNT>
  AMD
Features=3D0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow=
!>
  AMD
Features2=3D0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS=
,SKINIT,WDT>
  SVM: NP,NRIP,NAsids=3D64
  TSC: P-state invariant, performance statistics

=3D=3D=3D=3D=3D bhyve.log =3D=3D=3D=3D=3D
vm exit[0]
        reason          SVM
        rip             0x000000007fa6e480
        inst_length     2
        exitcode        0x7b
        exitinfo1       0x511021d
        exitinfo2       0x7fa6e482


=3D=3D=3D=3D usr.sbin/bhyve/amd64/vmexit.c patch =3D=3D=3D=3D
diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c
index 944f5de34645..94dde19eb931 100644
--- a/usr.sbin/bhyve/amd64/vmexit.c
+++ b/usr.sbin/bhyve/amd64/vmexit.c
@@ -288,6 +288,10 @@ vmexit_svm(struct vmctx *ctx __unused, struct vcpu *vc=
pu,
struct vm_run *vmrun)
        EPRINTLN("\texitcode\t%#lx", vme->u.svm.exitcode);
        EPRINTLN("\texitinfo1\t%#lx", vme->u.svm.exitinfo1);
        EPRINTLN("\texitinfo2\t%#lx", vme->u.svm.exitinfo2);
+       if (getenv("_BHYVE_AMD_A8_ENABLE_")) { /* workaround for Lenovo Ide=
apad
Z575 */
+               EPRINTLN("\tignoring\t_BHYVE_AMD_A8_ENABLE_ defined");
+               return (VMEXIT_CONTINUE);
+       }
        return (VMEXIT_ABORT);
 }

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203643-27103-awMAxpdYmn>