Re: [PATCH v3 07/10] KVM: nVMX: Switch to vmcs01 to refresh APICv controls on-demand if L2 is active

From: Chao Gao
Date: Thu Dec 25 2025 - 20:46:21 EST


On Fri, Dec 05, 2025 at 03:19:10PM -0800, Sean Christopherson wrote:
>If APICv is (un)inhibited while L2 is running, temporarily load vmcs01 and
>immediately refresh the APICv controls in vmcs01 instead of deferring the
>update until the next nested VM-Exit. This all but eliminates potential
>ordering issues due to vmcs01 not being synchronized with
>kvm_lapic.apicv_active, e.g. where KVM _thinks_ it refreshed APICv, but
>vmcs01 still contains stale state.
>
>Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Reviewed-by: Chao Gao <chao.gao@xxxxxxxxx>