Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6521557rwb; Tue, 9 Aug 2022 17:35:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR67mTnKjQ4V2FD5+ycUtKkg4QDQlC6kHydUSaIprg/ghJW2hnsCvJLtzoSHUQ1p0XUpst87 X-Received: by 2002:a17:90b:33c6:b0:1f4:f2f0:1ac5 with SMTP id lk6-20020a17090b33c600b001f4f2f01ac5mr993442pjb.65.1660091754591; Tue, 09 Aug 2022 17:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660091754; cv=none; d=google.com; s=arc-20160816; b=PC1Eu2lEMbgM3pcBudwk51C4XDtP2sQ4UA+pZKa5zKapkI1zVhieAiDHekv4/l6WAU Pw0kH9fscxKEg3X+cw7x9tqsVgV7P8HiygGEAYJ935no05C8/CaugGph7zrmKovDIs+E uj7wwgoa5DgpBUQ3rwG+lcjvIItSruFNEsRbFLbl5M+HxYzKD2wo6r4I141MMo9q0dA8 W1Esm/uEN4e6nxcf65vYL1l6X0rJ4VP2/yhb0Q5Pih31Ifem7UjIvMTUClF1xuLCPD6m gyiBM3/RD1eC+GC0VUpKAdJ6Y1oCWZ6PvykTSO/+QPdDxCVJ0DHIjMYVfsShpaxR0gDT jcng== 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=jrOHN1U1qKnc1USHcJnkCBvBpPEAggRR6sgX6Oq23xU=; b=wbTDuL5YeL9nFcTLqoEGrkmcE2Hzd5RMS2weTMC+nfWUsr2HF/6RiYoyyBvpofvYJ/ /nxwMkMs+VdLMzJZTMvc/L0S6zLRcUgvzPmNpqMNKPLJJYTvZajd9jRdq97DUJw+SqRr psv+3AIISHa1pmn5xhAXkvtu9RnA/QYiooZmfH8Ls+OGKOEjxk9LIdaW0ZBaUA3zKx+V KJi3Dnb26NcIaauhUTz2YvZDObLFq7SQQxdQhXltqsJx6NSesE21L5U2bZGZaQLt0XyF zOpDoHUO4nkDRhrZLbSPcpKeWHHrQB7JFzDbWYX1+eKsvwydbv4Jj+CtQxgBAc+ZWpbB uwDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kPoVqRP3; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=X8HUFGpO; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a17090a0c0200b001dc62080a06si477552pjs.74.2022.08.09.17.35.34; Tue, 09 Aug 2022 17:35:54 -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=@linutronix.de header.s=2020 header.b=kPoVqRP3; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=X8HUFGpO; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbiHIXx5 (ORCPT + 99 others); Tue, 9 Aug 2022 19:53:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbiHIXxx (ORCPT ); Tue, 9 Aug 2022 19:53:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D15980487 for ; Tue, 9 Aug 2022 16:53:51 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1660089229; 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=jrOHN1U1qKnc1USHcJnkCBvBpPEAggRR6sgX6Oq23xU=; b=kPoVqRP3UDkuegp5e0Fz4RkoFSWPbOWvIfryUzF2vpvdANTCMg6t5JcYltQZOmYOMuL1Lz yLv1gpPpoopmyGhMbNBMYGu/AdaZwL3wojUch3yGFYXEWjYmKUJHLFuBIFVMit6Uv+kxLT h3IW33IKjme268KKUryrn1kFKBXC81Tp1Ou307xOqrfhGS2RWdMCsWRjQYy6uI/QI+Q3Di rk1iq7Pr7jEi7NTW13HMBqGEm74f//2nmlR5gjP/mq/NBYU4np3Qgs+/LHu4IZfV0BHHIw iFeCMn2TZBateBkJ2iQKANaeSa8NmZr//CpVDmA8Og1IJ+fxEYQlCORv9/AYrA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1660089229; 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=jrOHN1U1qKnc1USHcJnkCBvBpPEAggRR6sgX6Oq23xU=; b=X8HUFGpOsIiRxq+j6xHaMLYK4imR47XMAulj1f8viUBYfaeNHZxf7RpOCsnPwsz+CQpygd BqR4hiuoOSN5BqCw== To: Ira Weiny , Borislav Petkov Cc: Rik van Riel , Dave Hansen , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC PATCH 2/5] entry: Add calls for save/restore auxiliary pt_regs In-Reply-To: References: <20220805173009.3128098-1-ira.weiny@intel.com> <20220805173009.3128098-3-ira.weiny@intel.com> Date: Wed, 10 Aug 2022 01:53:49 +0200 Message-ID: <87czd9q8he.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 Tue, Aug 09 2022 at 14:49, Ira Weiny wrote: > On Tue, Aug 09, 2022 at 08:49:47PM +0200, Borislav Petkov wrote: >> Why does that need to run with instrumentation enabled? > > This does not. > > Am I wrong that instrumentation begin/end are 0 overhead in production builds? instrumentation_begin/end() are annotations and never emit executable code. Neither in production nor in debug builds. Why keep you harping on this question? Is it so hard to figure out what it does? But that's not the question at all. The question is where auxregs need to be set up. Once the entry code leaves non-instrumentable code it's obviously desired to have consistent state for instrumentation. This obviously applies also to the auxreg space unless there is a compelling reason why this is not required. Thanks, tglx