Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2280740pxb; Fri, 5 Feb 2021 13:41:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBuzT7iFmymIb/akl3MKyqPgJ2T+rBWCSicnf3xI3HHyaSI9WHYUoE36eRErvYL0G3XznN X-Received: by 2002:a17:906:a091:: with SMTP id q17mr6092032ejy.286.1612561300505; Fri, 05 Feb 2021 13:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612561300; cv=none; d=google.com; s=arc-20160816; b=sW2GhfQmVE16dAyStk9UUntp9cB639tZ8X1TZ2wWhefasPM/82cizw7us7OlgB0Q9l dH37RaCvUSbpJX7jKDc3XcPxv0xPhGQPs0t3qsDQ6LVvEWSVfGdDz0AymMRpYo/RkHBX TZvgcHl1r95lDhQZOk8yLcazJt8F0+RdxDp+8wYdc8Mdh8pB+QhQH7o8yaKAl7BJIOtB QA/4BSigpwEAfBP7F3FVyY4fDnXtn1scxoYAc7JMsWgB0jS8hItE1uLPG7Bp/H1ijxsW nHx3wSxxoc0VUt4Q1WDAXYqF9e8Ok9t9Pd7D5kS1Pv7TU7odYsb6EkK0nqgPSv2bkZBO KZVw== 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=KLYMXZL9LWWB5eq2Svt9V7Yv2xDWtFh+54TSrgmmazM=; b=ayfotB80FYmmV7Yn/T8qyMaQoUTX0udOaFiWa1QFEAT5fB7Sno7h60KQ7VFyNS66ux S24E8i9rCM68j6HxJZvJp7k5/QKjB01tuUGxfhTJDlcfzE3nOFNUYUK10lr1dgEemWAd 9vVLw+CXvTZJ6tMfaB7eAr7KglfXxz1h2cf2Q3WWx6dGSm5OOyb+/8/+ONrGLQNMhm/6 7NyTqv6NhSsXgpeKx1XUoxJm87Wbnm5bgb4y4BFTTgwLU52qpl8lVG6YKDz3Lr01We3H ZwaRR0sOkdbCIMuKmEZioCaYWDFqWVDefl4OXZJylSXmtC+f1GMZQQbyyqhv8JdfeBFM P5Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fav1uezX; 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 l13si5459446ejg.422.2021.02.05.13.41.16; Fri, 05 Feb 2021 13:41:40 -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=fav1uezX; 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 S230399AbhBEVje (ORCPT + 99 others); Fri, 5 Feb 2021 16:39:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:45590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233018AbhBEPAA (ORCPT ); Fri, 5 Feb 2021 10:00:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6BCAF64FE0; Fri, 5 Feb 2021 14:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612534202; bh=JV8v2lvWXBi0RYBEyyY0tVeBscq0P85QhZ6gEmRa+1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fav1uezXtpgVDS4qtq6H/McBUe3OFe8mazFjh4gIx+jLF09lJ+/zMMfsS+ZD62+5p KiZMK00JbJWESXR3g0sFNEPw4deq2knY/eZKMRmtZ4HKsuencYef2lRb7i0um9k2yS Niyn+Al2/TsRG2xYmjpJLLZDzYcIJfTZguoKx7t4= 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 5.10 25/57] x86: __always_inline __{rd,wr}msr() Date: Fri, 5 Feb 2021 15:06:51 +0100 Message-Id: <20210205140657.052798832@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205140655.982616732@linuxfoundation.org> References: <20210205140655.982616732@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 0b4920a7238e3..e16cccdd04207 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -86,7 +86,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); @@ -98,7 +98,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