Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2271751pxb; Fri, 5 Feb 2021 13:24:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGoaPKw3eke3Vx6Tz92JTzWWmDaVHP7a6RA/b3x3GV/PSy4aozlbkwNyfcnFXl2s5NDLf8 X-Received: by 2002:a17:906:35d9:: with SMTP id p25mr5846196ejb.398.1612560274916; Fri, 05 Feb 2021 13:24:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612560274; cv=none; d=google.com; s=arc-20160816; b=YXtPVXkApJvr8dihdjA9vX2FMSpJOFVWSgWowkwIW0llGiAkVpzLX1t1roS/hG349q DVBb9cX06COfBnPEdIrK8+9XYaVq0tLbRHlAW3Q/OzkaRm9zCby7t9OwRv4604drGH+U Pw8neZvZ5mY2jnUC/YVE+kWMi7WlSGIH6380BsY4P7yzEbxsYPXLotV9Sg8Zg9rDyTwH sgghHH7z0st75WrHmCZ/aNMT23/KvD3D6Efbdaf3z4cPCetSuH9OFB/ugCwC5wbExftJ G6USSksXe7NZ5b091wTFQ1cht5PhM7Mv/3O+blV8eVEGVo5DS6xLhg2INug3As0I/c81 yxRQ== 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=HE35Jbk9LiDoAUxQGxt2INZd9i9NBQyLyIPEShL3sVY=; b=0IynP5XCkEaDXW9AkklIxk1EirLN1vE2wEMdERzQzzQwEDLp6w+Dv3RwAavVfK7x0V 8J84niZXzs+KpRH39wPfBsRfU1ShAarKHUVvYFcjzQOdIfiWgoNDbzxJ19519si20Seo r5TYGJYUeqj54bXSvu2v41FEQn9bdfOyLDGJll0sMhJAziHgefMakilxohIIPZp055yN YnWEjq+DElNYkNRcD9us9AyKYzDhhxZFfydYzDayLIkjMOIWLKZSOhDvzZKBF+LUXV20 pNTfH0CURdU3um1CvCJIc0cCFzR+BQkUhzS54kEHUCg5fLBc5CYt9lSMwJ1Z0Qcz0AGd BioQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uS7kyoNu; 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 r25si7319408edc.257.2021.02.05.13.24.08; Fri, 05 Feb 2021 13:24:34 -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=uS7kyoNu; 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 S233092AbhBEVW2 (ORCPT + 99 others); Fri, 5 Feb 2021 16:22:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:45582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233049AbhBEPCP (ORCPT ); Fri, 5 Feb 2021 10:02:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F232065064; Fri, 5 Feb 2021 14:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612534363; bh=ncnEOYc1mTZE2sp/mLV8K7ozQG+hvpsPDKp4Tv89Qik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uS7kyoNuWMzrGhQTSkISA+uo+5nqbAU1mLJG4LVv/deTY7WL9VsrfMjDJbO639Zy2 /qGWIqUvU7mzMioIKiPVAgJi3lpbRNjcZT7o8+kVbtrYsHvIMfGU1F4ctFw5rB1n6s 5axjcliSbCXasn0SKU2vxf6r6Nv7W0Ykhe//xoZs= 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.4 17/32] x86: __always_inline __{rd,wr}msr() Date: Fri, 5 Feb 2021 15:07:32 +0100 Message-Id: <20210205140653.071276135@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205140652.348864025@linuxfoundation.org> References: <20210205140652.348864025@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 86f20d520a079..b40d0295d8129 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