Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp337835lqb; Tue, 4 Jun 2024 12:59:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3i+2ZzIt1sz3VTiztDlKPNwlR20KEcMh6v/smVPsMVeD0vYM0aI3EWeL+hbyQ49x6PtT0HvyA/Ld2/6klclLRxV2HFvWXsnsHEXk/LQ== X-Google-Smtp-Source: AGHT+IF6pjJrzArgOSwBym4AMiSIH3l3DIl/A4ogGPEfgVitYW87ew5GywKq5d9YuZYRkno9d9UB X-Received: by 2002:a50:aac4:0:b0:57a:2417:5ef4 with SMTP id 4fb4d7f45d1cf-57a8b6aa068mr371884a12.17.1717531174437; Tue, 04 Jun 2024 12:59:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717531174; cv=pass; d=google.com; s=arc-20160816; b=T7DVbi08JA4+HRmklI7UftF+txw3ZsaLxSsMJQpagJoWwFGX9PD/BCBuF4BX02iidp XfFXtR8QarXhuElG3ytpwGjWw5b1o5S8N5//2eZM/bIedUNu3lSlnwzXJn2qSxzWZ7CC Lfzfqs9+ibaHLSn6maorxgNEdbkqshtDZWKUncmTbYTZ3qjXQnUeas2MIiAAXSNVgzGj ljNMu/W6ih2aFqsVTaaEs1q+cIZsRG1jN90oDOkE/o6z6LGcv0TaCY9l8xNUUOlT7FL8 /M3Jv+jLfsr0bVFRZQ+EPm+wbH49iTiZ+7gJHZQ+8Sb9VZXnhf8Ei6vW+qED+pXuFB5S rJOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=meD4s6dVpg1nQpqSre8C60bQ01ZH/XJnfd9FCOCO680=; fh=x4JEXdITJ03f7fvdFTw1BV69Q5AynuprZNh65fG5IYU=; b=xpVbG2+MmtQrL5WL/9Fm3Z/x5f5ndGd2gDDbz3Zpbm4PyZ+DAdXYFMR7XhqIeUvxMs nomyyuJ2XlVb6rB7AEYgQFyNMoJb14CsW0YJ3UEV5zp0IxabF+23Vd9a9NIOQ9t2T78W 207vnv17LBMT21T29sZu4zOQIWXLn2+1n5+f/8UcsBE1okB2201Sxz8iY1LDvSJ8qWxW zG1xJBsHCtyaLfurkSgq2+5N9xztFNyPQMsMoo2+UyOviVaMMIRiBQSFMDZSc+HMhdl2 fq1DimO2Syem0x2YaM7EvqC14KjdmLCri14LGIJT6GbeVgQyqKcIbvm4j2Pbhbz5U8EC gsZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UylMGIDg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4715-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4715-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31b80387si5363598a12.134.2024.06.04.12.59.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4715-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UylMGIDg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4715-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4715-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2F1941F21A7D for ; Tue, 4 Jun 2024 19:59:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6A6D146D78; Tue, 4 Jun 2024 19:59:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UylMGIDg" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5701D13D24F; Tue, 4 Jun 2024 19:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717531167; cv=none; b=mZDvZmJGvgufcdIAKb8kP4H4jYsClJr60OPmvwpIXomLx9ubRicPfmSwdrK6BZj2hQu7qsCyTLNJw0wpQXVJAL15OQ1AQTvKI2bKrgxT7OeGMRYL2/FCmLriTSGEayQocGdcJl+5B8Uf/a7nu/24PTWvP3vDurM+DiDVpHDIkiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717531167; c=relaxed/simple; bh=adyoGD8HAr9AhEMKf45Q/gY8eQHlMUzh9eGEMTWGPQM=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=TQITkgYyldEcRQ9eoEfOD/0l8CkKFfmMTy554v6OihXaJxuE7ZBgqP0HxxLYXB24MtqxAcWPduYsmQOaW/8mX0liP3sHXAVyqFf5BwTZae9BV2G9TdF9oeZF7SIWUvPc35kSfKf5Sx5sa6rO/FZ+A+G/ys2d//fZoNELPOE/utU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UylMGIDg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0531C2BBFC; Tue, 4 Jun 2024 19:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717531165; bh=adyoGD8HAr9AhEMKf45Q/gY8eQHlMUzh9eGEMTWGPQM=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=UylMGIDgJLWEehf+t7DF8NuRbR6al89Udi4ScfRrcCa2QN0ZXVNFmTkSK5wTztvr2 NPOlR+8M00XKQtNcDmaiJr3i5nPOmYl2mBjyjqEcAvCPE8TPr/otpaL1Lo0gcC9PX3 w5KXCw87V8jzkSqye0G1at/h5bm7RzEp5q8fAQgH9bbswEZsL3S4VO0uRf8TsUl+28 hoDj1ploWFj8pNatF0LpslXrlmLpObjIYjD06OhdTVooXTSo858Cwt4oD09HY7BxqJ oRYksTt5fFT/JzwCbV3gvkvT5cGMS6Lx53wXep24/DEJRVdyxUHYkg2371SpV9TdbD zD9HDl21l34aQ== Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 04 Jun 2024 22:59:18 +0300 Message-Id: Cc: , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v9 09/19] x86: Secure Launch kernel late boot stub From: "Jarkko Sakkinen" To: "Ross Philipson" , , , , , , , , X-Mailer: aerc 0.17.0 References: <20240531010331.134441-1-ross.philipson@oracle.com> <20240531010331.134441-10-ross.philipson@oracle.com> In-Reply-To: <20240531010331.134441-10-ross.philipson@oracle.com> On Fri May 31, 2024 at 4:03 AM EEST, Ross Philipson wrote: > The routine slaunch_setup is called out of the x86 specific setup_arch() > routine during early kernel boot. After determining what platform is > present, various operations specific to that platform occur. This > includes finalizing setting for the platform late launch and verifying > that memory protections are in place. > > For TXT, this code also reserves the original compressed kernel setup > area where the APs were left looping so that this memory cannot be used. > > Signed-off-by: Ross Philipson > --- > arch/x86/kernel/Makefile | 1 + > arch/x86/kernel/setup.c | 3 + > arch/x86/kernel/slaunch.c | 525 +++++++++++++++++++++++++++++++++++++ > drivers/iommu/intel/dmar.c | 4 + > 4 files changed, 533 insertions(+) > create mode 100644 arch/x86/kernel/slaunch.c > > diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile > index 5d128167e2e2..b35ca99ab0a0 100644 > --- a/arch/x86/kernel/Makefile > +++ b/arch/x86/kernel/Makefile > @@ -76,6 +76,7 @@ obj-$(CONFIG_X86_32) +=3D tls.o > obj-$(CONFIG_IA32_EMULATION) +=3D tls.o > obj-y +=3D step.o > obj-$(CONFIG_INTEL_TXT) +=3D tboot.o > +obj-$(CONFIG_SECURE_LAUNCH) +=3D slaunch.o Hmm... should that be CONFIG_X86_SECURE_LAUNCH? Just asking... BR, Jarkko