Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1863104pxb; Fri, 24 Sep 2021 13:50:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpBvEtpefHL8H11i2kDDSIouG2eappUex+KS7kw+kE2qvx7t6cMOO6C3cQjdt0ruYQftI1 X-Received: by 2002:a17:906:6403:: with SMTP id d3mr13274453ejm.37.1632516610287; Fri, 24 Sep 2021 13:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632516610; cv=none; d=google.com; s=arc-20160816; b=C9LDg6y+Pz6ALogEDZjgV/CQ389oed0MUMxxQLU+y10Nu0r/AcbyZu4u6mrlC9N81I Wo9UB9fBbZqt6w/AvPpKJ7POahsvoGPLCZo/SFZDib9RSjCvpGB/XOAJ8SSVgWXNgfJ8 vqZXijnEOpTbmgndJNVAnunO18FFYhnXJbvRUonomwm/K3HRCy/O9ukyfx7dPsJNfYH4 +Ma6zXGsrFJLVBXEcf4QXsylIo55Vs5pbgB3HvO3kPmC2c7uchbeEff8nSQE0JtOW6kF umHAWgCZ5SZHePQ55WaLZCKdTI0qesL478bZ2NvjyncAioFxiZyOvn4QemjrS5YKTZ7P PcvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=EkgceDb68aKuyW7Xafy5kre/SZO1C4q0AWs/aSyA1fg=; b=m8N1Zo24OeRzUh8jOnQmiPJ33ciKL2V8+JsoL1Vcc79HVvEQX5olPWMCCzQioaNS1z v1NuO6Dz4rz8agzBy4u11thlzxyS05eoqSE7hAv2qA4kxgK9giQDr1Ab2g5HvStdCb5F k8IWxJgTp+4XetNWmm0t2GmEkFxIQTpOg843f4Y4mjsa9gxD8z7IdItsS80VSnSyeQtL mQ33AVVHJ9pEwdzd1qa7vO3L8AMB3tzX1Q/nBSQWyoNxzYOi/WjS3pb8Ks1nF/LuepWm uuAKjLIyaNCFZ+iCv5eNkPsocVhNMvh3D2W/DDTC88q43nlXgINpVZh3wwjFEBRs2c4K 6yPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=38LCLbeP; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si11094971ejt.53.2021.09.24.13.49.46; Fri, 24 Sep 2021 13:50:10 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=38LCLbeP; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344178AbhIXNeM (ORCPT + 99 others); Fri, 24 Sep 2021 09:34:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346636AbhIXNcb (ORCPT ); Fri, 24 Sep 2021 09:32:31 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61E5BC05BD17 for ; Fri, 24 Sep 2021 06:18:15 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632489492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EkgceDb68aKuyW7Xafy5kre/SZO1C4q0AWs/aSyA1fg=; b=38LCLbePDv45bODUZovEnO4nt0pNY7G7jB8ei2tc2xRJ3U6xCgL8Pk7GK2/q1fIk2LE9y1 5iPxmBzGxqbv9+Szdwp2xLv38MIxT0L/+cEHBwa0ClXSv5S3dndu1wXctu1ziIYzymsc/4 ug6vEGhBQ+8YZiQbtddsj7OXz2UqAu7W0yfnqqgkl5orPRYXMp8Lpe0kHbexqsRkzmeunw RlOIMXcU+BHyBY3k5b1wYDUk++eLgTPPGiK8j/JQ73QFsvbEKsTKB6sNn8eh643c1dcaL2 85zc79fuqHWPnZpfSPYZO5W78OBQxow9SRiymKhSIydJi51f1kQT/nMdjiU26w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632489492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EkgceDb68aKuyW7Xafy5kre/SZO1C4q0AWs/aSyA1fg=; b=lWWFJgrEx65fA/sjl+oaOFAChukib/QmrFTq4ObEcl9f8EWtFXoZmxOQmcwoY+WqszRrBQ gh0Tb6cgy8/N7ZBQ== To: "Luck, Tony" Cc: Fenghua Yu , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , Dave Hansen , Lu Baolu , Joerg Roedel , Josh Poimboeuf , Dave Jiang , Jacob Jun Pan , Ashok Raj , Ravi V Shankar , iommu@lists.linux-foundation.org, x86 , linux-kernel Subject: Re: [PATCH 5/8] x86/mmu: Add mm-based PASID refcounting In-Reply-To: <87o88jfajo.ffs@tglx> References: <20210920192349.2602141-1-fenghua.yu@intel.com> <20210920192349.2602141-6-fenghua.yu@intel.com> <87y27nfjel.ffs@tglx> <87o88jfajo.ffs@tglx> Date: Fri, 24 Sep 2021 15:18:12 +0200 Message-ID: <87k0j6dsdn.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23 2021 at 19:48, Thomas Gleixner wrote: > On Thu, Sep 23 2021 at 09:40, Tony Luck wrote: > > fpu_write_task_pasid() can just grab the pasid from current->mm->pasid > and be done with it. > > The task exit code can just call iommu_pasid_put_task_ref() from the > generic code and not from within x86. But OTOH why do you need a per task reference count on the PASID at all? The PASID is fundamentaly tied to the mm and the mm can't go away before the threads have gone away unless this magically changed after I checked that ~20 years ago. Thanks, tglx