Re: [kvm-unit-tests PATCH] kvm-unit-test: x86: Add RDPRU test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/09/19 21:44, Jim Mattson wrote:
> However, I should modify the test so it passes (or skips) on hardware. :-)

This should do.

diff --git a/x86/rdpru.c b/x86/rdpru.c
index a298960..3cdb2d6 100644
--- a/x86/rdpru.c
+++ b/x86/rdpru.c
@@ -16,8 +16,10 @@ int main(int ac, char **av)
 {
 	setup_idt();
 
-	report("RDPRU not supported", !this_cpu_has(X86_FEATURE_RDPRU));
-	report("RDPRU raises #UD", rdpru_checking() == UD_VECTOR);
+	if (this_cpu_has(X86_FEATURE_RDPRU))
+		report_skip("RDPRU raises #UD");
+	else
+		report("RDPRU raises #UD", rdpru_checking() == UD_VECTOR);
 
 	return report_summary();
 }

Paolo





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux