diff options
author | Keir Fraser <keir@xensource.com> | 2007-10-30 10:39:52 +0000 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-10-30 10:39:52 +0000 |
commit | 06e3f8f27662a8c1af0a4a43558a1dac65c2a97b (patch) | |
tree | 7730be68beaeba6b22e131fc5e3361692542b08a /xen/arch/x86/hvm/irq.c | |
parent | dbda63b318ad6a16e20ba8d934645799d3984593 (diff) | |
download | xen-06e3f8f27662a8c1af0a4a43558a1dac65c2a97b.tar.gz xen-06e3f8f27662a8c1af0a4a43558a1dac65c2a97b.tar.bz2 xen-06e3f8f27662a8c1af0a4a43558a1dac65c2a97b.zip |
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>
Diffstat (limited to 'xen/arch/x86/hvm/irq.c')
-rw-r--r-- | xen/arch/x86/hvm/irq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index 9d1d2d7e49..b789fbfc34 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -26,7 +26,7 @@ #include <asm/hvm/domain.h> #include <asm/hvm/support.h> -void __hvm_pci_intx_assert( +static void __hvm_pci_intx_assert( struct domain *d, unsigned int device, unsigned int intx) { struct hvm_irq *hvm_irq = &d->arch.hvm_domain.irq; @@ -59,7 +59,7 @@ void hvm_pci_intx_assert( spin_unlock(&d->arch.hvm_domain.irq_lock); } -void __hvm_pci_intx_deassert( +static void __hvm_pci_intx_deassert( struct domain *d, unsigned int device, unsigned int intx) { struct hvm_irq *hvm_irq = &d->arch.hvm_domain.irq; |