[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7d0817ab09b55e055c344418008083d7049ab39b.1770116051.git.isaku.yamahata@intel.com>
Date: Tue, 3 Feb 2026 10:16:59 -0800
From: isaku.yamahata@...el.com
To: kvm@...r.kernel.org
Cc: isaku.yamahata@...el.com,
isaku.yamahata@...il.com,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 16/32] KVM: nVMX: Add VM entry checks related to APIC timer virtualization
From: Isaku Yamahata <isaku.yamahata@...el.com>
Add checks of VMX controls for APIC timer virtualization on VM entries.
The spec adds some checks on VMX controls related to the APIC timer
virtualization on VM entry.
Signed-off-by: Isaku Yamahata <isaku.yamahata@...el.com>
---
arch/x86/kvm/vmx/nested.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 66adc1821671..c8b42c880300 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -3064,6 +3064,12 @@ static int nested_check_vm_execution_controls(struct kvm_vcpu *vcpu,
CC(!vmcs12->tsc_multiplier))
return -EINVAL;
+ if (nested_cpu_has_guest_apic_timer(vmcs12) &&
+ (CC(!nested_cpu_has_vid(vmcs12)) ||
+ CC(nested_cpu_has(vmcs12, CPU_BASED_RDTSC_EXITING)) ||
+ CC(vmcs12->virtual_timer_vector > 255)))
+ return -EINVAL;
+
return 0;
}
--
2.45.2
Powered by blists - more mailing lists