All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kernel] KVM: PPC: Book3S HV: Make unique debugfs nodename
@ 2021-07-07  4:13 ` Alexey Kardashevskiy
  0 siblings, 0 replies; 26+ messages in thread
From: Alexey Kardashevskiy @ 2021-07-07  4:13 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Alexey Kardashevskiy, linux-kernel, kvm-ppc, Paul Mackerras

Currently it is vm-$currentpid which works as long as there is just one
VM per the userspace (99.99% cases) but produces a bunch
of "debugfs: Directory 'vm16679' with parent 'kvm' already present!"
when syzkaller (syscall fuzzer) is running so only one VM is present in
the debugfs for a given process.

This changes the debugfs node to include the LPID which alone should be
system wide unique. This leaves the existing pid for the convenience of
matching the VM's debugfs with the running userspace process (QEMU).

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 arch/powerpc/kvm/book3s_hv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 1d1fcc290fca..0223ddc0eed0 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -5227,7 +5227,7 @@ static int kvmppc_core_init_vm_hv(struct kvm *kvm)
 	/*
 	 * Create a debugfs directory for the VM
 	 */
-	snprintf(buf, sizeof(buf), "vm%d", current->pid);
+	snprintf(buf, sizeof(buf), "vm%d-lp%ld", current->pid, lpid);
 	kvm->arch.debugfs_dir = debugfs_create_dir(buf, kvm_debugfs_dir);
 	kvmppc_mmu_debugfs_init(kvm);
 	if (radix_enabled())
-- 
2.30.2


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

end of thread, other threads:[~2021-09-02  5:32 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07  4:13 [PATCH kernel] KVM: PPC: Book3S HV: Make unique debugfs nodename Alexey Kardashevskiy
2021-07-07  4:13 ` Alexey Kardashevskiy
2021-07-07  4:13 ` Alexey Kardashevskiy
2021-07-07 17:48 ` Fabiano Rosas
2021-07-07 17:48   ` Fabiano Rosas
2021-07-07 17:48   ` Fabiano Rosas
2021-07-08  2:22   ` Alexey Kardashevskiy
2021-07-08  2:22     ` Alexey Kardashevskiy
2021-07-08  2:22     ` Alexey Kardashevskiy
2021-08-13  9:50 ` Alexey Kardashevskiy
2021-08-13  9:50   ` Alexey Kardashevskiy
2021-08-13  9:50   ` Alexey Kardashevskiy
2021-08-17 22:20   ` Fabiano Rosas
2021-08-17 22:20     ` Fabiano Rosas
2021-08-17 22:20     ` Fabiano Rosas
2021-08-24  8:37     ` Alexey Kardashevskiy
2021-08-24  8:37       ` Alexey Kardashevskiy
2021-08-24  8:37       ` Alexey Kardashevskiy
2021-09-01  8:43       ` Alexey Kardashevskiy
2021-09-01 14:23         ` Fabiano Rosas
2021-09-01 14:23           ` Fabiano Rosas
2021-09-01 14:23           ` Fabiano Rosas
2021-09-01 15:26           ` Fabiano Rosas
2021-09-01 15:26             ` Fabiano Rosas
2021-09-01 15:26             ` Fabiano Rosas
2021-09-02  5:31           ` Alexey Kardashevskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.