]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
iommu/amd: Copy old trans table from old kernel
authorBaoquan He <bhe@redhat.com>
Wed, 9 Aug 2017 08:33:38 +0000 (16:33 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 15 Aug 2017 16:14:39 +0000 (18:14 +0200)
commit3ac3e5ee5ed56b07448f295902e44916eb6979fc
tree1e6c62c314a67922605b7d959708c77157e13d50
parent45a01c42933b93e59811099f97aa4179d499a42c
iommu/amd: Copy old trans table from old kernel

Here several things need be done:
- If iommu is pre-enabled in a normal kernel, just disable it and print
  warning.

- If any one of IOMMUs is not pre-enabled in kdump kernel, just continue
  as it does in normal kernel.

- If failed to copy dev table of old kernel, continue to proceed as
  it does in normal kernel.

- Only if all IOMMUs are pre-enabled and copy dev table is done well, free
  the dev table allocated in early_amd_iommu_init() and make amd_iommu_dev_table
  point to the copied one.

- Disable and Re-enable event/cmd buffer,  install the copied DTE table
  to reg, and detect and enable guest vapic.

- Flush all caches

Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_init.c