All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Make the pcidevs_lock a recursive one
@ 2016-03-10 14:10 Quan Xu
  2016-03-10 14:10 ` [PATCH v4 1/2] IOMMU/spinlock: Fix a bug found in AMD IOMMU initialization Quan Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Quan Xu @ 2016-03-10 14:10 UTC (permalink / raw)
  To: xen-devel
  Cc: Kevin Tian, Feng Wu, Jan Beulich, Andrew Cooper, Dario Faggioli,
	Suravee Suthikulpanit, Quan Xu, Keir Fraser

This patch set makes the pcidevs_lock a recursive one, as pcidevs_lock is
going to be recursively taken for hiding ATS device, when VT-d Device-TLB flush
timed out. It is a prereq patch set for Patch:'VT-d Device-TLB flush issue'.

In detail:
 1. Fix a bug found in AMD IOMMU initialization

  pcidevs_lock doesn't require interrupts to be disabled while being acquired.
  However there remains an exception in AMD IOMMU code, where the lock is
  acquired with interrupt disabled. This inconsistency might lead to deadlock.

  The fix is straightforward to use spin_lock instead. Also interrupt has been
  enabled when this function is invoked, so we're sure consistency around
  pcidevs_lock can be guaranteed after this fix.

 2. Make the pcidevs_lock a recursive one.

  pcidevs_lock is going to be recursively taken for hiding ATS device,
  when VT-d Device-TLB flush timed out.



CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
CC: Feng Wu <feng.wu@intel.com>
CC: Kevin Tian <kevin.tian@intel.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>

--Changes in v4:
 * Enhance changelogs.
 * Rebase against 0aa1330aac92.

Quan Xu (2):
  IOMMU/spinlock: Fix a bug found in AMD IOMMU initialization
  IOMMU/spinlock: Make the pcidevs_lock a recursive one.

 xen/arch/x86/domctl.c                       |  8 +--
 xen/arch/x86/hvm/vmsi.c                     |  4 +-
 xen/arch/x86/irq.c                          |  8 +--
 xen/arch/x86/msi.c                          | 16 ++---
 xen/arch/x86/pci.c                          |  4 +-
 xen/arch/x86/physdev.c                      | 16 ++---
 xen/common/sysctl.c                         |  4 +-
 xen/drivers/passthrough/amd/iommu_init.c    |  9 ++-
 xen/drivers/passthrough/amd/iommu_map.c     |  2 +-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |  4 +-
 xen/drivers/passthrough/pci.c               | 97 ++++++++++++++++++-----------
 xen/drivers/passthrough/vtd/intremap.c      |  2 +-
 xen/drivers/passthrough/vtd/iommu.c         | 14 ++---
 xen/drivers/video/vga.c                     |  4 +-
 xen/include/xen/pci.h                       |  5 +-
 15 files changed, 110 insertions(+), 87 deletions(-)

-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-03-17  2:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 14:10 [PATCH v4 0/2] Make the pcidevs_lock a recursive one Quan Xu
2016-03-10 14:10 ` [PATCH v4 1/2] IOMMU/spinlock: Fix a bug found in AMD IOMMU initialization Quan Xu
2016-03-11  0:24   ` Tian, Kevin
2016-03-11  1:40     ` Xu, Quan
2016-03-10 14:10 ` [PATCH v4 2/2] IOMMU/spinlock: Make the pcidevs_lock a recursive one Quan Xu
2016-03-10 14:32   ` Jan Beulich
2016-03-10 14:38     ` Dario Faggioli
2016-03-11  1:38       ` Xu, Quan
2016-03-11  1:33     ` Xu, Quan
2016-03-16  2:39 ` [PATCH v4 0/2] " Xu, Quan
2016-03-16  8:39   ` Dario Faggioli
2016-03-16 10:45     ` Jan Beulich
2016-03-17  1:39       ` Xu, Quan
2016-03-17  2:07         ` Dario Faggioli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.