FS#59463 - [linux-hardened] 4.17.x AMD memory encryption doesn't work with amdgpu

Attached to Project: Arch Linux
Opened by mailoxy (mailoxy) - Thursday, 26 July 2018, 20:54 GMT
Last edited by Toolybird (Toolybird) - Monday, 29 May 2023, 03:31 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

AMD memory encryption doesn't work with amdgpu. Must either AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT be unset or mem_encrypt=off must be used on boot.

Tested on the following configuration:

AMD Ryzen 5 1600 Six-Core Processor
Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] (rev ff)
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 29 May 2023, 03:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  See comments
Comment by loqs (loqs) - Thursday, 26 July 2018, 21:28 GMT
If you use the kernel from the linux package 4.17.9-1 or 4.17.10-1 with mem_encrypt=on does that have the same issue?
Comment by mailoxy (mailoxy) - Friday, 27 July 2018, 05:11 GMT
It doesn't work neither on 4.17.9-1 nor on 4.17.10-1 with mem_encrypt=on.
Comment by loqs (loqs) - Friday, 27 July 2018, 09:19 GMT
From the title "memory encryption doesn't work with amdgpu" does that mean if that module is not loaded the issue does not occur?
Comment by mailoxy (mailoxy) - Friday, 27 July 2018, 09:46 GMT
The issue actually is that if AMD memory encryption is active the amdgpu driver refuses to load and screen goes blank on boot. So in order to get amdgpu to work we need to disable memory encryption with mem_encrypt=off. Sorry to be not so clear in the first place.
Comment by loqs (loqs) - Friday, 27 July 2018, 12:06 GMT
I would suggest trying linux 4.18-rc6. Can you check the journal for the kernel output from a boot with the issue?
Comment by Levente Polyak (anthraxx) - Friday, 14 September 2018, 11:35 GMT
Is this still happening?
Comment by mailoxy (mailoxy) - Sunday, 16 September 2018, 09:23 GMT
As of 4.18.8 amdgpu still doesn't work with SME enabled

Please also see https://lkml.org/lkml/2018/6/6/451 and https://bugs.freedesktop.org/show_bug.cgi?id=104437
Comment by Stuart Cardall (itoffshore) - Sunday, 02 February 2020, 15:42 GMT
still an issue on 5.4.15.a-1-hardened with AMD Rx 560 / Ryzen 3700x

mem_encrypt=off needed to boot with amdgpu
Comment by Stuart Cardall (itoffshore) - Sunday, 16 February 2020, 13:20 GMT
Comment by loqs (loqs) - Monday, 07 September 2020, 03:37 GMT Comment by joda (joda) - Thursday, 24 September 2020, 16:37 GMT
Can confirm this is fixed in 5.9-rc6. I've noticed that amdgpu doesn't like iommu passthrough so make sure to not use iommu=pt

edit: seems they backported the fixes to 5.8.10 as well

Loading...