Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2298335pxb; Fri, 5 Feb 2021 14:15:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMIg+5W+8myUsztczKVI9rvuNeVbxJPU8fC8ri2mlLtX/0Tp1scOsZnbZaPCXQL7deJtTl X-Received: by 2002:a17:906:1d0a:: with SMTP id n10mr5980715ejh.22.1612563327880; Fri, 05 Feb 2021 14:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612563327; cv=none; d=google.com; s=arc-20160816; b=pzKetBJIqgVcLQgxO65t+jztTJg0l/EwvVlt5qtGKbVu3OkLA1YAIPMdcxCKQZvT3n KLqZJSkBCbxiI2I9vC7UiURQCT7ey+PjBRQ25FeON7mpHZpS+icg/aKI3kRcvscZVLMv ZbL2t/MVr5YyKbQ+5zB9V7qrwhEbQ8OqysDBZmSoicN5tuX0YPYmYB4oftHwwXX16GdH 4jc5FJLhfo808l+xWNSXK+n4Kfwq4Lf5U19kt/2mPeCYUP4l+8KVdWkoyidGgiXVzbLS e4lmYMSEyAgXC3DPd5tw/rHlRI97JlpeKDMP0rMpyGNqYySPcGKihw/MRQQIDa1DzbhT qT+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pdq3Cg2OSJVypgXuUb25uR96vSLRmjH683RfqG++1jE=; b=asMFpOUpnrLzGdYZq67CoqewFcMp0YAEM5qw8Q9WpdP9wa5vF852IuEbOG0FrlXUah PKAh73rH1ghLgg0P4gIJ1y8AoINJbyXJsxLU/QYCgC8xWUlRUPcBi9/AFjrc/Wg7bevw VJWhdR8t8VeHKE764Eyc5ZyBoV9ur5p/CbkRu15CIT8xQQp3SeKUBCAbWSf3pJAHLUMJ rRMua0XLsqg4+40UXAePgwuY/p5dUSUP3uFxhRGM0EZk9XezTHrjHk4d4IRbzyxqk9dp M4Y/X1wt+GrId77Ya87HHZazST4TjL7Si0Z6m313xD0QUtxNeoiuf6K6tYQhbutCg5bt 6JtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ex9f97dj; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si5450659edi.542.2021.02.05.14.15.03; Fri, 05 Feb 2021 14:15:27 -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=@linuxfoundation.org header.s=korg header.b=ex9f97dj; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232888AbhBEWOB (ORCPT + 99 others); Fri, 5 Feb 2021 17:14:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:45248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232944AbhBEO5W (ORCPT ); Fri, 5 Feb 2021 09:57:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 58224650A8; Fri, 5 Feb 2021 14:14:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612534455; bh=JXCJZcl66ixQybG6dmg/1B/pvt+2Fo8FaQVC0VvKUTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ex9f97djvhhV+cfa9VMj+oL7ldl8xiLnGarcKBEvOUzTIfnXySjvGjivbS3Xm6HEp Vq5rm0jFWr5ABzjtjBbxraNX6ispZLOQCG9WdVaIQQuJ8asK80AouSwtznu4MhzD/9 DCbpI4dSGbgJT8Ulpmj3dBBBis3j8vEsdmyw7AWg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , "Peter Zijlstra (Intel)" , Thomas Gleixner , Sasha Levin Subject: [PATCH 4.19 09/17] x86: __always_inline __{rd,wr}msr() Date: Fri, 5 Feb 2021 15:08:03 +0100 Message-Id: <20210205140650.188596445@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205140649.825180779@linuxfoundation.org> References: <20210205140649.825180779@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra [ Upstream commit 66a425011c61e71560c234492d204e83cfb73d1d ] When the compiler choses to not inline the trivial MSR helpers: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0xce: call to __wrmsr.constprop.14() leaves .noinstr.text section Reported-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/X/bf3gV+BW7kGEsB@hirez.programming.kicks-ass.net Signed-off-by: Sasha Levin --- arch/x86/include/asm/msr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 04addd6e0a4a2..2571e2017a8bb 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -88,7 +88,7 @@ static inline void do_trace_rdpmc(unsigned int msr, u64 val, int failed) {} * think of extending them - you will be slapped with a stinking trout or a frozen * shark will reach you, wherever you are! You've been warned. */ -static inline unsigned long long notrace __rdmsr(unsigned int msr) +static __always_inline unsigned long long __rdmsr(unsigned int msr) { DECLARE_ARGS(val, low, high); @@ -100,7 +100,7 @@ static inline unsigned long long notrace __rdmsr(unsigned int msr) return EAX_EDX_VAL(val, low, high); } -static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high) +static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high) { asm volatile("1: wrmsr\n" "2:\n" -- 2.27.0