From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793019807; b=QqkZQaAsXOhIL0jIRVvOYZwXQsZEcMcosH1HLXMcGUQ391fnVDO1B5OKfkvUIvOYDMEm MkTGIoEXjvTV/mZaYlZQb8Z6fPueICw9NNVjvTKQAG1JTfIK53gL92+UVcyGJWhd/xr5+ ajZxmYcV8EA/iWNh50vO3NmLA5YhVPYKFha+vb8d0o3lvgXbDPyPbgkvUCRk+wr1Rw2z/ cCFXlvBxtwR1nDTKmA3wUMZZ7tQXac87+bXoztmEb2wUBiu/0BEAVUsT7VCQL+sr9sKyr V1AI9VvhkOMj7oDiBC/No/m6GgSnPcJ+QQOkR6WdFDndef7xn3go36HzWQAzn3CresA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793019807; h=DMARC-Filter:Received:Received:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Pre-Result:X-Rspamd-Queue-Id: X-Rspamd-Pre-Result:X-Rspamd-Action:X-Rspamd-Server:X-Spam-Level: X-Spamd-Result:X-Spam-Flag:X-Spam-Score; bh=ZvB6CQUyU0qwhXLGQ9Zg9p3eNUmNqnTiT6p23t0PuUI=; b=qUVx9iH3ap8GtgYuShw0r75ANlQL4uCkAPz01M9ioQpQcExiKFK9wK5SMnbGK7FOJKvN HkZHOKn/IV5wbMA8ZDooWgSd0Pvi42m9b9tqzI9elLr9WQ0TKQ+Zk3eJSIbezvHvBIjns wMvknRp5E67utxzenTP3wslB/yyDSBSOsAfgmK5aYHsF6XiX35YEpjmJhwR86/oInh5B7 eWmUNoNywzDtEYJw6tnBKr+RIezEjaRxHfBXhnsZfWQsawGaXCPvPOzlaWJSAR7yQctRs Aqi5hh8sYD9a9Ulg7Y/FiBnFxvRZxhn3BH8cM4kjUJ1aKr03aq1WQ2KSaqumDdQGVHA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.remote-ip=195.135.223.130 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF165606A31F for ; Mon, 26 Oct 2026 13:03:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DF165606A31F 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 51DAF22149; Mon, 26 Oct 2026 13:03:25 +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 C7B3513408; Mon, 26 Oct 2026 13:03:24 +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 igIiJ5xP32pZWwAAD6G6ig (envelope-from ); Mon, 26 Oct 2026 13:03:24 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org, virtualization@lists.linux.dev Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ajay Kaher , Alexey Makhalov , Broadcom internal kernel review list Subject: [PATCH v5 10/12] x86/msr: Remove rdmsr() Date: Mon, 26 Oct 2026 14:02:21 +0100 Message-ID: <20261026130223.773129-11-jgross@suse.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261026130223.773129-1-jgross@suse.com> References: <20261026130223.773129-1-jgross@suse.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 51DAF22149 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLkdkdrsxe9hqhhs5ask8616i6)] X-Spam-Flag: NO X-Spam-Score: -4.00 rdmsr() has no users left. Delete it. Signed-off-by: Juergen Gross --- arch/x86/include/asm/msr.h | 7 ------- arch/x86/include/asm/paravirt.h | 7 ------- 2 files changed, 14 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index badab5762f3a..6d7bab33af71 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -179,13 +179,6 @@ static inline u64 native_read_pmc(int counter) * pointer indirection), this allows gcc to optimize better */ -#define rdmsr(msr, low, high) \ -do { \ - u64 __val = native_read_msr((msr)); \ - (void)((low) = (u32)__val); \ - (void)((high) = (u32)(__val >> 32)); \ -} while (0) - #define rdmsrq(msr, val) \ ((val) = native_read_msr((msr))) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 47d4e36d14cb..93754aa60d5e 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -150,13 +150,6 @@ static inline int paravirt_write_msr_safe(u32 msr, u64 val) return PVOP_CALL2(int, pv_ops, cpu.write_msr_safe, msr, val); } -#define rdmsr(msr, val1, val2) \ -do { \ - u64 _l = paravirt_read_msr(msr); \ - val1 = (u32)_l; \ - val2 = _l >> 32; \ -} while (0) - #define rdmsrq(msr, val) \ do { \ val = paravirt_read_msr(msr); \ -- 2.56.0