mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
KVM: selftests: Use kvm_cpu_has() for XSAVE in cr4_cpuid_sync_test
Use kvm_cpu_has() in the CR4/CPUID sync test instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry(). No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220614200707.3315957-13-seanjc@google.com
This commit is contained in:
parent
8fea056eeb
commit
045520e475
@ -63,11 +63,9 @@ int main(int argc, char *argv[])
|
||||
struct kvm_run *run;
|
||||
struct kvm_vm *vm;
|
||||
struct kvm_sregs sregs;
|
||||
struct kvm_cpuid_entry2 *entry;
|
||||
struct ucall uc;
|
||||
|
||||
entry = kvm_get_supported_cpuid_entry(1);
|
||||
TEST_REQUIRE(entry->ecx & CPUID_XSAVE);
|
||||
TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_XSAVE));
|
||||
|
||||
/* Tell stdout not to buffer its content */
|
||||
setbuf(stdout, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user