Commit 6d39bde
iommu/amd: Enforce 4k mapping for certain IOMMU data structures
AMD IOMMU requires 4k-aligned pages for the event log, the PPR log,
and the completion wait write-back regions. However, when allocating
the pages, they could be part of large mapping (e.g. 2M) page.
This causes #PF due to the SNP RMP hardware enforces the check based
on the page level for these data structures.
So, fix by calling set_memory_4k() on the allocated pages.
Fixes: c69d89a ("iommu/amd: Use 4K page for completion wait write-back semaphore")
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Link: https://lore.kernel.org/r/20201105145832.3065-1-suravee.suthikulpanit@amd.com
Signed-off-by: Will Deacon <will@kernel.org>1 parent 91c2c28 commit 6d39bde
1 file changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
675 | 692 | | |
676 | 693 | | |
677 | 694 | | |
678 | | - | |
679 | | - | |
| 695 | + | |
| 696 | + | |
680 | 697 | | |
681 | 698 | | |
682 | 699 | | |
| |||
715 | 732 | | |
716 | 733 | | |
717 | 734 | | |
718 | | - | |
719 | | - | |
| 735 | + | |
| 736 | + | |
720 | 737 | | |
721 | 738 | | |
722 | 739 | | |
| |||
838 | 855 | | |
839 | 856 | | |
840 | 857 | | |
841 | | - | |
| 858 | + | |
842 | 859 | | |
843 | 860 | | |
844 | 861 | | |
| |||
0 commit comments