From: Quan Xu <quan.xu@intel.com>
To: xen-devel@lists.xen.org
Cc: Kevin Tian <kevin.tian@intel.com>, Feng Wu <feng.wu@intel.com>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Dario Faggioli <dario.faggioli@citrix.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Quan Xu <quan.xu@intel.com>, Keir Fraser <keir@xen.org>
Subject: [PATCH v3 0/2] Make the pcidevs_lock a recursive one
Date: Wed, 9 Mar 2016 21:17:33 +0800 [thread overview]
Message-ID: <1457529455-38314-1-git-send-email-quan.xu@intel.com> (raw)
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 VT-d Device-TLB
flush timed out.
In detail:
1. Fix a bug found in AMD IOMMU initialization.
pcidevs_lock should be held with interrupt enabled. 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.
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 v3:
* Enhance patch1/2 changelog.
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/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, 109 insertions(+), 87 deletions(-)
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2016-03-09 13:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 13:17 Quan Xu [this message]
2016-03-09 13:17 ` [PATCH v3 1/2] IOMMU/spinlock: Fix a bug found in AMD IOMMU initialization Quan Xu
2016-03-09 14:59 ` Dario Faggioli
2016-03-10 6:12 ` Xu, Quan
2016-03-11 3:24 ` Meng Xu
2016-03-11 6:54 ` Xu, Quan
2016-03-11 10:35 ` Dario Faggioli
2016-03-11 12:36 ` Xu, Quan
2016-03-11 13:58 ` Dario Faggioli
2016-03-11 14:49 ` Meng Xu
2016-03-11 15:55 ` Dario Faggioli
2016-03-11 17:17 ` Meng Xu
2016-03-11 14:41 ` Meng Xu
2016-03-11 16:12 ` Dario Faggioli
2016-03-09 13:17 ` [PATCH v3 2/2] IOMMU/spinlock: Make the pcidevs_lock a recursive one Quan Xu
2016-03-09 17:45 ` Dario Faggioli
2016-03-10 1:21 ` Xu, Quan
2016-03-10 9:52 ` Jan Beulich
2016-03-10 11:27 ` Xu, Quan
2016-03-10 13:06 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457529455-38314-1-git-send-email-quan.xu@intel.com \
--to=quan.xu@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=feng.wu@intel.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).