The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] KVM, SEV: fix merge conflict
@ 2026-05-19 20:28 Arnd Bergmann
  2026-05-19 21:26 ` Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2026-05-19 20:28 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, Alex Williamson, Steffen Eiden
  Cc: Arnd Bergmann, H. Peter Anvin, Tom Lendacky, Liam Merwick,
	Michael Roth, Nikunj A Dadhania, Maxim Levitsky, kvm,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

A conflict between two patches leads to build failure for
the reference countingg in 'struct kvm', which moved into
the kvm_refcount structure:

arch/x86/kvm/svm/sev.c: In function 'kvm_lockdep_assert_sev_lock_held':
arch/x86/kvm/svm/sev.c:118:32: error: 'struct kvm' has no member named 'users_count'
  118 |         if (!refcount_read(&kvm->users_count))

Resolve this by changing the added reference the same way as
the other ones.

Fixes: 422c363f58a8 ("KVM, vfio: remove symbol_get(kvm_get_kvm_safe) from vfio")
Fixes: ba903f738249 ("KVM: SEV: Assert that kvm->lock is held when querying SEV+ support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/kvm/svm/sev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 04accfaefd0d..63b57f3b3800 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -115,7 +115,7 @@ static __always_inline void kvm_lockdep_assert_sev_lock_held(struct kvm *kvm)
 	 * Querying SEV+ support is safe if there are no other references, i.e.
 	 * if concurrent initialization of SEV+ is impossible.
 	 */
-	if (!refcount_read(&kvm->users_count))
+	if (!refcount_read(&kvm->rc.users_count))
 		return;
 
 	/*
-- 
2.39.5


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

end of thread, other threads:[~2026-05-20  5:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 20:28 [PATCH] KVM, SEV: fix merge conflict Arnd Bergmann
2026-05-19 21:26 ` Sean Christopherson
2026-05-20  5:50   ` Arnd Bergmann
2026-05-20  3:41 ` kernel test robot
2026-05-20  4:15 ` kernel test robot

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