On 17/07/21 05:55, Zeng Guang wrote:
Understood, but in practice all uses of vmx->ipiv_active are guarded byenable_ipiv as a global variable indicates the hardware capability to+ if (vmx->ipiv_active)This should be if (enable_ipiv) instead, I think.
+ install_pid(vmx);
In fact, in all other places that are using vmx->ipiv_active, you can
actually replace it with enable_ipiv; they are all reached only with
kvm_vcpu_apicv_active(vcpu) == true.
enable IPIv. Each VM may have different IPIv configuration according to
kvm_vcpu_apicv_active status. So we use ipiv_active per VM to enclose
IPIv related operations.
kvm_vcpu_apicv_active so they are always reached with vmx->ipiv_active
== enable_ipiv.
The one above instead seems wrong and should just use enable_ipiv.
Paolo