vt-d: Do dpci eoi outside of irq_lock.
authorKeir Fraser <keir@xensource.com>
Tue, 30 Oct 2007 10:39:52 +0000 (10:39 +0000)
committerKeir Fraser <keir@xensource.com>
Tue, 30 Oct 2007 10:39:52 +0000 (10:39 +0000)
commit06e3f8f27662a8c1af0a4a43558a1dac65c2a97b
tree7730be68beaeba6b22e131fc5e3361692542b08a
parentdbda63b318ad6a16e20ba8d934645799d3984593
vt-d: Do dpci eoi outside of irq_lock.

Deadlock may occur if do hvm_dpci_eoi() inside of irq_lock on MP
platform. For example, there are two physical cpus. If interrupt is
injected on cpu0, but vcpu is migrated to cpu1 and it does eoi inside
of irq_lock, then IPI will be issued to cpu0. At the same time, cpu0
may have disabled irq and is acquiring the same irq_lock. In addition,
current code cannot guarantee do hvm_dpci_eoi() inside of irq_lock
when timeout. This patch does hvm_dpci_eoi() outside of irq_lock, and
solves above problems.

Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/irq.c
xen/arch/x86/hvm/vioapic.c
xen/arch/x86/hvm/vmx/vtd/io.c
xen/arch/x86/hvm/vpic.c
xen/include/asm-x86/hvm/irq.h