Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2306937pxb; Fri, 5 Feb 2021 14:33:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHRb/Si2Vyyv3RN7SOpGasDCd/xPdSECgcKh4O9yZyJSNnORvjiOVi3rH2JNZjE8bE0lwV X-Received: by 2002:a17:906:46ce:: with SMTP id k14mr6239468ejs.480.1612564391845; Fri, 05 Feb 2021 14:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612564391; cv=none; d=google.com; s=arc-20160816; b=1BZQ5Iv0+mrMlSPc9Wa4rSD7a6J0nq3uGv3jUaPHt46ebnvVfR2yMdySjkPw+72fom F+kxN0r/ovrgPB+k2Tu2SmPiQaT+rWSHv2smBUvJ0i20s5gurB5jYhSY4WOAp7mvP2J3 KcyYXFH4F61V3btBsRCJiSffPa5B9yCENTimcF/RNqheu3jBDI9qcA+OnMND2+MFekzg llB4T0Oq3KblrupL4mlLeo1aMCyfau5v3LRI0DKlFuLpuV9+YXYRVkpq6ZRFYj8G7ASV l02/aUIBpBplIySKPXPkF0M4ybAIP39tXL2UNNtYdMiX07WoXvIwrekgJGxXyFOhqpl9 GkRg== 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=6iWSOmwjqYqpnFirxUY0ljFa6H5CTvS9kDFf5i3vwZ4=; b=rYPQlUPA4bwvczh8+ZLxlsgIW0KpaXUuI2whkX8JDmoYeUkXPA/ZMZaQkprlh8h4Od yoiwHBZNgOOEGiSwSYLZ03ydMQQjks+AyFzNvi/IGELbD8zwBiDTHpTmRn8oJTHiAvHI 4OLJmRHoPnhAnbkwweDTAOm8AsUCogkWIZopFUEW5H8h/uW8Cyd+pUJDgkx/5GsxqKX9 wpzca3CBoV6KudWRCqF6/FK2Snx+2mPBEd+zmFEefJJaPcHrfb31wNsqaJiUMDy2Gjyk gkYrkuyJxw6tbR3T0Q8PyMEStqtvJBb105L04ritwN0hGj6/+G06YdweBKj1RrwTJUs8 RgPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H5eNfvcs; 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 a20si762667edx.226.2021.02.05.14.32.46; Fri, 05 Feb 2021 14:33:11 -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=H5eNfvcs; 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 S232903AbhBEWao (ORCPT + 99 others); Fri, 5 Feb 2021 17:30:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:44678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231489AbhBEOye (ORCPT ); Fri, 5 Feb 2021 09:54:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06434650C9; Fri, 5 Feb 2021 14:15:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612534501; bh=Nw4bYKAmuQK2ybBR8s65hqtGG2O36emorJfd7nWAqPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H5eNfvcsg+venXBXmp5HenrE4rtNhRHAnx4OcqEfEmA2jym/SalhAFzeEN/N9NTID X+bBM4EbYo4SCI71UJC4tiYXYQzcYuYxCCYLlkPXgntb8n0AT4iWHXVgbPUH6lrgqD c9EEOC2Zd6fWuggP2NdnUmQb6Ce0W4KyleU7c8UI= 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.14 09/15] x86: __always_inline __{rd,wr}msr() Date: Fri, 5 Feb 2021 15:08:54 +0100 Message-Id: <20210205140650.103083578@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205140649.733510103@linuxfoundation.org> References: <20210205140649.733510103@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 30df295f6d94c..18f9a9b7280bd 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