Re: [PATCH 5/7] KVM: SVM: Support FRED nested exception injection
From: Sean Christopherson
Date: Tue Mar 10 2026 - 13:01:38 EST
On Tue, Mar 10, 2026, Shivansh Dhiman wrote:
>
> On 07-03-2026 07:37, Sean Christopherson wrote:
> > On Thu, Jan 29, 2026, Shivansh Dhiman wrote:
> >> @@ -363,6 +363,7 @@ static void svm_inject_exception(struct kvm_vcpu *vcpu)
> >> {
> >> struct kvm_queued_exception *ex = &vcpu->arch.exception;
> >> struct vcpu_svm *svm = to_svm(vcpu);
> >> + bool nested = is_fred_enabled(vcpu) && ex->nested;
> >
> > Reverse fir-tree please (swap this with the line above it). Similar to my comment
> > on the VMX series, us is_nested to avoid shadowing the global nested.
>
> Sure. Adding is_nested() helper should be a better choice. Will do that in v2.
Please don't add is_nested(). In KVM, "nested" means nested virtualization.
I don't see any reason to add a wrapper, it's a single boolean.