Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1019586rdb; Fri, 22 Dec 2023 11:52:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8RFmHP8Wyq6uRLqkPjt1IG0hNmuazM1DmisYDzrLW50QobFI1lngCFqhnLF3bqdj5NhL0 X-Received: by 2002:a05:600c:3f85:b0:40b:5e59:e9e8 with SMTP id fs5-20020a05600c3f8500b0040b5e59e9e8mr955029wmb.135.1703274730949; Fri, 22 Dec 2023 11:52:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703274730; cv=none; d=google.com; s=arc-20160816; b=I5gWukhIYQrquWHxuyLgh6mAuQ9ekip2uxdGWl1wtPa1m7TVs2+GL2kVRTmmMLUUhp qllVqrzCtdU+3PuWiaE00QQekC65rKSDi8Eid5hFGeCjSMTjc7fWZ97tWGbbN+Ww6HNm s0s5VQCZ01brPUxCa03ufq7mQwsI1mI/qHo1odrmkm0NRdvmDd3RSxh+SqsHKkYhX6Rm TO58u2QSMTUp1+EScof99ybpFIGRo10Zokr0hsKuqnqwJvjk16T7Fo1QWYeiLVezq66R lSp1xH48cCwUI1gwgvdGc5kn8FrmhCetaDJBjOKS5drVX3hHbzQ63MtxooJyUG0yuUWS njIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZLYCMQzZdYknax/wRIALOVvHrvD35sO3OPXkV3K/85M=; fh=xprWcyUKTLi4rhte7gFCvduD673j12awuFkCPnYDQVY=; b=t+b5LFgSwOqKWw3MYNRkPkbShiBst3BKAL0yGOSfnWpHMVzUhAsu3a263D6Rcp416q 2Ajfq91tv18rpQ8F/1kD2Kde743VnY2yLXaxtoBmY6Y0fLmLgY53EeE5Lxq1i8HVpe3e 0/2b13FSsKE6mZOgJR+XeKeHAJhljIwGRY0bvSNOTu5chgIiRtl+IQMT/hiQqVWzNyCV yhQrgobM56aHswn5HRpj0j7bT8wFerQdyYwFmqlvHOj+jQauO/XFNp+S9HfycolI0Pej ey46LS3xLfutr1cp0Cr1Iw9ptF6TwUMY7Z/Pv/H90JtbgakvoVt6aOxBh4okl/wOMBJO F3hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=AL5kpyVb; spf=pass (google.com: domain of linux-kernel+bounces-10031-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10031-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lc15-20020a170906f90f00b00a22f151b92esi2075578ejb.572.2023.12.22.11.52.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 11:52:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10031-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=@amazon.com header.s=amazon201209 header.b=AL5kpyVb; spf=pass (google.com: domain of linux-kernel+bounces-10031-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10031-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 B23081F2399B for ; Fri, 22 Dec 2023 19:52:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F52B2E82A; Fri, 22 Dec 2023 19:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="AL5kpyVb" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-fw-52002.amazon.com (smtp-fw-52002.amazon.com [52.119.213.150]) (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 62B682E648; Fri, 22 Dec 2023 19:52:00 +0000 (UTC) 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=1703274720; x=1734810720; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZLYCMQzZdYknax/wRIALOVvHrvD35sO3OPXkV3K/85M=; b=AL5kpyVbfyvXZ4CECGLaj6aKglqjzdfZwpzBhe5J/mDHeod2xe0tX0Zb nahDch964bPMRQYJE/ePCiy9oC+whH0Mc4gY5Sakhwwfayed+iYq3Rzni BlSfg+3dlXUAzWI/H024/IFcJR9rxu6T10Jq6msu5i1X7Y6DCMadu6ocS I=; X-IronPort-AV: E=Sophos;i="6.04,297,1695686400"; d="scan'208";a="602627198" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1d-m6i4x-d8e96288.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-52002.iad7.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:51:58 +0000 Received: from smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev (iad7-ws-svc-p70-lb3-vlan3.iad.amazon.com [10.32.235.38]) by email-inbound-relay-iad-1d-m6i4x-d8e96288.us-east-1.amazon.com (Postfix) with ESMTPS id 5710B803B7; Fri, 22 Dec 2023 19:51:51 +0000 (UTC) Received: from EX19MTAUWC002.ant.amazon.com [10.0.7.35:35926] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.56.23:2525] with esmtp (Farcaster) id 82a6dd69-7016-4d64-b557-324d614fe9ef; Fri, 22 Dec 2023 19:51:50 +0000 (UTC) X-Farcaster-Flow-ID: 82a6dd69-7016-4d64-b557-324d614fe9ef Received: from EX19D020UWC004.ant.amazon.com (10.13.138.149) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 22 Dec 2023 19:51:49 +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; Fri, 22 Dec 2023 19:51:45 +0000 From: Alexander Graf To: CC: , , , , , , , Eric Biederman , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , "Rob Herring" , Steven Rostedt , "Andrew Morton" , Mark Rutland , "Tom Lendacky" , Ashish Kalra , James Gowans , Stanislav Kinsburskii , , , , Anthony Yznaga , Usama Arif , David Woodhouse , Benjamin Herrenschmidt Subject: [PATCH v2 06/17] kexec: Add config option for KHO Date: Fri, 22 Dec 2023 19:51:33 +0000 Message-ID: <20231222195144.24532-1-graf@amazon.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231222193607.15474-1-graf@amazon.com> References: <20231222193607.15474-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: EX19D032UWA002.ant.amazon.com (10.13.139.81) 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 2fd510256604..909ab28f1341 100644 --- a/kernel/Kconfig.kexec +++ b/kernel/Kconfig.kexec @@ -91,6 +91,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