Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp442192rdb; Wed, 17 Jan 2024 06:49:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IESSXHw+LKeXVdwapLzgP6bbrJPdQOhptwbWx4yqBqrzDQ7pYevn0eyDpEBsTXRQA5G2fGz X-Received: by 2002:a17:906:2b97:b0:a27:fce0:e43c with SMTP id m23-20020a1709062b9700b00a27fce0e43cmr4136111ejg.74.1705502991487; Wed, 17 Jan 2024 06:49:51 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w26-20020a1709060a1a00b00a275b4b24dfsi5570831ejf.789.2024.01.17.06.49.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:49:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29099-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=XnDp3tPR; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-29099-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com 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 3CC061F25036 for ; Wed, 17 Jan 2024 14:49:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E32D421370; Wed, 17 Jan 2024 14:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="XnDp3tPR" Received: from smtp-fw-9106.amazon.com (smtp-fw-9106.amazon.com [207.171.188.206]) (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 A7406210FC; Wed, 17 Jan 2024 14:48:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=207.171.188.206 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705502911; cv=none; b=f+2SrKGD+nXCVU5rkkTJm+wQtcANsRgWCw6SqYUmtHhlwjfwEkuBCXIZSCUlevKCEOfkgM6MtWK3fTzJux+xtIdrJ+0vbp7UN4auvAYNuwA1RH59zWrSFFWvVzTnoqGOXH3s/2ijALdZOSSnzA16idYqerURffV5W2ktfz+w4s0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705502911; c=relaxed/simple; bh=u1I/yukv6pRKKPxwf8zp06f6VoKb5iMIpg1liIli3OE=; h=DKIM-Signature:X-IronPort-AV:Received:Received:Received: X-Farcaster-Flow-ID:Received:Received:From:To:CC:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: X-Originating-IP:X-ClientProxiedBy:Content-Type: Content-Transfer-Encoding; b=iP1iyrzTNSqVaxBhMJ6e/itsM3DEDna4WrhHHxaiVIYnkW1ONTyA18UaE4qXZz2rpVu97WzMnpvhEBgn6I4YMT6//3Q99rKEagj/4G7mHuNplQIP4vKT0rcS03LEft0hGKgoSW4Y02pjOItET9efjjDumvpPNFN1MgC6jMHUutI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.de; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b=XnDp3tPR; arc=none smtp.client-ip=207.171.188.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1705502910; x=1737038910; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d6zY75UaUomPQ5EhDGeFWm39K87gMNJwzqvhZ/SkIvI=; b=XnDp3tPROQ7tYjF5KmNjsYRirJWudKPMy2k081bQOlH4wd5r5I8FMDhT IK1YrHd4fU/6oGcpBOWF3ZducRORsUKXb2JE5IN1tuNWC9emuQiOUoUBJ muUXDmpnr5E4wTXoI0gyUhiGJiHsky9fR2/tc66lKBoDsepi4K58Hxz9/ U=; X-IronPort-AV: E=Sophos;i="6.05,200,1701129600"; d="scan'208";a="697788568" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1a-m6i4x-366646a6.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-9106.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2024 14:48:22 +0000 Received: from smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev (iad7-ws-svc-p70-lb3-vlan2.iad.amazon.com [10.32.235.34]) by email-inbound-relay-iad-1a-m6i4x-366646a6.us-east-1.amazon.com (Postfix) with ESMTPS id 37BC9A0A9E; Wed, 17 Jan 2024 14:48:18 +0000 (UTC) Received: from EX19MTAUWA002.ant.amazon.com [10.0.21.151:26746] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.60.181:2525] with esmtp (Farcaster) id c922b8c6-218f-4e2e-bfa4-5cd050b28dc6; Wed, 17 Jan 2024 14:48:17 +0000 (UTC) X-Farcaster-Flow-ID: c922b8c6-218f-4e2e-bfa4-5cd050b28dc6 Received: from EX19D020UWC004.ant.amazon.com (10.13.138.149) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 17 Jan 2024 14:48:17 +0000 Received: from dev-dsk-graf-1a-5ce218e4.eu-west-1.amazon.com (10.253.83.51) by EX19D020UWC004.ant.amazon.com (10.13.138.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 17 Jan 2024 14:48:13 +0000 From: Alexander Graf To: CC: , , , , , , , Eric Biederman , "H . Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Steven Rostedt , Andrew Morton , Mark Rutland , "Tom Lendacky" , Ashish Kalra , James Gowans , Stanislav Kinsburskii , , , , Anthony Yznaga , Usama Arif , David Woodhouse , Benjamin Herrenschmidt , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v3 06/17] kexec: Add config option for KHO Date: Wed, 17 Jan 2024 14:46:53 +0000 Message-ID: <20240117144704.602-7-graf@amazon.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240117144704.602-1-graf@amazon.com> References: <20240117144704.602-1-graf@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: EX19D040UWA004.ant.amazon.com (10.13.139.93) To EX19D020UWC004.ant.amazon.com (10.13.138.149) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We have all generic code in place now to support Kexec with KHO. This patch adds a config option that depends on architecture support to enable KHO support. Signed-off-by: Alexander Graf --- kernel/Kconfig.kexec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec index 946dffa048b7..6fb5a6ae9697 100644 --- a/kernel/Kconfig.kexec +++ b/kernel/Kconfig.kexec @@ -93,6 +93,19 @@ config KEXEC_JUMP Jump between original kernel and kexeced kernel and invoke code in physical address mode via KEXEC +config KEXEC_KHO + bool "kexec handover" + depends on ARCH_SUPPORTS_KEXEC_KHO + depends on KEXEC + select MEMBLOCK_SCRATCH + select LIBFDT + select CMA + help + Allow kexec to hand over state across kernels by generating and + passing additional metadata to the target kernel. This is useful + to keep data or state alive across the kexec. For this to work, + both source and target kernels need to have this option enabled. + config CRASH_DUMP bool "kernel crash dumps" depends on ARCH_SUPPORTS_CRASH_DUMP -- 2.40.1 Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879