Re: [PATCH v2 2/3] KVM: SVM: Use "is AVIC-addressable" helper to sanity check load()/put()
From: Naveen N Rao
Date: Thu Sep 24 2026 - 07:53:30 EST
On Wed, Sep 23, 2026 at 08:51:07AM -0700, Sean Christopherson wrote:
> Use avic_is_addressable_vcpu() instead of open coding a check on the bounds
> of the allocated table for the sanity checks when loading/putting AVIC
> state for a vCPU. If KVM botches the allocation, then KVM will already
> have performed an OOB write in avic_init_backing_page(), i.e. being super
> paranoid in load()/put() doesn't provide meaningful protection in practice.
>
> Cc: Naveen N Rao (AMD) <naveen@xxxxxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
> arch/x86/kvm/svm/avic.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Reviewed-by: Naveen N Rao (AMD) <naveen@xxxxxxxxxx>
- Naveen