Commit c69d89a
iommu/amd: Use 4K page for completion wait write-back semaphore
IOMMU SNP support requires the completion wait write-back semaphore to be
implemented using a 4K-aligned page, where the page address is to be
programmed into the newly introduced MMIO base/range registers.
This new scheme uses a per-iommu atomic variable to store the current
semaphore value, which is incremented for every completion wait command.
Since this new scheme is also compatible with non-SNP mode,
generalize the driver to use 4K page for completion-wait semaphore in
both modes.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Link: https://lore.kernel.org/r/20200923121347.25365-2-suravee.suthikulpanit@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent 06ce8a6 commit c69d89a
3 files changed
+31
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
| 599 | + | |
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
816 | 829 | | |
817 | 830 | | |
818 | 831 | | |
| |||
1395 | 1408 | | |
1396 | 1409 | | |
1397 | 1410 | | |
| 1411 | + | |
1398 | 1412 | | |
1399 | 1413 | | |
1400 | 1414 | | |
| |||
1481 | 1495 | | |
1482 | 1496 | | |
1483 | 1497 | | |
| 1498 | + | |
1484 | 1499 | | |
1485 | 1500 | | |
1486 | 1501 | | |
| |||
1541 | 1556 | | |
1542 | 1557 | | |
1543 | 1558 | | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
1544 | 1562 | | |
1545 | 1563 | | |
1546 | 1564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
| 795 | + | |
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
799 | | - | |
| 799 | + | |
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
830 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
831 | 833 | | |
832 | | - | |
833 | | - | |
834 | | - | |
| 834 | + | |
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
| 839 | + | |
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| 1048 | + | |
1048 | 1049 | | |
1049 | 1050 | | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | 1053 | | |
1056 | 1054 | | |
1057 | | - | |
| 1055 | + | |
| 1056 | + | |
1058 | 1057 | | |
1059 | 1058 | | |
1060 | 1059 | | |
1061 | 1060 | | |
1062 | 1061 | | |
1063 | | - | |
| 1062 | + | |
1064 | 1063 | | |
1065 | 1064 | | |
1066 | 1065 | | |
| |||
0 commit comments