Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5939067rwn; Mon, 12 Sep 2022 17:34:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR4pmFD+vhSiL3nLa8upQI7rBFwnYmRWobe2oprLSSLDvLaWq9exMu64RdX7CKaYNcVPenIK X-Received: by 2002:a05:6402:547:b0:44e:8d81:cd9c with SMTP id i7-20020a056402054700b0044e8d81cd9cmr23797575edx.196.1663029282286; Mon, 12 Sep 2022 17:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663029282; cv=none; d=google.com; s=arc-20160816; b=eHpCGT4EbLhTbpggdkm+dKToFtlj4WwpEbNOrzwpVyC5LdDgwFag1oG+rQOsTMoeZo SJXAldRQTqDlMIEtbV8ZX0q8Yn6qmDzzzBRDibj5380R+t27r9Xy9Zs9MV4Q9vlqAjX7 V+quZ94/UpJ6DaB3DpqSQO5GgLjXW753YmsJO4drxOrSf8v5SSv7jS+5tSVfhdQ8XAna VpSDGNRixo27g+T/BBZ8JCahCE3/ynulMckRQUQLAxn6EGOxcuKNep9Shc9JoBC1WtIf CmnCgA1kRLLME5EalBMbX55D5bCk3X9O4BSBN2hDbrCWucxjHNZhDm4YPEEuib67HcZN TrVg== 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=07MLbX9pl9PmW9+LzHvAS62+pEJ1g7Y7LfoVnHwGhng=; b=w1dwIStzLYnPwr4kb8jdcW9dejwe2KxU56xiiwQ3/f78q09VGNA6gq2MmSvfVHRLeN fym2/O2Ax/N5Pui7aXmq8bXdVXP1Feb+KrI3DUYPe2tDZzxTu1TjOhv1Cojdz0H8RAV3 fRp13kr6Xswm1e1tmAElq7z70DfOAhzgK2Ox0Lu7Kknvea2tClw+kPkGHR72eoorDqW5 0gL0+rY9D7awlCHs4RLVy2uNJIHQd+4XIChKrsRtPkJoSk9reyo4jNUKdY6uIoGzaIBG 1GROu36MPHTfEbvlQ/Tpp73sxM2hK6DWRr70Sb589Jp2KymQ1ah1cf3xjdw57Z/C9KWM h9aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=azhnkSR4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb17-20020a170907961100b0073d68cb42f0si10454909ejc.717.2022.09.12.17.34.16; Mon, 12 Sep 2022 17:34:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=azhnkSR4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229988AbiIMAGl (ORCPT + 99 others); Mon, 12 Sep 2022 20:06:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbiIMAGj (ORCPT ); Mon, 12 Sep 2022 20:06:39 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7BA84B4BA for ; Mon, 12 Sep 2022 17:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663027598; x=1694563598; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Uvw6V9KjV6Vb8eX5TMVrCqR2Yi0yPi5W4S9MFXY9hpk=; b=azhnkSR4tFaI+SXZVmNajL24WpI8ixOpFqgh0M6YWPTauN+U2tNvRxcD qDKDtDSw3FbAo/KP0+aPf4VHzek4c44NviZLi1zAtT31/cfISHfXxJi2u wQKToetqXCU8B/JA8/ET9RFb0Xw/qw4F7cz+KckDgcCiM7Yq9orITUzA9 xCUEUox/EuajfW1YWp+LmfxLG6xOB/8i6Hb+M+VK9ib3Z2+XvDACb5Q/I abxlN4Bw4UQcS8VCohe3brLZBDRdsj5kW2fokA8fN45Mvc2CSMB58c0ms j+xjoHkGtuBTuRuvKa7i7mmUBT4hOuCwTtKL+6eQ/zkRpYePkpHrQb+vP w==; X-IronPort-AV: E=McAfee;i="6500,9779,10468"; a="384295266" X-IronPort-AV: E=Sophos;i="5.93,311,1654585200"; d="scan'208";a="384295266" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2022 17:06:38 -0700 X-IronPort-AV: E=Sophos;i="5.93,311,1654585200"; d="scan'208";a="944838249" Received: from aburgsta-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.251.208.142]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2022 17:06:34 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 3177910455B; Tue, 13 Sep 2022 03:06:32 +0300 (+03) Date: Tue, 13 Sep 2022 03:06:32 +0300 From: "Kirill A. Shutemov" To: Jacob Pan Cc: Dave Hansen , Ashok Raj , "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , x86@kernel.org, Kostya Serebryany , Andrey Ryabinin , Andrey Konovalov , Alexander Potapenko , Taras Madan , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ashok Raj Subject: Re: [PATCHv8 00/11] Linear Address Masking enabling Message-ID: <20220913000632.2o4alsekgskof2x2@box.shutemov.name> References: <20220830010104.1282-1-kirill.shutemov@linux.intel.com> <20220904003952.fheisiloilxh3mpo@box.shutemov.name> <20220912133935.3bb3e247@jacob-builder> <356d4ad1-f7d8-b8ff-3b63-819a64bf5b9f@intel.com> <20220912155502.0087a993@jacob-builder> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220912155502.0087a993@jacob-builder> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 12, 2022 at 03:55:02PM -0700, Jacob Pan wrote: > Hi Dave, > > On Mon, 12 Sep 2022 14:41:56 -0700, Dave Hansen > wrote: > > > On 9/12/22 13:39, Jacob Pan wrote: > > >>> + if (pasid_valid(mm->pasid) && !forced) { > > > I don't think this works since we have lazy pasid free. for example, > > > after all the devices did sva_unbind, mm->pasid we'll remain valid > > > until mmdrop(). LAM should be supported in this case. > > > > Nah, it works fine. > > It just means that the rules are "you can't do LAM if your process > > *EVER* got a PASID" instead of "you can't do LAM if you are actively > > using your PASID". > Sure it works if you change the rules, but this case need to documented. > > > > > We knew that PASID use would be a one-way trip for a process when we > > moved to the simplified implementation. This is just more fallout from > > that. It's fine. > > > Is LAM also a one-way trip? Yes. -- Kiryl Shutsemau / Kirill A. Shutemov