Skip to content

Commit

Permalink
Merge tag 'iommu-fixes-v4.19-rc6' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/joro/iommu

Joerg writes:
  "IOMMU Fix for Linux v4.19-rc6

   One important fix:
	- Fix a memory leak with AMD IOMMU when SME is active and a VM
	  has assigned devices. In that case the complete guest memory
	  will be leaked without this fix."

* tag 'iommu-fixes-v4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Clear memory encryption mask from physical address
  • Loading branch information
Greg Kroah-Hartman committed Oct 5, 2018
2 parents 08b297b + b3e9b51 commit b2e45b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3069,7 +3069,7 @@ static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom,
return 0;

offset_mask = pte_pgsize - 1;
__pte = *pte & PM_ADDR_MASK;
__pte = __sme_clr(*pte & PM_ADDR_MASK);

return (__pte & ~offset_mask) | (iova & offset_mask);
}
Expand Down

0 comments on commit b2e45b4

Please sign in to comment.