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

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

In detail:
1. Fix a bug found in AMD IOMMU initialization.
Doing what we do serves as a fix for a bug found in AMD IOMMU initialization.

The current code is using spin_lock{_irqsave(), _irqrestore()} to
protect pci_get_dev() in the set_iommu_interrupt_handler(). However,
this can only be called during AMD IOMMU initialization, with interrupt
enabled, so at least it is not necessary to disable interrupts, or
save/restore interrupt flag.

In order to fix this, we can use just plain spin{_lock(),_unlock()},
instead of spin_lock{_irqsave(),_irqrestore()}.

2. Make the pcidevs_lock a recursive one.

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: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
CC: Feng Wu <feng.wu@intel.com>
CC: Kevin Tian <kevin.tian@intel.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>

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               | 96 +++++++++++++++++------------
 xen/drivers/passthrough/vtd/iommu.c         | 14 ++---
 xen/drivers/video/vga.c                     |  4 +-
 xen/include/xen/pci.h                       |  5 +-
 14 files changed, 108 insertions(+), 86 deletions(-)

-- 
1.9.1


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

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

end of thread, other threads:[~2016-03-08 13:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 11:09 [PATCH 0/2] Make the pcidevs_lock a recursive one Quan Xu
2016-03-08 11:09 ` [PATCH 1/2] IOMMU/spinlock: Fix a bug found in AMD IOMMU initialization Quan Xu
2016-03-08 12:12   ` Dario Faggioli
2016-03-08 12:35     ` Xu, Quan
2016-03-08 13:54   ` Jan Beulich
2016-03-08 11:09 ` [PATCH 2/2] IOMMU/spinlock: Make the pcidevs_lock a recursive one Quan Xu
2016-03-08 12:29   ` Dario Faggioli
2016-03-08 12:39     ` Xu, Quan
2016-03-08 13:48       ` Jan Beulich
2016-03-08 13:58         ` Xu, Quan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).