Message ID | 20161110003731.3280.67205.stgit@tlendack-t1.amdoffice.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Nov 09, 2016 at 06:37:32PM -0600, Tom Lendacky wrote: > + /* For now, disable the IOMMU if SME is active */ > + if (sme_me_mask) > + return -ENODEV; > + Please print a message here telling the user why the IOMMU got disabled. Thanks, Joerg -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/14/2016 10:32 AM, Joerg Roedel wrote: > On Wed, Nov 09, 2016 at 06:37:32PM -0600, Tom Lendacky wrote: >> + /* For now, disable the IOMMU if SME is active */ >> + if (sme_me_mask) >> + return -ENODEV; >> + > > Please print a message here telling the user why the IOMMU got disabled. Will do. Thanks, Tom > > > Thanks, > > Joerg > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 59741ea..136a24e 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -27,6 +27,7 @@ #include <linux/amd-iommu.h> #include <linux/export.h> #include <linux/iommu.h> +#include <linux/mem_encrypt.h> #include <asm/pci-direct.h> #include <asm/iommu.h> #include <asm/gart.h> @@ -2388,6 +2389,10 @@ int __init amd_iommu_detect(void) if (amd_iommu_disabled) return -ENODEV; + /* For now, disable the IOMMU if SME is active */ + if (sme_me_mask) + return -ENODEV; + ret = iommu_go_to_state(IOMMU_IVRS_DETECTED); if (ret) return ret;
For now, disable the AMD IOMMU if memory encryption is active. A future patch will re-enable the function with full memory encryption support. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> --- drivers/iommu/amd_iommu_init.c | 5 +++++ 1 file changed, 5 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html