Repository navigation
Description
On KVM on an AMD (SVM) host with kvm.ignore_msrs off (the default), binding a vCPU of a partition whose guest CPUID vendor is GenuineIntel fails with IncompleteMsrs { failed_msr: 58 } (IA32_FEATURE_CONTROL), although KVM itself can run such a guest. OpenVMM's own VMs do not reach this at the pin: without a time ABI the guest's vendor is the host's, and with one the generation check refuses an Intel CPU profile on an AMD host (E_CPU_GENERATION) before the partition is built. It affects a caller of the KVM backend that sets a GenuineIntel leaf 0 itself, through PartitionConfig::cpuid. Intel hosts are not affected, and neither are guests whose vendor is not GenuineIntel.
Reproduction
On an AMD host, build a KVM partition whose CPUID leaf 0 names GenuineIntel and call bind() on a VP. Expected: the bind succeeds. Actual: it fails with IncompleteMsrs { failed_msr: 58 }, in debug and release builds. This was seen on an EPYC 9V74 host (kvm_amd, Linux 6.8, ignore_msrs=N).
Cause
KvmProcessorBinder::bind (vmm_core/virt_kvm/src/arch/x86_64/mod.rs) writes a locked IA32_FEATURE_CONTROL when the guest's vendor, not the host's, is Intel:
// vmm_core/virt_kvm/src/arch/x86_64/mod.rs
if self.partition.caps.vendor.is_intel_compatible() {
// ...
kvm.set_msrs(&[(
x86defs::X86X_IA32_MSR_FEATURE_CONTROL,
u64::from(
x86defs::vmx::Ia32FeatureControl::new()
.with_locked(true)
.with_vmx_enabled_outside_smx(ecx.vmx()),
),
)])?;
}Only KVM's VMX module handles this MSR (vmx_set_msr). svm_set_msr and kvm_set_msr_common do not, so a nonzero host write fails unless ignore_msrs is set (Linux v6.8 and v6.17).
Fix
fix.patch adds host_vmx to the proto partition and to KvmPartitionInner, derived from the host vendor that new_partition already reads from KVM_GET_SUPPORTED_CPUID (host_runs_vmx: VMX unless AMD or Hygon). bind then writes IA32_FEATURE_CONTROL only when the host runs VMX and the guest vendor is GenuineIntel. Nothing changes on a VMX host. The native test only_a_vmx_host_has_feature_control covers the vendor mapping; the patch has no KVM-backed test.
Activity
tangruize commentedon Nov 8, 2026
Proposed patch
Patch against OpenVMM 3cf58a5234ed824435825c9f87187f5129219724. Save the contents below as
fix.patchand rungit apply fix.patch.fix.patch