git: DragonFly_RELEASE_6_4 nvmm(4): Expose ARCH_CAP to guest only if the host CPU supports it
Aaron LI
aly at crater.dragonflybsd.org
Mon Feb 2 05:16:09 PST 2026
commit 2779004480b7c397519c2eee6647564271cdbfdf
Author: Aaron LI <aly at aaronly.me>
Date: Mon Jan 26 14:23:29 2026 +0800
nvmm(4): Expose ARCH_CAP to guest only if the host CPU supports it
* Don't expose ARCH_CAP to guest on AMD CPUs, because the ARCH_CAP
feature bit and the IA32_ARCH_CAPABILITIES MSR are Intel-specific and
unavailable on AMD systems. I decided to not follow Linux KVM, which
chose to always provide ARCH_CAP and emulate the MSR for AMD CPUs.
* Check whether the host CPU supports the ARCH_CAP feature bit and only
expose it to the guest if the host supports it.
Credit to tuxillo and Claude Opus LLM for the analyses and initial
patches.
Summary of changes:
sys/dev/virtual/nvmm/x86/nvmm_x86.c | 4 ++--
sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 21 ++++++++++++++-------
2 files changed, 16 insertions(+), 9 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2779004480b7c397519c2eee6647564271cdbfdf
--
DragonFly BSD source repository
More information about the Commits
mailing list