mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] KVM: selftests: Drop stale exact flags check in private_mem_kvm_exits_test
@ 2026-11-12 14:42 David Woodhouse
  2026-11-12 17:22 ` Sean Christopherson
  0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2026-11-12 14:42 UTC (permalink / raw)
  To: kvm
  Cc: Paolo Bonzini, Anish Moorthy, Sean Christopherson, Shuah Khan,
	Nicolas Saenz Julienne, linux-kselftest, linux-kernel,
	David Woodhouse

From: David Woodhouse <dwmw@amazon.co.uk>

Commit 7d0afe669374 ("KVM: selftests: Take into account mixed memory
fault flags") relaxed the memory_fault.flags checks so that they only
test for KVM_MEMORY_EXIT_FLAG_PRIVATE, since KVM may report the access
type alongside it. In test_private_access_memslot_deleted() it added
the relaxed check but left the exact match above it, and with the
READ flag now reported the test fails for me there:

  x86/private_mem_kvm_exits_test.c:93: vcpu->run->memory_fault.flags == KVM_MEMORY_EXIT_FLAG_PRIVATE
  0x9 != 0x8 (vcpu->run->memory_fault.flags != KVM_MEMORY_EXIT_FLAG_PRIVATE)

Drop the exact match, leaving the check that the fault was private.

Fixes: 7d0afe669374 ("KVM: selftests: Take into account mixed memory fault flags")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
 tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test.c b/tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test.c
index ed8edde9b718..e07f4972ab7e 100644
--- a/tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test.c
+++ b/tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test.c
@@ -90,7 +90,6 @@ static void test_private_access_memslot_deleted(void)
 		TEST_ASSERT_EQ(vcpu->run->mmio.is_write, false);
 	} else {
 		TEST_ASSERT_EQ(exit_reason, KVM_EXIT_MEMORY_FAULT);
-		TEST_ASSERT_EQ(vcpu->run->memory_fault.flags, KVM_MEMORY_EXIT_FLAG_PRIVATE);
 		TEST_ASSERT(vcpu->run->memory_fault.flags & KVM_MEMORY_EXIT_FLAG_PRIVATE,
 			    "Memory fault didn't occur on a private memory access");
 		TEST_ASSERT_EQ(vcpu->run->memory_fault.gpa, EXITS_TEST_GPA);

base-commit: e71c4e83c03926c300f6c43e79b783d47ba8b588
-- 
2.50.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-12 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 14:42 [PATCH] KVM: selftests: Drop stale exact flags check in private_mem_kvm_exits_test David Woodhouse
2026-11-12 17:22 ` Sean Christopherson
2026-11-12 17:42   ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®