** Description changed:

  [Impact]
- iommu/amd: Set exclusion range correctly
- 
- BugLink: https://bugs.launchpad.net/bugs/1823037
- 
- The exlcusion range limit register needs to contain the
- base-address of the last page that is part of the range, as
- bits 0-11 of this register are treated as 0xfff by the
- hardware for comparisons.
- 
- So correctly set the exclusion range in the hardware to the
- last page which is _in_ the range.
- 
- Fixes: b2026aa2dce44 ('x86, AMD IOMMU: add functions for programming IOMMU 
MMIO space')
- Signed-off-by: Joerg Roedel <jroe...@suse.de>
- 
- (cherry picked from commit 3c677d206210f53a4be972211066c0f1cd47fe12)
- Signed-off-by: Jeffrey Lane <jeffrey.l...@canonical.com>
- 
  iommu/amd: Reserve exclusion range in iova-domain
  
  BugLink: https://bugs.launchpad.net/bugs/1823037
  
  If a device has an exclusion range specified in the IVRS
  table, this region needs to be reserved in the iova-domain
  of that device. This hasn't happened until now and can cause
  data corruption on data transfered with these devices.
  
  Treat exclusion ranges as reserved regions in the iommu-core
  to fix the problem.
  
  Fixes: be2a022c0dd0 ('x86, AMD IOMMU: add functions to parse IOMMU memory 
mapping requirements for devices')
  Signed-off-by: Joerg Roedel <jroe...@suse.de>
  Reviewed-by: Gary R Hook <gary.h...@amd.com>
  
  (cherry picked from commit 8aafaaf2212192012f5bae305bb31cdf7681d777)
  Signed-off-by: Jeffrey Lane <jeffrey.l...@canonical.com>
  
- [Test Case]
+ iommu/amd: Set exclusion range correctly
+ 
+ BugLink: https://bugs.launchpad.net/bugs/1823037
+ 
+ The exlcusion range limit register needs to contain the
+ base-address of the last page that is part of the range, as
+ bits 0-11 of this register are treated as 0xfff by the
+ hardware for comparisons.
+ 
+ So correctly set the exclusion range in the hardware to the
+ last page which is _in_ the range.
+ 
+ Fixes: b2026aa2dce44 ('x86, AMD IOMMU: add functions for programming IOMMU 
MMIO space')
+ Signed-off-by: Joerg Roedel <jroe...@suse.de>
+ 
+ (cherry picked from commit 3c677d206210f53a4be972211066c0f1cd47fe12)
+ Signed-off-by: Jeffrey Lane <jeffrey.l...@canonical.com>
+ 
  
  [Fixes]
  Cherry pick the following from Mainline
  fd3b3448cf5adc2a2f09b70eaad03c27fe79e7a6 iommu/amd: Reserve exclusion range 
in iova-domain
  3c677d206210f53a4be972211066c0f1cd47fe12 iommu/amd: Set exclusion range 
correctly
  
  These can be picked from my branches here:
  Bionic:
  https://code.launchpad.net/~bladernr/ubuntu/+source/linux/+git/bionic 
1823037-amd_iommu-cherrypick
  b7abdb585d0ae4193add1f7038476cd8d6dd7f41 iommu/amd: Reserve exclusion range 
in iova-domain
  ee4a87e6b7fe7e039c1f02c50c53da63e4270732
  
  Cosmic: https://code.launchpad.net/~bladernr/ubuntu/+source/linux/+git/cosmic 
1823037-amd_iommu-cherrypick
  0acc8c0e862b46b12c233abd76593420f4a20e0c iommu/amd: Reserve exclusion range 
in iova-domain
  fbead5d71bfc2a49ffca8d181e2708fd616e9a7f iommu/amd: Set exclusion range 
correctly
  
- 
  Disco:
  https://code.launchpad.net/~bladernr/ubuntu/+source/linux/+git/disco 
1823037-amd_iommu-cherrypick
  6ddc207ca0d442b413ea7f059937ba90e5139753 iommu/amd: Set exclusion range 
correctly
  
- 
- Note Disco only required f1cd47fe12 as the first patch was already picked in 
LP: #1830934
+ Note Disco only required f1cd47fe12 as the first patch was already
+ picked in LP: #1830934
  
  Not necessary for Eoan as these are already upstream in 5.2-rc1
  
  [Regression Risk]
- Low,
- Only affects the amd_iommu driver:
-     drivers/iommu/amd_iommu*
+ Low,this adds memory range protection to the driver and has already been 
acked upstream.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1823037

Title:
  amd_iommu possible data corruption

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1823037/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to