VMX: permanently assign PI hook vmx_pi_switch_to()
authorFeng Wu <feng.wu@intel.com>
Fri, 3 Mar 2017 10:57:30 +0000 (11:57 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Mar 2017 10:57:30 +0000 (11:57 +0100)
commit7c00de17562e28f01e188c6a2c240ebc21b9d4b7
tree6f3d6b82cda8f8b475065911052a8b6d4d618d89
parent7bdb974a82c1631bfc7451b9dd9756858617aef4
VMX: permanently assign PI hook vmx_pi_switch_to()

PI hook vmx_pi_switch_to() is needed even after any previously
assigned device is detached from the domain. Since 'SN' bit is
also used to control the CPU side PI and we change the state of
SN bit in vmx_pi_switch_to() and vmx_pi_switch_from(), then
evaluate this bit in vmx_deliver_posted_intr() when trying to
deliver the interrupt in posted way via software. The problem
is if we deassign the hooks while the vCPU is runnable in the
runqueue with 'SN' set, all the furture notificaton event will
be suppressed. This patch makes the hook permanently assigned.

Signed-off-by: Feng Wu <feng.wu@intel.com>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>).
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c