* [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* Re: [PATCH] KVM: selftests: Drop stale exact flags check in private_mem_kvm_exits_test 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 0 siblings, 1 reply; 3+ messages in thread From: Sean Christopherson @ 2026-11-12 17:22 UTC (permalink / raw) To: David Woodhouse Cc: kvm, Paolo Bonzini, Anish Moorthy, Shuah Khan, Nicolas Saenz Julienne, linux-kselftest, linux-kernel, David Woodhouse On Thu, Nov 12, 2026, David Woodhouse wrote: > 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: Ah, this is against kvm/kvm-memprot-v4. Paolo, what are your plans with that branch? Sashiko had valid complaints, e.g. against patch 1[*], so I assume the branch won't be merged as-is. [*] https://lore.kernel.org/all/sashiko-outbox-193903@kernel.org ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: selftests: Drop stale exact flags check in private_mem_kvm_exits_test 2026-11-12 17:22 ` Sean Christopherson @ 2026-11-12 17:42 ` David Woodhouse 0 siblings, 0 replies; 3+ messages in thread From: David Woodhouse @ 2026-11-12 17:42 UTC (permalink / raw) To: Sean Christopherson Cc: kvm, Paolo Bonzini, Anish Moorthy, Shuah Khan, Nicolas Saenz Julienne, linux-kselftest, linux-kernel, David Woodhouse On 12 November 2026 10:22:38 GMT-07:00, Sean Christopherson <seanjc@google.com> wrote: >On Thu, Nov 12, 2026, David Woodhouse wrote: >> 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: > >Ah, this is against kvm/kvm-memprot-v4. > >Paolo, what are your plans with that branch? Sashiko had valid complaints, e.g. >against patch 1[*], so I assume the branch won't be merged as-is. > >[*] https://lore.kernel.org/all/sashiko-outbox-193903@kernel.org Yeah, I have a whole ASCII art diagram for VSM of the various branches it depends on, all of which need to come together. Not sure how it'll survive being pasted on my phone... ``` * e7bf7087c71e (vsm-v2, vsm2/rollup) Merge branch 'vsm2/translate-probe-fix' into vsm2/rollup |\ | * 2041e48469c9 (vsm2/translate-probe-fix) KVM: selftests: Add a test for KVM_TRANSLATE write permission | * 11e4bc669f5a KVM: x86: Report the guest's write permission from KVM_TRANSLATE | * (base: v7.4-rc2) ← postable №2, [RFC] | * 711d67d9ee59 (vsm2/vsm-extras) ⋯ 10 EXTRA commits ⋯ | TLB-flush-inhibit group [Nikolas×5 + 1 ours], suspended-state, | hugepage selftest [Mushahid], stats, KVM_TRANSLATE allowlist | * 45e6e98c313e (vsm2/vsm-min, tag: vsm2-min1) ⋯ 32 MIN commits ⋯ | per-plane attrs → TSC page → TLB flush → VTL call/return → | forced entry → SynIC/overlays → intercepts → SVM state → selftests | [29 dwmw, 2 Mushahid incl. folds, 1 Sriram] | * 2dba8e6aa231 Merge branch 'vsm2/hcall-exit' into vsm2/vsm-min |\ | * ab78e5f86ef8 (vsm2/hcall-exit) KVM: selftests: Add Hyper-V hypercall forwarding test | * b5db9e2e8a73 KVM: x86: hyper-v: Advertise XMM fast hypercall output | * 13c74a93fa3a KVM: x86: hyper-v: Let userspace fault a forwarded hypercall | * 365758d0df84 KVM: x86: hyper-v: Add KVM_CAP_HYPERV_FORWARD_HCALL | * (base: v7.4-rc2) ← postable №1 | * d834e6e32d45 Merge branch 'vsm2/memattrs' into vsm2/vsm-min |\ | * 2fd5c2a710a2 (vsm2/memattrs) Merge 'kvm-memprot-v4' of kvm.git | |\ | | * ⋯ 45 commits, Paolo, verbatim ⋯ | |/ | * (base: v7.4-rc2) | * 08140f5dfd94 (vsm2/planes-uapi) ⋯ 9 commits ⋯ | KVM_CAP_PLANES opt-in, run-state ioctls, request fan-out, | APICv inhibit, XCR0 sharing, selftests [8 dwmw, 1 Paolo-reworked] | * 52a6b958f643 (vsm2/planes-fixes) ⋯ 16 commits ⋯ | s390 lkp fix first; Hyper-V init, allowlist, current_vcpu/IPIv, | TSC matching, CPUID [13 dwmw, 3 Mushahid] | * ea638a7ede9e (vsm2/planes) ⋯ 60 commits, Jörg, verbatim ⋯ | * (v7.4-rc2) parked, not merged anywhere: * de563700e7ed (vsm2/translate2) ours ×1 (squashed probe) on ⋯ Nikolas ×16 ⋯ on vsm2/memattrs ``` ^ 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®