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 D6A88314A62 for ; Wed, 18 Feb 2026 08:21:48 +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=1771402910; cv=none; b=Azs+MBeFyQsM29rvGlnisJqdz4bOs8XIQkXNSBZae689eWwGtxnxRj01tjNwpJSgSCcmrYX9fSdUjvkT5mBtAmP2iX7JoJN5Xx7UQndA+ZulEwLrXVPEe9TYaEQKf0sV4uUL+g2QgYNvCPnthe1qRNDHSkEonEH92oj3+S/DTgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771402910; c=relaxed/simple; bh=jRfDVvtqJRuhkX75Z2GAn0Ti70bQQUP9txusTHgieIg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kUGHMsrtshlXEv+P7/+wnBoWeUrn2M516rp6c0prhnUkdHjNDgW4SlugPGMlWTZprqTAVMs1kGatxlELiLcfwF4Xj/QvFHFx5HmIz+m9VAJYzcdEuk6hMtA1ORhpm8959kmVlOnC3XwgZdEUuBAhpySzVCiGL2wornUPBrGltRE= 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 756EF3E6E9; Wed, 18 Feb 2026 08:21:47 +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 251323EA65; Wed, 18 Feb 2026 08:21:47 +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 3y3mB5t2lWnxHQAAD6G6ig (envelope-from ); Wed, 18 Feb 2026 08:21:47 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Kiryl Shutsemau , Rick Edgecombe Subject: [PATCH v3 02/16] coco/tdx: Rename MSR access helpers Date: Wed, 18 Feb 2026 09:21:19 +0100 Message-ID: <20260218082133.400602-3-jgross@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260218082133.400602-1-jgross@suse.com> References: <20260218082133.400602-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev 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: 756EF3E6E9 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Spam-Score: -4.00 X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org In order to avoid a name clash with some general MSR access helpers after a future MSR infrastructure rework, rename the TDX specific helpers. Signed-off-by: Juergen Gross Reviewed-by: Kiryl Shutsemau Reviewed-by: H. Peter Anvin (Intel) --- arch/x86/coco/tdx/tdx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/coco/tdx/tdx.c b/arch/x86/coco/tdx/tdx.c index 7b2833705d47..500166c1a161 100644 --- a/arch/x86/coco/tdx/tdx.c +++ b/arch/x86/coco/tdx/tdx.c @@ -468,7 +468,7 @@ static void __cpuidle tdx_safe_halt(void) raw_local_irq_enable(); } -static int read_msr(struct pt_regs *regs, struct ve_info *ve) +static int tdx_read_msr(struct pt_regs *regs, struct ve_info *ve) { struct tdx_module_args args = { .r10 = TDX_HYPERCALL_STANDARD, @@ -489,7 +489,7 @@ static int read_msr(struct pt_regs *regs, struct ve_info *ve) return ve_instr_len(ve); } -static int write_msr(struct pt_regs *regs, struct ve_info *ve) +static int tdx_write_msr(struct pt_regs *regs, struct ve_info *ve) { struct tdx_module_args args = { .r10 = TDX_HYPERCALL_STANDARD, @@ -842,9 +842,9 @@ static int virt_exception_kernel(struct pt_regs *regs, struct ve_info *ve) case EXIT_REASON_HLT: return handle_halt(ve); case EXIT_REASON_MSR_READ: - return read_msr(regs, ve); + return tdx_read_msr(regs, ve); case EXIT_REASON_MSR_WRITE: - return write_msr(regs, ve); + return tdx_write_msr(regs, ve); case EXIT_REASON_CPUID: return handle_cpuid(regs, ve); case EXIT_REASON_EPT_VIOLATION: -- 2.53.0