Re: [PATCH, RFC 51/62] iommu/vt-d: Support MKTME in DMA remapping

2019-06-14 Thread Peter Zijlstra
On Wed, May 08, 2019 at 05:44:11PM +0300, Kirill A. Shutemov wrote: > @@ -603,7 +605,12 @@ static inline void dma_clear_pte(struct dma_pte *pte) > static inline u64 dma_pte_addr(struct dma_pte *pte) > { > #ifdef CONFIG_64BIT > - return pte->val & VTD_PAGE_MASK; I don't know this code, but

[PATCH, RFC 51/62] iommu/vt-d: Support MKTME in DMA remapping

2019-05-08 Thread Kirill A. Shutemov
From: Jacob Pan When MKTME is enabled, keyid is stored in the high order bits of physical address. For DMA transactions targeting encrypted physical memory, keyid must be included in the IOVA to physical address translation. This patch appends page keyid when setting up the IOMMU PTEs. On the