APPLIED: [B][SRU][PATCH 0/2] Add feature bit RDPRU on AMD
Luke Nowakowski-Krijger
luke.nowakowskikrijger at canonical.com
Tue Jan 31 17:07:42 UTC 2023
Applied to bionic:linux master-next, thanks :)
- Luke
On Mon, Jan 16, 2023 at 9:52 PM Po-Hsu Lin <po-hsu.lin at canonical.com> wrote:
> [Impact]
> RDPRU, the Read Processor Register instruction of AMD Zen 2 processors
> is used to give access to some processor registers that are typically
> only accessible when the privilege level is zero.
>
> rdpru test in ubuntu_kvm_unit_tests is to check if the RDPRU instruction
> can be intercepted by the Hypervisor. Without this patchset, this test
> will fail on our AMD Zen 2 system "riccioli" with:
> FAIL: RDPRU raises #UD
>
> [Fix]
> * fb64f293 x86/cpufeatures: Add feature bit RDPRU on AMD
> * 0cb8410b kvm: svm: Intercept RDPRU
>
> We have these patches in newer releases already, only Bionic 4.15
> requires this fix. The first patch needs to be backported with some
> context adjustment, the second can be cherry-picked.
>
> [Test]
> Test kernel can be found here:
> https://people.canonical.com/~phlin/kernel/lp-1968681-rdpru/
>
> With the patched kernel, this rdpru test will pass on the target AMD
> Zen 2 system.
> $ sudo ./rdpru
> BUILD_HEAD=d6421940
> timeout -k 1s --foreground 90s /usr/bin/qemu-system-x86_64 --no-reboot \
> -nodefaults -device pc-testdev -device
> isa-debug-exit,iobase=0xf4,iosize=0x4 \
> -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel \
> /tmp/tmp.XOMVxpyNnl -smp 1 -cpu max # -initrd /tmp/tmp.I2TbGXFiaZ
> enabling apic
> smp: waiting for 0 APs
> PASS: RDPRU raises #UD
> SUMMARY: 1 tests
> PASS rdpru (1 tests)
>
> And the rdpru flag will be available in cpuinfo:
> $ grep -o rdpru /proc/cpuinfo
> rdpru
>
> [Where problems could occur]
> This patchset will add a new feature bit RDPRU for AMD Zen 2. We can
> expect to see new issues coming up when using this bit in the future.
>
> Babu Moger (1):
> x86/cpufeatures: Add feature bit RDPRU on AMD
>
> Jim Mattson (1):
> kvm: svm: Intercept RDPRU
>
> arch/x86/include/asm/cpufeatures.h | 1 +
> arch/x86/include/asm/svm.h | 1 +
> arch/x86/include/uapi/asm/svm.h | 1 +
> arch/x86/kvm/svm.c | 8 ++++++++
> 4 files changed, 11 insertions(+)
>
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230131/719ecca9/attachment-0001.html>
More information about the kernel-team
mailing list