git: nvmm(4): Expose ARCH_CAP to guest only if the host CPU supports it
Aaron LI
aly at crater.dragonflybsd.org
Mon Jan 26 01:04:42 PST 2026
commit 01caa5e3ae83149daac28ad634f8236d39dbaedd
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/01caa5e3ae83149daac28ad634f8236d39dbaedd
--
DragonFly BSD source repository
More information about the Commits
mailing list