Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1904824iol; Fri, 10 Jun 2022 18:30:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+uUSkWEcFL1qODGAUSpLgibRvdRhde2Kn2jwbJENCubWAh5zGdamu29zDQqzdkbfheKK2 X-Received: by 2002:a05:6402:5c9:b0:420:aac6:257b with SMTP id n9-20020a05640205c900b00420aac6257bmr53878678edx.128.1654911049376; Fri, 10 Jun 2022 18:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654911049; cv=none; d=google.com; s=arc-20160816; b=1F3tcnyr9nM9+2VZ9e5xC/sI1YGQ+yo+gtzA1i/l0zebbzkeY0HZON7c4VqAtfsP9C Mh7sbpbBrLkUOZywdfEvomAPW4h20ICYIGELDHphonJp8B/A5s1Hp+shwL75h9eZS58A 5TUXxGzdQ9XuKjE9kxv1tXotvHDjwOhGPHGvMRY6fwhC0IkhiByzpgf0in9kSj9EdUtR I69JYM9adtp6kjrG18mofUrGmyURlExQIg2+V+u4cTqzcsdBCH6kefD1M/FUG2QiYv3j VGsIg4HRSv7J+MZRrmYo7yPIOxlq66Pd5AmTeBJIGs8W3rBJmZsVTW3AGD87hbIQilG6 kdIA== 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=vhgxF2lEh97gzlZOP+lXnLKPrYmePBk9rNrHORpGPaM=; b=U/F39+5oFtSq2GR+qCtt8YSXb5OxBlkbsxIY5wSx7ueAV0JSmn5eK5sncdfmhilNmb 3HhxdRO7RKDKDF+SfGxgkQ6Shaj4BSxaJRsFi3fsgnI3ng/W8A3sfA2yZkSG2o1yDkjn 9FjSr2i41RQ8P06X994ByiTPUAODjlVa3IoImrh+Z5nnT2Ko/8ATqz45jYEGisSmpSxK /kc2NJ/Bm31rFSryJzBHWjqVpEX/wtqLOmDZfcNA+2dNxJucJS3C6shL+eQ2vP4sQ6vv /T5wqHduqTNSktFpIxLjJRJ0xAC+aLDlBsX0ulPwfz9y5SUTlLMqLFsG63tEUxh4qZtQ Jh+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c7X7Mp51; 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 x15-20020a05640226cf00b0042d83ceec4csi797585edd.252.2022.06.10.18.30.24; Fri, 10 Jun 2022 18:30:49 -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=c7X7Mp51; 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 S1347688AbiFKB2d (ORCPT + 99 others); Fri, 10 Jun 2022 21:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242861AbiFKB2c (ORCPT ); Fri, 10 Jun 2022 21:28:32 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 917AF3FBBD7 for ; Fri, 10 Jun 2022 18:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654910911; x=1686446911; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6kbuoWn2/Np3kiQGVvTfuTgoBDbVE2L6Exk4Okh2Jl0=; b=c7X7Mp51y5Ya5P5oU+RWzLFQwJEZL208xvHBLe3ADLRAi17HsGedXczD QG0jY+Hb6IiPxsve4PYdEEyi/7lGGpr55JeFtFnoTFWgpj2AWovj8RShG FMzEGbs31/yZkk4+nXAPIqW+BFpB206NQzCUuyYwLFwuVS2or5/OVP549 t9bqHb1OeNFCwrvcQ541EjZGXyCbIQbT6DrqICqd9bOgSibgTeuPdahe1 17+tKb5nbLeNWjN+xc+tOeHwfn4h/VDdfymiCVdE/PpIWdtZOOu78bl+f jKrtR6tfJsAg4xE5XDISs7o1DhwfNnSa3102nvpM8QnyMTz3Rz9I3D2hS Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10374"; a="260914147" X-IronPort-AV: E=Sophos;i="5.91,292,1647327600"; d="scan'208";a="260914147" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 18:28:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,292,1647327600"; d="scan'208";a="650128436" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 10 Jun 2022 18:28:27 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id A4535F8; Sat, 11 Jun 2022 04:28:30 +0300 (EEST) Date: Sat, 11 Jun 2022 04:28:30 +0300 From: "Kirill A. Shutemov" To: Dave Hansen , Catalin Marinas , Will Deacon Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , x86@kernel.org, Kostya Serebryany , Andrey Ryabinin , Andrey Konovalov , Alexander Potapenko , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv3 7/8] x86: Expose untagging mask in /proc/$PID/arch_status Message-ID: <20220611012830.hs437yikbjgwlije@black.fi.intel.com> References: <20220610143527.22974-1-kirill.shutemov@linux.intel.com> <20220610143527.22974-8-kirill.shutemov@linux.intel.com> <144af1ab-1e7e-b75c-331c-d9c2e55b9062@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <144af1ab-1e7e-b75c-331c-d9c2e55b9062@intel.com> X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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 Fri, Jun 10, 2022 at 08:24:38AM -0700, Dave Hansen wrote: > On 6/10/22 07:35, Kirill A. Shutemov wrote: > > +/* > > + * Report architecture specific information > > + */ > > +int proc_pid_arch_status(struct seq_file *m, struct pid_namespace *ns, > > + struct pid *pid, struct task_struct *task) > > +{ > > + /* > > + * Report AVX512 state if the processor and build option supported. > > + */ > > + if (cpu_feature_enabled(X86_FEATURE_AVX512F)) > > + avx512_status(m, task); > > + > > + seq_printf(m, "untag_mask:\t%#lx\n", mm_untag_mask(task->mm)); > > + > > + return 0; > > +} > > Arch-specific gunk is great for, well, arch-specific stuff. AVX-512 and > its, um, "quirks", really won't show up anywhere else. But x86 isn't > even the first to be doing this address tagging business. > > Shouldn't we be talking to the ARM folks about a common way to do this? + Catalin, Will. I guess we can expose the mask via proc for ARM too, but I'm not sure if we can unify interface further without breaking existing TBI users: TBI is enabled per-thread while LAM is per-process. Any opinions? -- Kirill A. Shutemov