aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c b/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
index 56d8ab92eed4..f4d3a042ec1c 100644
--- a/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
+++ b/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
@@ -19,9 +19,6 @@
#include "kvm_util.h"
#include "processor.h"
-#define X86_FEATURE_XSAVE (1<<26)
-#define X86_FEATURE_OSXSAVE (1<<27)
-
static inline bool cr4_cpuid_is_sync(void)
{
int func, subfunc;
@@ -36,7 +33,7 @@ static inline bool cr4_cpuid_is_sync(void)
cr4 = get_cr4();
- return (!!(ecx & X86_FEATURE_OSXSAVE)) == (!!(cr4 & X86_CR4_OSXSAVE));
+ return (!!(ecx & CPUID_OSXSAVE)) == (!!(cr4 & X86_CR4_OSXSAVE));
}
static void guest_code(void)
@@ -70,7 +67,7 @@ int main(int argc, char *argv[])
struct ucall uc;
entry = kvm_get_supported_cpuid_entry(1);
- TEST_REQUIRE(entry->ecx & X86_FEATURE_XSAVE);
+ TEST_REQUIRE(entry->ecx & CPUID_XSAVE);
/* Tell stdout not to buffer its content */
setbuf(stdout, NULL);