From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A81AA3BC687 for ; Mon, 29 Jun 2026 06:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782716253; cv=none; b=igIM0gJH6QEVYrvFS1IcTH5ya9RXJ8pDDMvPgvn98rS+36z1W+khsatcBmrosxR7agrv/xGYReOygj2l/sn4CweXvTIDfuLgpYlTa3DPe62iPBCiRtRCIRiERsFxbMRTfBwl0+IDSzZaEqNeTE2HGvThTyIHEqgIVzpVDkO9Z3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782716253; c=relaxed/simple; bh=7SofCqHlXZHsGywWIbJLRunzHijONIUHedv8Xrx1yGY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WNDCDBKGxtuvOghadpstuE5oRuE58tOud3+Y7SWu1L/vGLerSKU2Hf7nwfUwDp30mBWD85T1C037sP/kGOT2Hr5o80RWenGf18H/0o7VGN4MtsTomIPUOSmy0cHRZLd26cH9Eaq1qdoqFxaqtV5X8n2lcRgVUtCY64yjJdSfA/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A6AA072F34; Mon, 29 Jun 2026 06:57:30 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 66990779A8; Mon, 29 Jun 2026 06:57:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8EudF1oXQmqsQgAAD6G6ig (envelope-from ); Mon, 29 Jun 2026 06:57:30 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v4 18/18] x86/msr: Make all MSR access functions __always_inline Date: Mon, 29 Jun 2026 08:55:44 +0200 Message-ID: <20260629065544.3643253-19-jgross@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260629065544.3643253-1-jgross@suse.com> References: <20260629065544.3643253-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: A6AA072F34 X-Spam-Flag: NO X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] There are a few MSR access functions left which are not yet marked as __always_inline. Do the conversion. Remove a leftover comment no longer being true related to this. Signed-off-by: Juergen Gross --- V4: - new patch --- arch/x86/include/asm/msr.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 74defb414931..a8cfed32d9a3 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -269,13 +269,12 @@ static __always_inline void native_wrmsrq(u32 msr, u64 val) __wrmsrq(msr, val); } -static inline int native_read_msr_safe(u32 msr, u64 *val) +static __always_inline int native_read_msr_safe(u32 msr, u64 *val) { return __rdmsr(msr, val, EX_TYPE_RDMSR_SAFE) ? -EIO : 0; } -/* Can be uninlined because referenced by paravirt */ -static inline int notrace native_write_msr_safe(u32 msr, u64 val) +static __always_inline int notrace native_write_msr_safe(u32 msr, u64 val) { int err; @@ -301,7 +300,7 @@ static __always_inline int native_wrmsrns_safe(u32 msr, u64 val) extern int rdmsr_safe_regs(u32 regs[8]); extern int wrmsr_safe_regs(u32 regs[8]); -static inline u64 native_read_pmc(int counter) +static __always_inline u64 native_read_pmc(int counter) { EAX_EDX_DECLARE_ARGS(val, low, high); @@ -363,7 +362,7 @@ static __always_inline u64 rdmsrq(u32 msr) } /* rdmsr with exception handling */ -static inline int rdmsrq_safe(u32 msr, u64 *p) +static __always_inline int rdmsrq_safe(u32 msr, u64 *p) { int err; @@ -375,7 +374,7 @@ static inline int rdmsrq_safe(u32 msr, u64 *p) return err; } -static inline void wrmsrq(u32 msr, u64 val) +static __always_inline void wrmsrq(u32 msr, u64 val) { write_msr(msr, val); @@ -384,7 +383,7 @@ static inline void wrmsrq(u32 msr, u64 val) } /* wrmsr with exception handling */ -static inline int wrmsrq_safe(u32 msr, u64 val) +static __always_inline int wrmsrq_safe(u32 msr, u64 val) { int err; -- 2.54.0