Re: [PATCH v9 13/22] KVM: VMX: Virtualize FRED nested exception tracking
From: Sean Christopherson
Date: Fri Mar 06 2026 - 21:07:17 EST
On Sun, Oct 26, 2025, Xin Li (Intel) wrote:
> arch/x86/include/asm/kvm_host.h | 4 +++-
> arch/x86/include/asm/vmx.h | 5 ++++-
> arch/x86/kvm/svm/svm.c | 2 +-
> arch/x86/kvm/vmx/vmx.c | 6 +++++-
> arch/x86/kvm/x86.c | 13 ++++++++++++-
> arch/x86/kvm/x86.h | 1 +
> 6 files changed, 26 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 550a8716a227..3b6dadf368eb 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -760,6 +760,7 @@ struct kvm_queued_exception {
> u32 error_code;
> unsigned long payload;
> bool has_payload;
> + bool nested;
> u64 event_data;
> };
>
> @@ -2231,7 +2232,8 @@ void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr);
> void kvm_queue_exception_e(struct kvm_vcpu *vcpu, unsigned nr, u32 error_code);
> void kvm_queue_exception_p(struct kvm_vcpu *vcpu, unsigned nr, unsigned long payload);
> void kvm_requeue_exception(struct kvm_vcpu *vcpu, unsigned int nr,
> - bool has_error_code, u32 error_code, u64 event_data);
> + bool has_error_code, u32 error_code, bool nested,
I think we should pick a different name, as both VMX and SVM declare "nested" as
a global boolean. I.e. this creates some nasty variable shadowing.
Maybe is_nested?