Commit 28439090 authored by Sean Christopherson's avatar Sean Christopherson
Browse files

KVM: selftests: Drop manual XCR0 configuration from state test



Now that CR4.OSXSAVE and XCR0 are setup by default, drop the manual
enabling from the state test, which is fully redundant with the default
behavior.

Reviewed-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20241003234337.273364-10-seanjc@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent d8733189
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -145,11 +145,6 @@ static void __attribute__((__flatten__)) guest_code(void *arg)

		memset(buffer, 0xcc, sizeof(buffer));

		set_cr4(get_cr4() | X86_CR4_OSXSAVE);
		GUEST_ASSERT(this_cpu_has(X86_FEATURE_OSXSAVE));

		xsetbv(0, xgetbv(0) | supported_xcr0);

		/*
		 * Modify state for all supported xfeatures to take them out of
		 * their "init" state, i.e. to make them show up in XSTATE_BV.