blob: 5cb69cb6c42df6b2da858e0ab3689820ed859e06 [file] [log] [blame]
/* RDPRU test */
#include "libcflat.h"
#include "processor.h"
#include "desc.h"
static int rdpru_checking(void)
{
asm volatile (ASM_TRY("1f")
".byte 0x0f,0x01,0xfd \n\t" /* rdpru */
"1:" : : "c" (0) : "eax", "edx");
return exception_vector();
}
int main(int ac, char **av)
{
if (this_cpu_has(X86_FEATURE_RDPRU))
report_skip("RDPRU raises #UD");
else
report(rdpru_checking() == UD_VECTOR, "RDPRU raises #UD");
return report_summary();
}