]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Prepare VMCS setting for posted interrupt enabling when APICv is available
authorZeng Guang <guang.zeng@intel.com>
Tue, 15 Mar 2022 14:58:36 +0000 (22:58 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 2 Apr 2022 09:41:19 +0000 (05:41 -0400)
commitbebd6441544ae8c976355f682f2354647d167480
tree359ef693e09ffd034b3d0ae0e3e02f518b4f0bb0
parent20711052fb918094ff293fc83e433675f13a5e6a
KVM: VMX: Prepare VMCS setting for posted interrupt enabling when APICv is available

Currently KVM setup posted interrupt VMCS only depending on
per-vcpu APICv activation status at the vCPU creation time.
However, this status can be toggled dynamically under some
circumstance. So potentially, later posted interrupt enabling
may be problematic without VMCS readiness.

To fix this, always settle the VMCS setting for posted interrupt
as long as APICv is available and lapic locates in kernel.

Signed-off-by: Zeng Guang <guang.zeng@intel.com>
Message-Id: <20220315145836.9910-1-guang.zeng@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c