From nobody Sun Jul 26 01:48:32 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 177503D1AA0; Fri, 10 Jul 2026 09:24:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783675489; cv=none; b=RF5HefAZd0GVRXaYD1QFyUdCVHbjpan3YZzc4s68vXf6vUWWdBMikV5XP5TdaWTllQ7ocIOKsgQUf7ewhlu3vGpXYaQPYw5uul/8wRSyX5fIX+RYl9Gtne98xUQf/XOWUpIKrcwv8AV8EXkOYAo7KbCYKWukQ2IhIcZQfrjINio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783675489; c=relaxed/simple; bh=OQWbffgivYY4Rurk7C4L3+iaGIdD+yE2tnjn9usf1XY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=aV3qwaxdSVT3Wqz/aKVa04RDrqgQZt/bn0EELMIm3lESz/gokIL0HcmPHNP/2ozXVQqwrddqCYmZUiurf9G2y9CNcw2vBk8w3cImUb51ZEJ7GlDbkbVZEIGJj2S+K2YWcNGa8g7z34zUAts/LnWW4Z3bI1RxeCUHT8zqVj/TrNs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Qw7YKUar; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=r1uGtI2+; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Qw7YKUar"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="r1uGtI2+" Date: Fri, 10 Jul 2026 09:24:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783675485; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TcNNU0AaUB9XpxBnMP3SSFTFN8ADWW9P5E578nDGSAE=; b=Qw7YKUar29VvhZtnZ3cypSisNPs5D4xD90y59iodUztMW1VK/APJH+AtW7mVNbTpGsSQeB 8dYQRhCSibDMLnIsniB6aw3OEByfPUwa8ZrChdy61gUTLQZErJBX0JOMP42lV9sV0UO18Y VADy3764tCE3FVYjJtzlk68cM7s04yBw6+30lhhuwHm1I+p3C0PUNofJpJb1U7Ty8GbOt2 KL0tjLj4WkHWCi0MoDBH4rs51Yl9eelgwkf/3lQ3M+4OKUmVdW4nQ1YwvkO/rmhM0cNR6n EsqlSRrRvhLXrhN2n271v1p9QKSY58F66FZwDmSFk2eRcWj0Qnuucu0y8Rg5+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783675485; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TcNNU0AaUB9XpxBnMP3SSFTFN8ADWW9P5E578nDGSAE=; b=r1uGtI2+pjtVa3YrBcCt5ylb3+0axXmTnqiymhBZdW2f9XMjEfrrjGcm0z9bYFIQVp0Wn6 gAfKB7vxP1OYvcBQ== From: "tip-bot2 for Borislav Petkov (AMD)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/boot/compressed/head_64.S: Clean up SEV-related comments Cc: "Borislav Petkov (AMD)" , Ingo Molnar , Tom Lendacky , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260620043757.347076-1-bp@kernel.org> References: <20260620043757.347076-1-bp@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178367548402.744054.12251299239780543879.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 7bdcb5b3a9c5ea63aaea75adfc1ffd30dee969f0 Gitweb: https://git.kernel.org/tip/7bdcb5b3a9c5ea63aaea75adfc1ffd30d= ee969f0 Author: Borislav Petkov (AMD) AuthorDate: Fri, 19 Jun 2026 21:37:57 -07:00 Committer: Ingo Molnar CommitterDate: Fri, 10 Jul 2026 11:21:51 +02:00 x86/boot/compressed/head_64.S: Clean up SEV-related comments Move the comment about setting the encryption mask above the line which does that and, especially, inside the ifdeffery, where it belongs. Move comments on top of the code lines they refer to and not on the side, which impairs readability. No functional changes. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Reviewed-by: Tom Lendacky Link: https://patch.msgid.link/20260620043757.347076-1-bp@kernel.org --- arch/x86/boot/compressed/head_64.S | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/= head_64.S index d9dab94..1aca513 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -172,19 +172,23 @@ SYM_FUNC_START(startup_32) /* * Build early 4G boot pagetable */ - /* - * If SEV is active then set the encryption mask in the page tables. - * This will ensure that when the kernel is copied and decompressed - * it will be done so encrypted. - */ xorl %edx, %edx #ifdef CONFIG_AMD_MEM_ENCRYPT call get_sev_encryption_bit xorl %edx, %edx testl %eax, %eax jz 1f - subl $32, %eax /* Encryption bit is always above bit 31 */ - bts %eax, %edx /* Set encryption mask for page tables */ + + /* Encryption bit is always above bit 31 */ + subl $32, %eax + + /* + * If SEV is active then set the encryption mask in the page tables. + * This will ensure that when the kernel is copied and decompressed it + * will be done so encrypted. + */ + bts %eax, %edx + /* * Set MSR_AMD64_SEV_ENABLED_BIT in sev_status so that * startup32_check_sev_cbit() will do a check. sev_enable() will