Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5221294pxv; Tue, 6 Jul 2021 21:25:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6lPi5tHPM+dY5K9Lq7Go0VTcMFTlWX4e1CprMoc3Enw9+3NSFS3qNiEMxW9NjrhLkCAmZ X-Received: by 2002:a17:907:2da6:: with SMTP id gt38mr21352776ejc.528.1625631958380; Tue, 06 Jul 2021 21:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625631958; cv=none; d=google.com; s=arc-20160816; b=CQTWrhhKo1xvjk5b0x595VRdjtIPiMR0wFIk5ZrNkXyE+pMbl1rnPlvJjwX+xH6f91 Xyk+jUNen/9pg5H88K6g/fxvaOW6kOOPWAPzUPFhdAPSTR3IO3C2lS8j4RFFjlKkGujS vzgSgm9vpJvYJklSK2F32SUilXgRsprzcdAASsizXG2/QTGwZrlHupCVRYhqVWYkGYT/ uT+lKu3ISo3xeYDTp74pZ6whTU7slR2djXRlLW0WZZSfR8HIECFrZUQMsygUfcWgUqN3 Ytz6EO+9c4OON9Z7wtOAlfwPouLGk6UJrzlb+uVUcqqtGvBmGdfp5oSpGupcM1bjW1AE nd2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=wGt+92/gznWq0U06PM/PZNqw47ilypph6FNj8pwWOQY=; b=GV/AwgZ37YS26IiG1qOP7ZIQ5lEzIaIoIbtVZCTLWVIRdm7eh8NpJCT5+Ofikk0aZS T3Z6k1lS4yj34lJ3PTN7bPZKirXhEJspXtcXz2WRztAF41m549sZAlow2IOkryrbR+hm zXx7Ek65NjBa6etKU3LpjDx9Vv3YbcM003yzQj673gBvglDkYB/q7WH4V64AiWoyCMlP kOPM7S/oD3q4oZwvs/HTeBKjM7Qcodf+P7p0aj8Bw+SoKXdKUJul9SmDPjMllXMPQbTG PFd6qWGWJLPdhjJcKVC/O+wmwfs5R1K4LlDAQcL7dBvKY30ACP7u1oIw8GziHMrLCoKd TqRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp36si16441969ejc.478.2021.07.06.21.25.23; Tue, 06 Jul 2021 21:25:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbhGGEYj (ORCPT + 99 others); Wed, 7 Jul 2021 00:24:39 -0400 Received: from ozlabs.ru ([107.174.27.60]:50696 "EHLO ozlabs.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbhGGEYi (ORCPT ); Wed, 7 Jul 2021 00:24:38 -0400 X-Greylist: delayed 487 seconds by postgrey-1.27 at vger.kernel.org; Wed, 07 Jul 2021 00:24:38 EDT Received: from fstn1-p1.ozlabs.ibm.com. (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 8F9D3AE80026; Wed, 7 Jul 2021 00:13:47 -0400 (EDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, Paul Mackerras Subject: [PATCH kernel] KVM: PPC: Book3S HV: Make unique debugfs nodename Date: Wed, 7 Jul 2021 14:13:44 +1000 Message-Id: <20210707041344.3803554-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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