News: 0001656985

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

LLVM Merges Support For AMD's RMPCHKD, RMPREAD & RMPOPT Instructions

([AMD] 6 Hours Ago LLVM + AMD RMPOPT)


With the Linux kernel still working toward [1]landing support for AMD's RMPOPT optimization for [2]helping to reduce overhead on SEV-SNP enabled servers , the LLVM/Clang compiler has in turn prepped for the milestone by landing support for the RMPOPT, RMPREAD, and RMPCHKD instructions for Zen 5 and newer.

While initially it was assumed RMPOPT was going to be a feature of Zen 6 given the timing, RMPOPT is supported on Zen 5 EPYC processors already too and this software enablement just turned out to be rather belated. Sent out last week was [3]the v13 patches for enabling RMPOPT . We'll see if this code is deemed ready by the time of the Linux v7.4 merge window in late October.

As a reminder, RMPOPT is a new instruction to help minimize the performance overhead of Reverse Map Table (RMP) checks on the hypervisor and for non-SNP guests by letting RMP checks be skipped in certain scenarios. With RMPOPT these checks can be skipped when 1G regions of memory are known not to contain any SEV-SNP guest memory. Along with RMPOPT is RMPREAD as the instruction for reading Reverse Map Table entries. RMPCHKD is used for checking the dirty status bit on a range of guest private pages in the Reverse Map Table.

Merged overnight to the LLVM toolchain Git code was [4]this pull to "support further Zen5 and Zen6 instructions." Those additional instructions are just the RMPREAD, RMPOPT, and RMPCHKD. Update: With the PR title being vague, it's now been [5]clarified Zen 5 only supports RMPREAD while RMPOPT and RPMCHKD are new to Zen 6 CPUs.



[1] https://www.phoronix.com/news/AMD-RMPOPT-Linux-v10

[2] https://www.phoronix.com/news/AMD-RMPOPT-Linux

[3] https://lore.kernel.org/all/cover.1788296083.git.ashish.kalra@amd.com/

[4] https://github.com/llvm/llvm-project/pull/221659

[5] https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1656985-llvm-merges-support-for-amd-s-rmpchkd-rmpread-rmpopt-instructions?p=1657008#post1657008



f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.