New Linux Patches Confirm Next-Gen EPYC "Milan" CPUs To Support MPK
Written by Michael Larabel in AMD on 6 May 2020 at 07:14 PM EDT. 6 Comments
AMD --
Recently we noted the latest revision to AMD's Programmer Reference Manual points to PCID and MPK/PKEY support coming on future CPUs. New Linux patches now confirm that the MPK support is on the way with next-gen EPYC processors.

The Memory Protection Key (PKE) support has been supported by Intel processors since Xeon Skylake and allow for page-based memory protections with the RDPKRU and WRPKRU instructions. As noted in the PRM, the feature "provides a way for applications to impose page-based data access protections (read/write, read-only or no access), without requiring modification of page tables and subsequent TLB invalidations when the application changes protection domains."

Sent out today were a set of patches reusing the Linux kernel's X86_INTEL_MEMORY_PROTECTION_KEYS code path and supporting MPK within the AMD SVM KVM virtualization code.

The patch comment spells it out quite clearly that this is for next-gen EPYC CPUs, "AMD's next generation of EPYC processors support the MPK (Memory Protection Keys) feature."

The patches are quite straight-forward in re-using the kernel's existing MPK code plumbed in previously by Intel and just two dozen or so lines of code for the AMD SVM code within the Kernel-based Virtual Machine (KVM).

It's possible this AMD MPK support will be mainlined for Linux 5.8. The patches may be revised as an upstream Intel developer has asked not to have the Kconfig X86_INTEL_MEMORY_PROTECTION_KEYS option to the proposed X86_MEMORY_PROTECTION_KEYS to avoid configuration file woes when transitioning to new kernel versions, so we'll see, but in any case it's a small enough change that there still is time to get this material queued for the forthcoming 5.8 cycle kicking off in June and should be out as stable in August.

This goes along with a string of other open-source work we have seen in recent weeks/months around Zen 3. AMD EPYC "Milan" Zen 3 based processors are expected to be released by the end of this calendar year.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week