More recent AMD CPUs have a feature named Secure Memory Encryption SME which if available can be explicitly be enabled by adding this parameter to linux' command line.
mem_encrypt=on
(according to https://libvirt.org/kbase/launch_security_sev.html)
I am unsure if my system (with an AMD EPYC cpu) has this feature enabled (i.e. if the feature might be default on anyway).
My question is how to check if the AMD SME feature is enabled?
Since https://www.kernel.org/doc/html/latest/x86/amd-memory-encryption.html suggests that:
If support for SME is present, MSR 0xc00100010 (MSR_K8_SYSCFG) can be used to determine if SME is enabled and/or to enable memory encryption:
I have run this commands (on a debian 10):
apt-get install msr-tools
rdmsr --raw 0xc0010010 | xxd -b
which presented me this output
00000000: 00000000 00000000 11110100 00000000 00000000 00000000 ......
00000006: 00000000 00000000
where according to the source quoted the 23rd bit indicates if SME is indeed enabled/active (=1) or not (=0).
If above is indeed the correct way to test this, a confirmation may be considered a valid answer, ideally of course providing some background. Else again I would be very happy to be able to check the state of SME on a running linux system.
/proc/cpuinfo
- according to this, there should be a flag for SME – Panki Jan 04 '21 at 11:30