From nobody Tue Dec 16 23:08:52 2025 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 85E2C267B8D for ; Tue, 6 May 2025 09:20:36 +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=1746523239; cv=none; b=rvETyWseGObh0fPwipoouVIPbkonuI2qoNqKX8yQSdL/zbrNJVnrXLLWa0piJNaOwuiF8dEpB1huFpW2FCvJqKSfiQGGBSJIaCc2JsJUNDkRK0v73FbtdK98izh6ZVGB2lsfLB22VVM3I+ISSxXT8eipq1BjGPT7C2lJ7X2mRW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746523239; c=relaxed/simple; bh=ORAAokWZRLs1gmD8f0jM5jt9Hu7eu0t14SnarYgFl58=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=of7X/2X/yRuArUr2sxCYtyBwzRXgp06HhRcxwXv81xwRpgv75+0t8PEwqOA7/7UpDpDLZPWJeYmuyvg71M+/KrJptmIu55OfwAh4v9T6CAgA24zvf9ATAStoY/IL/KaSz6uL2P83c8SqyQHL2HTmr/IgxY6/K/9xZDbK50Sy83M= 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 CB6A421222; Tue, 6 May 2025 09:20:34 +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 6450E137CF; Tue, 6 May 2025 09:20:34 +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 5iLfFmLUGWgKbAAAD6G6ig (envelope-from ); Tue, 06 May 2025 09:20:34 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org Cc: xin@zytor.com, Juergen Gross , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH 2/6] x86/kvm: Rename the KVM private read_msr() function Date: Tue, 6 May 2025 11:20:11 +0200 Message-ID: <20250506092015.1849-3-jgross@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250506092015.1849-1-jgross@suse.com> References: <20250506092015.1849-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: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Spam-Flag: NO X-Rspamd-Queue-Id: CB6A421222 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 Content-Type: text/plain; charset="utf-8" Avoid a name clash with a new general MSR access helper after a future MSR infrastructure rework by renaming the KVM specific read_msr() to kvm_read_msr(). Signed-off-by: Juergen Gross --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/vmx/vmx.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_hos= t.h index 9c971f846108..308f7020dc9d 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -2275,7 +2275,7 @@ static inline void kvm_load_ldt(u16 sel) } =20 #ifdef CONFIG_X86_64 -static inline unsigned long read_msr(unsigned long msr) +static inline unsigned long kvm_read_msr(unsigned long msr) { u64 value; =20 diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 63de5f6051e5..5a5f3c57363c 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -1335,8 +1335,8 @@ void vmx_prepare_switch_to_guest(struct kvm_vcpu *vcp= u) } else { savesegment(fs, fs_sel); savesegment(gs, gs_sel); - fs_base =3D read_msr(MSR_FS_BASE); - vmx->msr_host_kernel_gs_base =3D read_msr(MSR_KERNEL_GS_BASE); + fs_base =3D kvm_read_msr(MSR_FS_BASE); + vmx->msr_host_kernel_gs_base =3D kvm_read_msr(MSR_KERNEL_GS_BASE); } =20 wrmsrq(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base); --=20 2.43.0