|
Joerg Roedel |
8fd507 |
From: Baoquan He <bhe@redhat.com>
|
|
Joerg Roedel |
8fd507 |
Date: Wed, 9 Aug 2017 16:33:35 +0800
|
|
Joerg Roedel |
8fd507 |
Subject: Revert "iommu/amd: Suppress IO_PAGE_FAULTs in kdump kernel"
|
|
Joerg Roedel |
8fd507 |
Patch-mainline: v4.14-rc1
|
|
Joerg Roedel |
8fd507 |
Git-commit: 9494ea90a56d013f4257686c8daf49203cd900c0
|
|
Joerg Roedel |
8fd507 |
References: bsc#1043261
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
This reverts commit 54bd63570484167cb13edf81e31fff107b879981.
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
We still need the IO_PAGE_FAULT message to warn error after the
|
|
Joerg Roedel |
8fd507 |
issue of on-flight dma in kdump kernel is fixed.
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
Signed-off-by: Baoquan He <bhe@redhat.com>
|
|
Joerg Roedel |
8fd507 |
Signed-off-by: Joerg Roedel <jroedel@suse.de>
|
|
Joerg Roedel |
8fd507 |
---
|
|
Joerg Roedel |
8fd507 |
drivers/iommu/amd_iommu.c | 3 +--
|
|
Joerg Roedel |
8fd507 |
drivers/iommu/amd_iommu_init.c | 9 ---------
|
|
Joerg Roedel |
8fd507 |
drivers/iommu/amd_iommu_types.h | 1 -
|
|
Joerg Roedel |
8fd507 |
3 files changed, 1 insertion(+), 12 deletions(-)
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
--- a/drivers/iommu/amd_iommu.c
|
|
Joerg Roedel |
8fd507 |
+++ b/drivers/iommu/amd_iommu.c
|
|
Joerg Roedel |
8fd507 |
@@ -2086,8 +2086,7 @@ static void set_dte_entry(u16 devid, str
|
|
Joerg Roedel |
8fd507 |
flags |= tmp;
|
|
Joerg Roedel |
8fd507 |
}
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
-
|
|
Joerg Roedel |
8fd507 |
- flags &= ~(DTE_FLAG_SA | 0xffffULL);
|
|
Joerg Roedel |
8fd507 |
+ flags &= ~(0xffffUL);
|
|
Joerg Roedel |
8fd507 |
flags |= domain->id;
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
amd_iommu_dev_table[devid].data[1] = flags;
|
|
Joerg Roedel |
8fd507 |
--- a/drivers/iommu/amd_iommu_init.c
|
|
Joerg Roedel |
8fd507 |
+++ b/drivers/iommu/amd_iommu_init.c
|
|
Joerg Roedel |
8fd507 |
@@ -30,7 +30,6 @@
|
|
Joerg Roedel |
8fd507 |
#include <linux/iommu.h>
|
|
Joerg Roedel |
8fd507 |
#include <linux/kmemleak.h>
|
|
Joerg Roedel |
8fd507 |
#include <linux/mem_encrypt.h>
|
|
Joerg Roedel |
8fd507 |
-#include <linux/crash_dump.h>
|
|
Joerg Roedel |
8fd507 |
#include <asm/pci-direct.h>
|
|
Joerg Roedel |
8fd507 |
#include <asm/iommu.h>
|
|
Joerg Roedel |
8fd507 |
#include <asm/gart.h>
|
|
Joerg Roedel |
8fd507 |
@@ -1943,14 +1942,6 @@ static void init_device_table_dma(void)
|
|
Joerg Roedel |
8fd507 |
for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) {
|
|
Joerg Roedel |
8fd507 |
set_dev_entry_bit(devid, DEV_ENTRY_VALID);
|
|
Joerg Roedel |
8fd507 |
set_dev_entry_bit(devid, DEV_ENTRY_TRANSLATION);
|
|
Joerg Roedel |
8fd507 |
- /*
|
|
Joerg Roedel |
8fd507 |
- * In kdump kernels in-flight DMA from the old kernel might
|
|
Joerg Roedel |
8fd507 |
- * cause IO_PAGE_FAULTs. There are no reports that a kdump
|
|
Joerg Roedel |
8fd507 |
- * actually failed because of that, so just disable fault
|
|
Joerg Roedel |
8fd507 |
- * reporting in the hardware to get rid of the messages
|
|
Joerg Roedel |
8fd507 |
- */
|
|
Joerg Roedel |
8fd507 |
- if (is_kdump_kernel())
|
|
Joerg Roedel |
8fd507 |
- set_dev_entry_bit(devid, DEV_ENTRY_NO_PAGE_FAULT);
|
|
Joerg Roedel |
8fd507 |
}
|
|
Joerg Roedel |
8fd507 |
}
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
--- a/drivers/iommu/amd_iommu_types.h
|
|
Joerg Roedel |
8fd507 |
+++ b/drivers/iommu/amd_iommu_types.h
|
|
Joerg Roedel |
8fd507 |
@@ -322,7 +322,6 @@
|
|
Joerg Roedel |
8fd507 |
#define IOMMU_PTE_IW (1ULL << 62)
|
|
Joerg Roedel |
8fd507 |
|
|
Joerg Roedel |
8fd507 |
#define DTE_FLAG_IOTLB (1ULL << 32)
|
|
Joerg Roedel |
8fd507 |
-#define DTE_FLAG_SA (1ULL << 34)
|
|
Joerg Roedel |
8fd507 |
#define DTE_FLAG_GV (1ULL << 55)
|
|
Joerg Roedel |
8fd507 |
#define DTE_FLAG_MASK (0x3ffULL << 32)
|
|
Joerg Roedel |
8fd507 |
#define DTE_GLX_SHIFT (56)
|