From nobody Thu Dec 18 05:24:32 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 5F71D2BCF4A for ; Tue, 30 Sep 2025 07:04:12 +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=1759215855; cv=none; b=APjilmrcRz6/mY7NaK2DO7Z5U4QKvPI6NsyjY4PA112OvQ3kEaxPEOlWZcvvgNrtyFBBd699Pxf38tfeD8Sr2TxCnCMrcSD0vRi65PpVT7eg1QMkU+k2azbCg2XTOU8HEpIHfTtgMNoW6PWEu4AEpPvhwmNlWxWg8qufW1s1VgM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759215855; c=relaxed/simple; bh=wkhZAHsBoKKngbAAqQTVMDLeDlcckAP1gUo2JTFae0M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hMFkGs/JN4v8UcWXG22avuJqChyNjtr6zE25GZsOpOAEy8qSWFul8ZJsv10L0Zm5CLr56pcrris2hyMX7W0WInDUamvDB/prBxKPV0+YWFI2A2E7rTWmkUmW+f9R37AdzXmTdAr5vuT0Hoe6yAu5eSBZdqsmlpX1qOCtjW04cSw= 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; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=rQ0tmSjC; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=rQ0tmSjC; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="rQ0tmSjC"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="rQ0tmSjC" 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 72D4D3374B; Tue, 30 Sep 2025 07:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1759215846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NSf+6D4MbYL+XlpJyDDayy5soUcQQSx27jf/xJMjXUI=; b=rQ0tmSjCv0szHdlkeG8DWbThL3VPzsomAzP86KV/RmMPylBtOnVbuuGCOGXvwKLx+oVaa/ 9URzm6ibpBE9UhxTWC3zeOFVlUYSrpftVEfRfBbDi1ZTTXoEevhubUwff+kW+T+msk/IAQ 9miHnUPVRnET3ZgEclbXWGetuMcS1rQ= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=rQ0tmSjC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1759215846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NSf+6D4MbYL+XlpJyDDayy5soUcQQSx27jf/xJMjXUI=; b=rQ0tmSjCv0szHdlkeG8DWbThL3VPzsomAzP86KV/RmMPylBtOnVbuuGCOGXvwKLx+oVaa/ 9URzm6ibpBE9UhxTWC3zeOFVlUYSrpftVEfRfBbDi1ZTTXoEevhubUwff+kW+T+msk/IAQ 9miHnUPVRnET3ZgEclbXWGetuMcS1rQ= 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 0BE6013A3F; Tue, 30 Sep 2025 07:04:06 +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 YOwbAeaA22iARwAAD6G6ig (envelope-from ); Tue, 30 Sep 2025 07:04:06 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-coco@lists.linux.dev Cc: xin@zytor.com, Juergen Gross , "Kirill A. Shutemov" , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Subject: [PATCH v2 01/12] coco/tdx: Rename MSR access helpers Date: Tue, 30 Sep 2025 09:03:45 +0200 Message-ID: <20250930070356.30695-2-jgross@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250930070356.30695-1-jgross@suse.com> References: <20250930070356.30695-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-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_SEVEN(0.00)[11]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLkdkdrsxe9hqhhs5ask8616i6)]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.com:mid,suse.com:dkim,suse.com:email] X-Spam-Flag: NO X-Spam-Level: X-Rspamd-Queue-Id: 72D4D3374B X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 Content-Type: text/plain; charset="utf-8" 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 --- 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(); } =20 -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 =3D { .r10 =3D TDX_HYPERCALL_STANDARD, @@ -489,7 +489,7 @@ static int read_msr(struct pt_regs *regs, struct ve_inf= o *ve) return ve_instr_len(ve); } =20 -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 =3D { .r10 =3D 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: --=20 2.51.0