From: "Deucher, Alexander" <Alexander.Deucher@amd.com> To: "Kuehling, Felix" <Felix.Kuehling@amd.com>, Joerg Roedel <joro@8bytes.org>, "iommu@lists.linux-foundation.org" <iommu@lists.linux-foundation.org>, "Huang, Ray" <Ray.Huang@amd.com>, "Koenig, Christian" <Christian.Koenig@amd.com> Cc: "jroedel@suse.de" <jroedel@suse.de>, "Lendacky, Thomas" <Thomas.Lendacky@amd.com>, "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@amd.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: RE: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active Date: Wed, 26 Aug 2020 15:25:58 +0000 [thread overview] Message-ID: <MN2PR12MB4488BF7DDE700378F7B2776CF7540@MN2PR12MB4488.namprd12.prod.outlook.com> (raw) In-Reply-To: <34db343f-cd23-09af-3bc5-29b9d385f85d@amd.com> [AMD Public Use] + Christian > -----Original Message----- > From: Kuehling, Felix <Felix.Kuehling@amd.com> > Sent: Wednesday, August 26, 2020 11:22 AM > To: Deucher, Alexander <Alexander.Deucher@amd.com>; Joerg Roedel > <joro@8bytes.org>; iommu@lists.linux-foundation.org; Huang, Ray > <Ray.Huang@amd.com> > Cc: jroedel@suse.de; Lendacky, Thomas <Thomas.Lendacky@amd.com>; > Suthikulpanit, Suravee <Suravee.Suthikulpanit@amd.com>; linux- > kernel@vger.kernel.org > Subject: Re: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is > active > > [+Ray] > > > Thanks for the heads up. Currently KFD won't work on APUs when IOMMUv2 > is disabled. But Ray is working on fallbacks that will allow KFD to work on > APUs even without IOMMUv2, similar to our dGPUs. Along with changes in > ROCm user mode, those fallbacks are necessary for making ROCm on APUs > generally useful. > > > How common is SME on typical PCs or laptops that would use AMD APUs? I think the hw supports it, but it as far as I know it's not formally productized on client parts. > > > Alex, do you know if anyone has tested amdgpu on an APU with SME > enabled? Is this considered something we support? It's not something we've tested. I'm not even sure the GPU portion of APUs will work properly without an identity mapping. SME should work properly with dGPUs however, so this is a proper fix for them. We don't use the IOMMUv2 path on dGPUs at all. Alex > > > Thanks, > Felix > > > Am 2020-08-26 um 10:14 a.m. schrieb Deucher, Alexander: > > > > [AMD Official Use Only - Internal Distribution Only] > > > > > > + Felix > > ---------------------------------------------------------------------- > > -- > > *From:* Joerg Roedel <joro@8bytes.org> > > *Sent:* Monday, August 24, 2020 6:54 AM > > *To:* iommu@lists.linux-foundation.org > > <iommu@lists.linux-foundation.org> > > *Cc:* Joerg Roedel <joro@8bytes.org>; jroedel@suse.de > > <jroedel@suse.de>; Lendacky, Thomas <Thomas.Lendacky@amd.com>; > > Suthikulpanit, Suravee <Suravee.Suthikulpanit@amd.com>; Deucher, > > Alexander <Alexander.Deucher@amd.com>; linux-kernel@vger.kernel.org > > <linux-kernel@vger.kernel.org> > > *Subject:* [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is > > active > > > > From: Joerg Roedel <jroedel@suse.de> > > > > Hi, > > > > Some IOMMUv2 capable devices do not work correctly when SME is active, > > because their DMA mask does not include the encryption bit, so that > > they can not DMA to encrypted memory directly. > > > > The IOMMU can jump in here, but the AMD IOMMU driver puts IOMMUv2 > > capable devices into an identity mapped domain. Fix that by not > > forcing an identity mapped domain on devices when SME is active and > > forbid using their IOMMUv2 functionality. > > > > Please review. > > > > Thanks, > > > > Joerg > > > > Joerg Roedel (2): > > iommu/amd: Do not force direct mapping when SME is active > > iommu/amd: Do not use IOMMUv2 functionality when SME is active > > > > drivers/iommu/amd/iommu.c | 7 ++++++- > > drivers/iommu/amd/iommu_v2.c | 7 +++++++ > > 2 files changed, 13 insertions(+), 1 deletion(-) > > > > -- > > 2.28.0 > >
WARNING: multiple messages have this Message-ID (diff)
From: "Deucher, Alexander" <Alexander.Deucher@amd.com> To: "Kuehling, Felix" <Felix.Kuehling@amd.com>, Joerg Roedel <joro@8bytes.org>, "iommu@lists.linux-foundation.org" <iommu@lists.linux-foundation.org>, "Huang, Ray" <Ray.Huang@amd.com>, "Koenig, Christian" <Christian.Koenig@amd.com> Cc: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>, "jroedel@suse.de" <jroedel@suse.de>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: RE: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active Date: Wed, 26 Aug 2020 15:25:58 +0000 [thread overview] Message-ID: <MN2PR12MB4488BF7DDE700378F7B2776CF7540@MN2PR12MB4488.namprd12.prod.outlook.com> (raw) In-Reply-To: <34db343f-cd23-09af-3bc5-29b9d385f85d@amd.com> [AMD Public Use] + Christian > -----Original Message----- > From: Kuehling, Felix <Felix.Kuehling@amd.com> > Sent: Wednesday, August 26, 2020 11:22 AM > To: Deucher, Alexander <Alexander.Deucher@amd.com>; Joerg Roedel > <joro@8bytes.org>; iommu@lists.linux-foundation.org; Huang, Ray > <Ray.Huang@amd.com> > Cc: jroedel@suse.de; Lendacky, Thomas <Thomas.Lendacky@amd.com>; > Suthikulpanit, Suravee <Suravee.Suthikulpanit@amd.com>; linux- > kernel@vger.kernel.org > Subject: Re: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is > active > > [+Ray] > > > Thanks for the heads up. Currently KFD won't work on APUs when IOMMUv2 > is disabled. But Ray is working on fallbacks that will allow KFD to work on > APUs even without IOMMUv2, similar to our dGPUs. Along with changes in > ROCm user mode, those fallbacks are necessary for making ROCm on APUs > generally useful. > > > How common is SME on typical PCs or laptops that would use AMD APUs? I think the hw supports it, but it as far as I know it's not formally productized on client parts. > > > Alex, do you know if anyone has tested amdgpu on an APU with SME > enabled? Is this considered something we support? It's not something we've tested. I'm not even sure the GPU portion of APUs will work properly without an identity mapping. SME should work properly with dGPUs however, so this is a proper fix for them. We don't use the IOMMUv2 path on dGPUs at all. Alex > > > Thanks, > Felix > > > Am 2020-08-26 um 10:14 a.m. schrieb Deucher, Alexander: > > > > [AMD Official Use Only - Internal Distribution Only] > > > > > > + Felix > > ---------------------------------------------------------------------- > > -- > > *From:* Joerg Roedel <joro@8bytes.org> > > *Sent:* Monday, August 24, 2020 6:54 AM > > *To:* iommu@lists.linux-foundation.org > > <iommu@lists.linux-foundation.org> > > *Cc:* Joerg Roedel <joro@8bytes.org>; jroedel@suse.de > > <jroedel@suse.de>; Lendacky, Thomas <Thomas.Lendacky@amd.com>; > > Suthikulpanit, Suravee <Suravee.Suthikulpanit@amd.com>; Deucher, > > Alexander <Alexander.Deucher@amd.com>; linux-kernel@vger.kernel.org > > <linux-kernel@vger.kernel.org> > > *Subject:* [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is > > active > > > > From: Joerg Roedel <jroedel@suse.de> > > > > Hi, > > > > Some IOMMUv2 capable devices do not work correctly when SME is active, > > because their DMA mask does not include the encryption bit, so that > > they can not DMA to encrypted memory directly. > > > > The IOMMU can jump in here, but the AMD IOMMU driver puts IOMMUv2 > > capable devices into an identity mapped domain. Fix that by not > > forcing an identity mapped domain on devices when SME is active and > > forbid using their IOMMUv2 functionality. > > > > Please review. > > > > Thanks, > > > > Joerg > > > > Joerg Roedel (2): > > iommu/amd: Do not force direct mapping when SME is active > > iommu/amd: Do not use IOMMUv2 functionality when SME is active > > > > drivers/iommu/amd/iommu.c | 7 ++++++- > > drivers/iommu/amd/iommu_v2.c | 7 +++++++ > > 2 files changed, 13 insertions(+), 1 deletion(-) > > > > -- > > 2.28.0 > > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-08-26 15:26 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-24 10:54 [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active Joerg Roedel 2020-08-24 10:54 ` Joerg Roedel 2020-08-24 10:54 ` [PATCH 1/2] iommu/amd: Do not force direct mapping " Joerg Roedel 2020-08-24 10:54 ` Joerg Roedel 2020-08-26 14:23 ` Deucher, Alexander 2020-08-26 14:23 ` Deucher, Alexander 2020-08-24 10:54 ` [PATCH 2/2] iommu/amd: Do not use IOMMUv2 functionality " Joerg Roedel 2020-08-24 10:54 ` Joerg Roedel 2020-08-26 14:20 ` Deucher, Alexander 2020-08-26 14:20 ` Deucher, Alexander 2020-08-26 14:14 ` [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices " Deucher, Alexander 2020-08-26 15:22 ` Felix Kuehling 2020-08-26 15:22 ` Felix Kuehling 2020-08-26 15:25 ` Deucher, Alexander [this message] 2020-08-26 15:25 ` Deucher, Alexander 2020-08-28 13:46 ` jroedel 2020-08-28 13:46 ` jroedel 2020-08-28 13:54 ` Felix Kuehling 2020-08-28 13:54 ` Felix Kuehling 2020-08-28 15:11 ` Deucher, Alexander 2020-08-28 15:11 ` Deucher, Alexander 2020-08-28 15:29 ` jroedel 2020-08-28 15:29 ` jroedel 2020-08-28 15:47 ` Deucher, Alexander 2020-08-28 15:47 ` Deucher, Alexander 2020-09-04 10:05 ` Joerg Roedel 2020-09-04 10:05 ` Joerg Roedel 2020-09-06 16:08 ` Deucher, Alexander 2020-09-06 16:08 ` Deucher, Alexander 2020-09-07 10:44 ` Joerg Roedel 2020-09-07 10:44 ` Joerg Roedel 2020-09-07 11:10 ` Christian König 2020-09-07 11:10 ` Christian König 2020-09-08 3:38 ` Felix Kuehling 2020-09-08 3:38 ` Felix Kuehling 2020-08-28 15:27 ` jroedel 2020-08-28 15:27 ` jroedel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=MN2PR12MB4488BF7DDE700378F7B2776CF7540@MN2PR12MB4488.namprd12.prod.outlook.com \ --to=alexander.deucher@amd.com \ --cc=Christian.Koenig@amd.com \ --cc=Felix.Kuehling@amd.com \ --cc=Ray.Huang@amd.com \ --cc=Suravee.Suthikulpanit@amd.com \ --cc=Thomas.Lendacky@amd.com \ --cc=iommu@lists.linux-foundation.org \ --cc=joro@8bytes.org \ --cc=jroedel@suse.de \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.