From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabiano Rosas Date: Wed, 07 Jul 2021 17:48:43 +0000 Subject: Re: [PATCH kernel] KVM: PPC: Book3S HV: Make unique debugfs nodename Message-Id: <87zguynhfo.fsf@linux.ibm.com> List-Id: References: <20210707041344.3803554-1-aik@ozlabs.ru> In-Reply-To: <20210707041344.3803554-1-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, Paul Mackerras Alexey Kardashevskiy writes: > 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 Reviewed-by: Fabiano Rosas > --- > 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())