Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18879419rwd; Wed, 28 Jun 2023 01:49:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hiluVGK5V1PgXRshBVTOTAbCyJW/sBSBvOL1I3ZrfgtCOZXdFzHtiO1/dPgpJgEqaEPAV X-Received: by 2002:a17:907:94ce:b0:992:13c7:560 with SMTP id dn14-20020a17090794ce00b0099213c70560mr681034ejc.38.1687942185128; Wed, 28 Jun 2023 01:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687942185; cv=none; d=google.com; s=arc-20160816; b=qWq7DTQYifzQl5sqTF8Pi7U8cGXnUHKNzlUXzDRiJs4Q6i2VwkkEisDBz1f7U8rmsu OwHdeFcr1YdkyOHkH7qo/RIqey0V1oswPGheIpbCeVcKPlWTUTKtsnU0vffOCHo0Kozd wLOSyjROG6yZCI8RFu3aGviGSSJB1qrFfaF3Nh2Iw03ZH37Bm9Uh8Ho58zH2KAmnVD6m x3YUVyWCF5j3DsNz4hbfe9m8xeA4F+RF3Zo6OdjoorZmcf//eqSpCsbHvxcLqvtfTFB6 ST69mvqEoaYtmAxlMJF8ZHeDmJQSHAtdnGGxlHfNobgRnzVCKxjcZ/RfQEepsucOXlDn xGkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kiDK0UdZffC/bvnaVv9T0aPyF3Dh1P67HfCiGK/Z/as=; fh=PDuFY/VBhZ12nHL/ZLPYHMlVpuX1Ar62VQQKAQUn1c0=; b=LJBcTJbHYvBYFLoVKoHINAPAo/P9fiwPJKf0yLC9lOdupdYsw07knNXKHR+0w2HFZw fCiZR5/3J4U3AzIQVDN99jmOoXiRJPFr0Hqqm9L2mE4q25d2lR67TVAp+RoaEk8/JTyY AV+EJh6NwgiMfR9qrDMaz+6YV06oWkinl6BXvvIF8Y81gUvlEvH51HRKcMPU+JM9yZw6 JKOuAo8sfxRoOVv5nMgJ8mco4I3ga/lAILI62/HIE3TtAtAYKaGq/E7t2OGHDX/yPUMh Iv2Z0iNA4MTDYPlk5LBKk3UKj3i+NkZs7+BkcK5tMaUBylUF1peKwy0pKp/TfP9l0FlB lDYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ws+yuToO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170906b29100b009770c6abd0fsi5558296ejz.898.2023.06.28.01.49.20; Wed, 28 Jun 2023 01:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ws+yuToO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232361AbjF1IYV (ORCPT + 99 others); Wed, 28 Jun 2023 04:24:21 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:24222 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231911AbjF1IV2 (ORCPT ); Wed, 28 Jun 2023 04:21:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1687940488; x=1719476488; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=UMkXk+bPbzGfZkrBHrsW/8MysrRy74gOjizdruOTAJs=; b=ws+yuToO/QR5a9BxSMvZrJpj/+Ahn2JZotQ33ZP56QH75SWadrTw3wXb BX1fZyRswX1bZYoNSa5a2t5JoojzTzgsvYPFcWXGUZKIpcRb+IhvBxSNv qrwfocm11hAGXKNs8c8oGeGzKHjbNwGDAVQEdMHbq0uPAKCzFY42WHg6h BbPIUC3+5Inqtge+ZBDq9e1xWcZ9EXR947c9zgO+eVJfWgYjUbqQbehGL 9DaKyhdRjwz9VjOXnGA4fvGKaufyCJ18SwjUyVXqc96IVwl0uwCzReg3q noPZ0YbIxOi7A6Ptlra0h2l0CVsH0/oTIYciZOXHIAA1zgK8GwNjqX+/X Q==; X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="asc'?scan'208";a="220938489" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Jun 2023 01:21:26 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 28 Jun 2023 01:21:15 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Wed, 28 Jun 2023 01:21:04 -0700 Date: Wed, 28 Jun 2023 09:20:36 +0100 From: Conor Dooley To: Eric DeVolder CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v3 11/13] riscv/kexec: refactor for kernel/Kconfig.kexec Message-ID: <20230628-urologist-faction-42ebe5372206@wendy> References: <20230626161332.183214-1-eric.devolder@oracle.com> <20230626161332.183214-12-eric.devolder@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dNpbxT7522GzDtJd" Content-Disposition: inline In-Reply-To: <20230626161332.183214-12-eric.devolder@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --dNpbxT7522GzDtJd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Eric, On Mon, Jun 26, 2023 at 12:13:30PM -0400, Eric DeVolder wrote: > The kexec and crash kernel options are provided in the common > kernel/Kconfig.kexec. Utilize the common options and provide > the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the > equivalent set of KEXEC and CRASH options. I find this diff a little hard to follow (since the other half off the change is in another patch), so it may be me missing something, but are you sure? >=20 > Signed-off-by: Eric DeVolder > --- > arch/riscv/Kconfig | 48 ++++++++++++++-------------------------------- > 1 file changed, 14 insertions(+), 34 deletions(-) >=20 > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 5966ad97c30c..c484abd9bbfd 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -585,48 +585,28 @@ config RISCV_BOOT_SPINWAIT > =20 > If unsure what to do here, say N. > =20 > -config KEXEC > - bool "Kexec system call" > - depends on MMU > +config ARCH_SUPPORTS_KEXEC > + def_bool MMU > + > +config ARCH_SELECTS_KEXEC > + def_bool y > + depends on KEXEC > select HOTPLUG_CPU if SMP > - select KEXEC_CORE > - help > - kexec is a system call that implements the ability to shutdown your > - current kernel, and to start another kernel. It is like a reboot > - but it is independent of the system firmware. And like a reboot > - you can start any kernel with it, not just Linux. > =20 > - The name comes from the similarity to the exec system call. > +config ARCH_SUPPORTS_KEXEC_FILE > + def_bool 64BIT && MMU && CRYPTO=3Dy && CRYPTO_SHA256=3Dy This looks like a change to me. Previously, only KEXEC_PURGATORY required these crypto options to be like so, but now KEXEC_FILE needs them too. What am I missing? Cheers, Conor. > =20 > -config KEXEC_FILE > - bool "kexec file based systmem call" > - depends on 64BIT && MMU > - select HAVE_IMA_KEXEC if IMA > - select KEXEC_CORE > +config ARCH_SELECTS_KEXEC_FILE > + def_bool y > + depends on KEXEC_FILE > select KEXEC_ELF > - help > - This is new version of kexec system call. This system call is > - file based and takes file descriptors as system call argument > - for kernel and initramfs as opposed to list of segments as > - accepted by previous system call. > - > - If you don't know what to do here, say Y. > + select HAVE_IMA_KEXEC if IMA > =20 > config ARCH_HAS_KEXEC_PURGATORY > def_bool KEXEC_FILE > - depends on CRYPTO=3Dy > - depends on CRYPTO_SHA256=3Dy > =20 > -config CRASH_DUMP > - bool "Build kdump crash kernel" > - help > - Generate crash dump after being started by kexec. This should > - be normally only set in special crash dump kernels which are > - loaded in the main kernel with kexec-tools into a specially > - reserved region and then later executed after a crash by > - kdump/kexec. > - > - For more details see Documentation/admin-guide/kdump/kdump.rst > +config ARCH_SUPPORTS_CRASH_DUMP > + def_bool y > =20 > config COMPAT > bool "Kernel support for 32-bit U-mode" > --=20 > 2.31.1 > --dNpbxT7522GzDtJd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZJvtVAAKCRB4tDGHoIJi 0nmiAQDOO3BHXlme661CQ5d0WA+9UNnblFm/cWV3USIeSzvJAQD9Ev9vbdYVY6Uu ypalgd3Ta51Btqo6Gv+Pn5Xaf3a3lg4= =9sLY -----END PGP SIGNATURE----- --dNpbxT7522GzDtJd--