** Description changed: [Impact] rdpru test in ubuntu_kvm_unit_tests is to check if the RDPRU instruction can be intercepted by the Hypervisor. RDPRU is one of the new instruction set extensions of AMD "Zen 2" CPUs that is for reading a processor register that is typically limited to privilege level zero. RDPRU allows for reading select registers at any privilege level. With Linux 5.5, the RDPRU presence will be advertised by the CPU features. Without this patchset, the rdpru test will fail on our AMD Zen 2 system "riccioli" [Fix] + * fb64f293 x86/cpufeatures: Add feature bit RDPRU on AMD * 0cb8410b kvm: svm: Intercept RDPRU - We have this patch in newer releases already, only Bionic 4.15 require - this fix. And it can be cherry-picked without any conflict. + We have these patches in newer releases already, only Bionic 4.15 + require this fix. And it can be cherry-picked without any conflict. [Test] With the patched kernel, this rdpru test will pass on the target AMD Zen 2 system. And the rdpru flag will be available in cpuinfo: - flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca - bugs : sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass + $ grep rdpru /proc/cpuinfo + flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca - $ sudo ./rdpru - BUILD_HEAD=16647354 - 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.syc17ecDpN -smp 1 -cpu max # -initrd /tmp/tmp.poLG53JqrJ + $ 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) [Where problems could occur] - This patchset will add a new feature bit RDPRU, the impact should be small as it's still up to user-space for making use of it. + This patchset will add a new feature bit RDPRU for this specific processor, it's still up to user-space for making use of it. But we can expect to see new issues coming up when utilizing this bit in the future. [Original Bug Report] Issue found on B-ibm-gt-4.15.0-1116.127 This can be reproduced with B-4.15.0-175 as well. This failure is only visible on this node. Running '/home/ubuntu/autotest/client/tmp/ubuntu_kvm_unit_tests/src/kvm-unit-tests/tests/rdpru' BUILD_HEAD=16647354 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.qGIR5tvTw1 -smp 1 -cpu max # -initrd /tmp/tmp.8JuYRCFRUi enabling apic FAIL: RDPRU raises #UD SUMMARY: 1 tests, 1 unexpected failures FAIL rdpru (1 tests, 1 unexpected failures)
** Changed in: linux (Ubuntu Bionic) Assignee: (unassigned) => Po-Hsu Lin (cypressyew) ** Changed in: ubuntu-kernel-tests Assignee: (unassigned) => Po-Hsu Lin (cypressyew) ** Changed in: ubuntu-kernel-tests Status: New => In Progress ** Changed in: linux (Ubuntu Bionic) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1968681 Title: rdpru in ubuntu_kvm_unit_tests failed on B-4.15 node riccioli with FAIL: RDPRU raises #UD Status in ubuntu-kernel-tests: In Progress Status in linux package in Ubuntu: Fix Released Status in linux source package in Bionic: In Progress Bug description: [Impact] rdpru test in ubuntu_kvm_unit_tests is to check if the RDPRU instruction can be intercepted by the Hypervisor. RDPRU is one of the new instruction set extensions of AMD "Zen 2" CPUs that is for reading a processor register that is typically limited to privilege level zero. RDPRU allows for reading select registers at any privilege level. With Linux 5.5, the RDPRU presence will be advertised by the CPU features. Without this patchset, the rdpru test will fail on our AMD Zen 2 system "riccioli" [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 require this fix. And it can be cherry-picked without any conflict. [Test] With the patched kernel, this rdpru test will pass on the target AMD Zen 2 system. And the rdpru flag will be available in cpuinfo: $ grep rdpru /proc/cpuinfo flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca $ 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) [Where problems could occur] This patchset will add a new feature bit RDPRU for this specific processor, it's still up to user-space for making use of it. But we can expect to see new issues coming up when utilizing this bit in the future. [Original Bug Report] Issue found on B-ibm-gt-4.15.0-1116.127 This can be reproduced with B-4.15.0-175 as well. This failure is only visible on this node. Running '/home/ubuntu/autotest/client/tmp/ubuntu_kvm_unit_tests/src/kvm-unit-tests/tests/rdpru' BUILD_HEAD=16647354 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.qGIR5tvTw1 -smp 1 -cpu max # -initrd /tmp/tmp.8JuYRCFRUi enabling apic FAIL: RDPRU raises #UD SUMMARY: 1 tests, 1 unexpected failures FAIL rdpru (1 tests, 1 unexpected failures) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1968681/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp