KVM: SVM: Consolidate IRTE update when toggling AVIC on/off
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:46:02 +0000 (15:46 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 23 Jun 2025 16:50:50 +0000 (09:50 -0700)
commit5f3d06b1648e0878f04e3d4819f2ef16c1b40bbf
treeda6cd37ba12a0a19da03891e10b0f2c0326e00ab
parent6eab2340f339cabb63079c94e5dbaea4d90007df
KVM: SVM: Consolidate IRTE update when toggling AVIC on/off

Fold the IRTE modification logic in avic_refresh_apicv_exec_ctrl() into
__avic_vcpu_{load,put}(), and add a param to the helpers to communicate
whether or not AVIC is being toggled, i.e. if IRTE needs a "full" update,
or just a quick update to set the CPU and IsRun.

Link: https://lore.kernel.org/r/20250611224604.313496-61-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c