xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/7]  VT-d Device-TLB flush issue
@ 2016-02-05 10:18 Quan Xu
  2016-02-05 10:18 ` [PATCH v5 1/7] VT-d: Check VT-d Device-TLB flush error(IOMMU part) Quan Xu
                   ` (6 more replies)
  0 siblings, 7 replies; 31+ messages in thread
From: Quan Xu @ 2016-02-05 10:18 UTC (permalink / raw)
  To: jbeulich, kevin.tian
  Cc: feng.wu, george.dunlap, andrew.cooper3, tim, xen-devel, Quan Xu

This patches fix current timeout concern and also allow limited ATS support:

1. Check VT-d Device-TLB flush error.
   This patch checks all kinds of error and all the way up the call trees of VT-d Device-TLB flush.

2. Reduce spin timeout to 1ms, which can be boot-time changed with 'vtd_qi_timeout'.
   For example:
           multiboot /boot/xen.gz ats=1 vtd_qi_timeout=100

3. Pass down a flag indicating whether the lock is being held.
 
4. Fix vt-d Device-TLB flush timeout issue.
   If Device-TLB flush is timeout, we'll hide the target ATS device and crash the domain owning this ATS device.
   If impacted domain is hardware domain, just throw out a warning.
   The hidden device will be disallowed to be further assigned to  any domain.

---- 

 * DMAR_OPERATION_TIMEOUT should be also chopped down to a low number of milliseconds.
   As Kevin Tian mentioned in 'Revisit VT-d asynchronous flush issue', We also confirmed with hardware team
   that 1ms is large enough for IOMMU internal flush. So I can change DMAR_OPERATION_TIMEOUT from 1000 ms to 1 ms.

   IOMMU_WAIT_OP() is only for VT-d registers read/write, and there is also a panic. We need a further discussion
   whether or how to remove this panic in next patch set.

 * The coming patch set will fix IOTLB/Context/IETC flush timeout.

-Changes in v5:
  * Split the 'check VT-d Device-TLB flush error' into MMU part and IOMMU part. (P1-P2)
  * Add a new standalone entry for new command 'vtd_qi_timeout' in docs/misc/xen-command-line.markdown.(P3)
  * Change the option name from 'iommu_qi_timeout_ms' to 'vtd_qi_timeout'.(P3)
  * Pass down a flag indicating whether the lock is being held.(P4-P6)
  * Fix multiple return points when this can be trivially avoided.(P7)
  * Enhance the print out message. (P7)
  * Enhance the comment.(P7)
  * Consult the bitmap along with the domain ID array.(P7)



Quan Xu (7):
  VT-d: Check VT-d Device-TLB flush error(IOMMU part).
  VT-d: Check VT-d Device-TLB flush error(MMU part).
  VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
  VT-d: Refactor iommu_ops .iotlb_flush() and iotlb_flush_all()
  VT-d: Refactor iommu_ops .map_page() and unmap_page()
  VT-d: Refactor iommu_flush .iotlb()
  VT-d: Fix vt-d Device-TLB flush timeout issue.

 docs/misc/xen-command-line.markdown           |   7 ++
 xen/arch/arm/p2m.c                            |   2 +-
 xen/arch/x86/acpi/power.c                     |   6 +-
 xen/arch/x86/crash.c                          |   3 +-
 xen/arch/x86/domain_build.c                   |   5 +-
 xen/arch/x86/mm.c                             |  15 ++-
 xen/arch/x86/mm/p2m-ept.c                     |  15 ++-
 xen/arch/x86/mm/p2m-pt.c                      |  14 ++-
 xen/arch/x86/mm/p2m.c                         |  24 ++--
 xen/arch/x86/x86_64/mm.c                      |   5 +-
 xen/common/domain.c                           |   2 +-
 xen/common/grant_table.c                      |  16 ++-
 xen/common/memory.c                           |   5 +-
 xen/drivers/passthrough/amd/iommu_init.c      |   4 +-
 xen/drivers/passthrough/amd/iommu_map.c       |   7 +-
 xen/drivers/passthrough/amd/pci_amd_iommu.c   |   7 +-
 xen/drivers/passthrough/arm/smmu.c            |  15 ++-
 xen/drivers/passthrough/iommu.c               |  47 ++++---
 xen/drivers/passthrough/pci.c                 |   2 +-
 xen/drivers/passthrough/vtd/extern.h          |  12 +-
 xen/drivers/passthrough/vtd/iommu.c           | 173 +++++++++++++++++---------
 xen/drivers/passthrough/vtd/iommu.h           |   3 +-
 xen/drivers/passthrough/vtd/qinval.c          |  93 +++++++++++++-
 xen/drivers/passthrough/vtd/quirks.c          |  26 ++--
 xen/drivers/passthrough/vtd/x86/ats.c         |  14 ++-
 xen/drivers/passthrough/vtd/x86/vtd.c         |  18 ++-
 xen/drivers/passthrough/x86/iommu.c           |   9 +-
 xen/include/asm-x86/hvm/svm/amd-iommu-proto.h |   8 +-
 xen/include/asm-x86/iommu.h                   |   3 +-
 xen/include/asm-x86/p2m.h                     |   6 +-
 xen/include/xen/iommu.h                       |  37 +++---
 31 files changed, 429 insertions(+), 174 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2016-02-23 15:53 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-05 10:18 [PATCH v5 0/7] VT-d Device-TLB flush issue Quan Xu
2016-02-05 10:18 ` [PATCH v5 1/7] VT-d: Check VT-d Device-TLB flush error(IOMMU part) Quan Xu
2016-02-10 17:01   ` Jan Beulich
2016-02-16 10:50     ` Xu, Quan
2016-02-16 11:06       ` Jan Beulich
2016-02-17 12:49         ` Xu, Quan
2016-02-17 13:05           ` Jan Beulich
2016-02-17 13:38             ` Xu, Quan
2016-02-18  6:15               ` Tian, Kevin
2016-02-18  6:33                 ` Xu, Quan
2016-02-18  6:37                   ` Tian, Kevin
2016-02-18  6:42                     ` Xu, Quan
2016-02-23 11:43     ` Xu, Quan
2016-02-23 15:53       ` Jan Beulich
2016-02-05 10:18 ` [PATCH v5 2/7] VT-d: Check VT-d Device-TLB flush error(MMU part) Quan Xu
2016-02-17 14:02   ` Jan Beulich
2016-02-05 10:18 ` [PATCH v5 3/7] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed Quan Xu
2016-02-17 14:06   ` Jan Beulich
2016-02-05 10:18 ` [PATCH v5 4/7] VT-d: Refactor iommu_ops .iotlb_flush() and iotlb_flush_all() Quan Xu
2016-02-17 14:19   ` Jan Beulich
2016-02-18  8:50     ` Xu, Quan
2016-02-05 10:18 ` [PATCH v5 5/7] VT-d: Refactor iommu_ops .map_page() and unmap_page() Quan Xu
2016-02-17 14:23   ` Jan Beulich
2016-02-05 10:18 ` [PATCH v5 6/7] VT-d: Refactor iommu_flush .iotlb() Quan Xu
2016-02-05 10:18 ` [PATCH v5 7/7] VT-d: Fix vt-d Device-TLB flush timeout issue Quan Xu
2016-02-17 14:40   ` Jan Beulich
2016-02-18  7:36     ` Xu, Quan
2016-02-18  8:35       ` Jan Beulich
2016-02-18  8:47         ` Xu, Quan
2016-02-18  9:21           ` Jan Beulich
2016-02-18 10:00             ` 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).