git: 68f884265293 - stable/14 - amd64/vmm: Don't advertise support for performance counters

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 26 Oct 2026 19:47:02 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=68f88426529320b008ca8a60c2556dcbbadd61df

commit 68f88426529320b008ca8a60c2556dcbbadd61df
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-10-14 15:55:51 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-10-26 14:35:02 +0000

    amd64/vmm: Don't advertise support for performance counters
    
    vmm doesn't implement them, and after commit 2272fac218a8
    ("hwpmc: Add support for AMD-only IRPERF in hwpmc PERF class"), FreeBSD
    guests fail to boot since they access the unimplemented IRPERF MSR.
    
    MFC after:      1 week
    
    (cherry picked from commit c83e075d72f62c91cb27dd644a62d6a6f5bd56ba)
---
 sys/amd64/vmm/x86.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c
index 92133196d747..ee07842a20c8 100644
--- a/sys/amd64/vmm/x86.c
+++ b/sys/amd64/vmm/x86.c
@@ -138,8 +138,7 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx,
 				 * unsupported or unsafe AMD extended features
 				 * (8000_0008 EBX).
 				 */
-				regs[1] &= (AMDFEID_CLZERO | AMDFEID_IRPERF |
-				    AMDFEID_XSAVEERPTR);
+				regs[1] &= AMDFEID_CLZERO | AMDFEID_XSAVEERPTR;
 
 				vm_get_topology(vm, &sockets, &cores, &threads,
 				    &maxcpus);