Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp949686pxb; Wed, 3 Mar 2021 22:12:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwObpbQxcH3V60hjByO77QsWKcocCTeMwWCo+NfOhR/r+cVbbd9mKyeiLsg2/496A0ngMtG X-Received: by 2002:a17:906:25c4:: with SMTP id n4mr2500060ejb.359.1614838351017; Wed, 03 Mar 2021 22:12:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614838351; cv=none; d=google.com; s=arc-20160816; b=rLknZ36DWmFRoMGz1Z4opLguC2294ls0d9L7HiGCWZc+ceB8mQqAHGJNW0J8GQ6Rau 10fcri5GuPLhtrnTvt+aUnnPxkk7+GNeq0k9XE7TUIykufVpM3lDVe5jE56/BqjvRUzL dxHe22swpUoq5UHh60xJcFv8dXRG6OsDk3oWpoIKWvB/ElROdCOBH+QN2heSRYk5mmLq 6pAtcxRZkfBmYk5b/4BEQijMYQPXdximL3fK0jKEh05k7IDm3mmyj7wZsnbh1Gs950Vg DYwCq02+PbhL9VDSGhEXkojiUUmg+Y3tetDtKwa602OtGEJs8e6Q+zPLThsOwsXebTYU ezLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8fJXMvjxuLDN6bYz0lZym+t1q3/86XVS/pchijcoEVo=; b=Tt/iVk2xREDI32sMFAx5ig1Y8kYzokJnVlyMG9QiI3boHTlNylG0to90LFtREnK1Zj DSVmbrIVJNBQwim7hWVpma+ulPeLzIF3Sf4TR0UVIG7pyJ7zun+8BPrHVCt4k65Q4845 Mz2urdcVGo8DLdf0mcUmvnsjo9KqTmnaRBOsc5fbNOxO+vBFsm3ULPbCbxd/kCi4CbhT TQr+XvKiJX/QUwUy5TlM35hSMQnvAJfPQMivSd4HIPEcJF22Y8I9DMCmZHMJ62n+su0G hJUHjSaRJZbphjzattMn1u6KgyCEpMUjE8wSORgvThahNiGLxW54AQfigE+tIVBwz6XZ qjmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BSmT+MRd; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r6si4750198eda.292.2021.03.03.22.12.09; Wed, 03 Mar 2021 22:12:31 -0800 (PST) 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=@linaro.org header.s=google header.b=BSmT+MRd; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1838457AbhCBKyv (ORCPT + 99 others); Tue, 2 Mar 2021 05:54:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379658AbhCBKoO (ORCPT ); Tue, 2 Mar 2021 05:44:14 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34E0EC061788 for ; Tue, 2 Mar 2021 02:43:59 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id u16so1321897wrt.1 for ; Tue, 02 Mar 2021 02:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8fJXMvjxuLDN6bYz0lZym+t1q3/86XVS/pchijcoEVo=; b=BSmT+MRdC2Gz86qjV7VPEXzzBopRQ8WplkLVUfh1pECy7yCQRr7+i65WPII2xYcExs C3Iopvu1EQmgd87vvjwruLy2aw86vBQNqxt1WhKC/OevwP9WYa4/otAO7y5Bv4Qd6EJH Yy0dMKQ3s9AIUfSWWH9cZl8eZ0NHh/bK8aUfuDHbbZ+CmPq8v1KD0zb/BRRCJLsNNzxc wwTQ65Hb9JUTEOzIXpI6jflgeKE3ptsWZwYfD/ENTjcLAbsiEyI1zpLPB476q98x3kjn 3ZHX52999srZNjEzwgqLVWHc5JwOMxMNQsJLtTD9DJGuM61G7xuWpi3oXNeH2VFuiuaG j8RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8fJXMvjxuLDN6bYz0lZym+t1q3/86XVS/pchijcoEVo=; b=ACcn8EICWshMlByn254HCkmQu2gRBqvBySgH/yIoyBmLhKasCmt9ltp5haqFF4xKnw mofTHx3XxiqsS/73h0fWa69d8a1ZiryH1cRpdwgKgcOHZPOZfxPJAoK5DXZQx/6owQ5z sVcBTOEp7vPdQi0Ub/bgb3uXVc5fiVvh37IBs1kXi68u7bnUZzfboMoBnTWgiETz5a0x tfP+wGOqiwspSGcq6POZ5dWqcyieuu5LZ6hvmlwpy5dnbNzN71sDb4v6rZAxfpiQAKQA 9OamDbFCbvLfL1LAkfxUwif6HBiz4vuKk/5Ogw9zj5SiyZF1Mwg1JLpLQBx2q/SDj5HV Mh4Q== X-Gm-Message-State: AOAM533QoFHtXmwF9TFlbfcKa8B1OeGY5EVCN8aFwVRsnGbswa+F9Ong umYMcypEHPwBSw6ACu2xcWcmgdRrwBdFeQ== X-Received: by 2002:a5d:4141:: with SMTP id c1mr22150448wrq.248.1614681837978; Tue, 02 Mar 2021 02:43:57 -0800 (PST) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id h20sm2220312wmb.1.2021.03.02.02.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 02:43:57 -0800 (PST) Date: Tue, 2 Mar 2021 11:43:36 +0100 From: Jean-Philippe Brucker To: Jacob Pan Cc: Fenghua Yu , Joerg Roedel , Lu Baolu , Ashok Raj , linux-kernel , iommu@lists.linux-foundation.org, zhangfei.gao@foxmail.com, linux-mm@kvack.org Subject: Re: [PATCH v6 08/12] fork: Clear PASID for new mm Message-ID: References: <1594684087-61184-1-git-send-email-fenghua.yu@intel.com> <1594684087-61184-9-git-send-email-fenghua.yu@intel.com> <20210301150011.766e70a3@jacob-builder> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210301150011.766e70a3@jacob-builder> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 01, 2021 at 03:00:11PM -0800, Jacob Pan wrote: > > functionality is not a problem without this patch on x86. But I think > I feel the reason that x86 doesn't care is that mm->pasid is not used > unless bind_mm is called. I think vt-d also maintains the global_svm_list, that tells whether a PASID is already allocated for the mm. The SMMU driver relies only on iommu_sva_alloc_pasid() for this. > For the fork children even mm->pasid is non-zero, > it has no effect since it is not loaded onto MSRs. > Perhaps you could also add a check or WARN_ON(!mm->pasid) in load_pasid()? > > > we do need to have this patch in the kernel because PASID is per addr > > space and two addr spaces shouldn't have the same PASID. > > > Agreed. > > > Who will accept this patch? It's not clear from get_maintainers.pl, but I guess it should go via linux-mm. Since the list wasn't cc'd on the original patch, I resent it. Thanks, Jean