From nobody Sat Nov 30 01:38:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1620297811; cv=none; d=zohomail.com; s=zohoarc; b=m+UXNxuolFVZP4wFzKkr5ZulgVEttYSHksOD+SS9FcqmrtAZI1tCNftaBlyedhQSHFQc9fyAwm6z1Yn3eYH5QyEU9bHFO9AU+SmrP7OF+2xARjQjyCU8dXA1pOG7dN3ophV3I13nFNjr5NnXXbT1uQn82mp4OfrYsNytfv1y1jQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620297811; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=hsYrq9gCUN9/sBh5lySpQIJ5bBTu7DfTjVtwFhrf7bg=; b=a0sgUCM/OaJ83/GmBzJHvycdz+giLHv4oKdHakSGUoQ8It+ETuum9OrvldwW+K1Z1/bAKXw1Cb9nTpjI85Mo+0h9VZFE9O928DSXEoytno26dcrahyf5vcJoT7Y0K/IcucfZik7fo8DuR6C4CYEYuYVK9dMb5ckvSIDAodpozAQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1620297811849113.79972968483719; Thu, 6 May 2021 03:43:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.123419.232780 (Exim 4.92) (envelope-from ) id 1lebTO-0004ty-Jg; Thu, 06 May 2021 10:43:14 +0000 Received: by outflank-mailman (output) from mailman id 123419.232780; Thu, 06 May 2021 10:43:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lebTO-0004tr-F9; Thu, 06 May 2021 10:43:14 +0000 Received: by outflank-mailman (input) for mailman id 123419; Thu, 06 May 2021 10:43:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lebTN-0004cw-4B for xen-devel@lists.xenproject.org; Thu, 06 May 2021 10:43:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lebTJ-000652-Nr; Thu, 06 May 2021 10:43:09 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ufe34d9ed68d054.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lebTJ-0002l1-FD; Thu, 06 May 2021 10:43:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=hsYrq9gCUN9/sBh5lySpQIJ5bBTu7DfTjVtwFhrf7bg=; b=Er2XOMbbw53B75nvXe24LJmNA 4oPwroYgwxIuo3/s0++bOaDipB64gygv+vcIWw4ejGrRJF3qMHXEFmYy4fnMzPiUTwVVE5cCMtLZJ iQv5SqfTjvWgp4bE0KpgSLU27aPW8olHvhEyOi4zGl4xQV8My3B4g1mIuw+cssUw7DSKU=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: dwmw2@infradead.org, paul@xen.org, hongyxia@amazon.com, raphning@amazon.com, maghul@amazon.com, Julien Grall , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH RFC 2/2] xen/kexec: Reserve KEXEC_TYPE_LIVEUPDATE and KEXEC_RANGE_MA_LIVEUPDATE Date: Thu, 6 May 2021 11:42:59 +0100 Message-Id: <20210506104259.16928-3-julien@xen.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210506104259.16928-1-julien@xen.org> References: <20210506104259.16928-1-julien@xen.org> X-ZohoMail-DKIM: pass (identity @xen.org) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Julien Grall Unfortunately, the code to support Live Update has already been merged in Kexec and shipped since 2.0.21. Reserve the IDs used by Kexec before they end up to be re-used for a different purpose. This patch reserves two IDs: * KEXEC_TYPE_LIVEUPDATE: New operation to request Live Update * KEXEC_MA_RANGE_LIVEUPDATE: New range to query the Live Update area below Xen Signed-off-by: Julien Grall Reviewed-by: Hongyan Xia Reviewed-by: Paul Durrant --- xen/include/public/kexec.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xen/include/public/kexec.h b/xen/include/public/kexec.h index 3f2a118381ba..650d2feb036f 100644 --- a/xen/include/public/kexec.h +++ b/xen/include/public/kexec.h @@ -71,17 +71,22 @@ */ =20 /* - * Kexec supports two types of operation: + * Kexec supports three types of operation: * - kexec into a regular kernel, very similar to a standard reboot * - KEXEC_TYPE_DEFAULT is used to specify this type * - kexec into a special "crash kernel", aka kexec-on-panic * - KEXEC_TYPE_CRASH is used to specify this type * - parts of our system may be broken at kexec-on-panic time * - the code should be kept as simple and self-contained as possible + * - Live update into a new Xen, preserving all running domains + * - KEXEC_TYPE_LIVE_UPDATE is used to specify this type + * - Xen performs non-cooperative live migration and stores live + * update state in memory, passing it to the new Xen. */ =20 -#define KEXEC_TYPE_DEFAULT 0 -#define KEXEC_TYPE_CRASH 1 +#define KEXEC_TYPE_DEFAULT 0 +#define KEXEC_TYPE_CRASH 1 +#define KEXEC_TYPE_LIVEUPDATE 2 =20 =20 /* The kexec implementation for Xen allows the user to load two @@ -150,6 +155,8 @@ typedef struct xen_kexec_load_v1 { #define KEXEC_RANGE_MA_EFI_MEMMAP 5 /* machine address and size of * of the EFI Memory Map */ #define KEXEC_RANGE_MA_VMCOREINFO 6 /* machine address and size of vmcorei= nfo */ +/* machine address and size of the Live Update area below Xen */ +#define KEXEC_RANGE_MA_LIVEUPDATE 7 =20 /* * Find the address and size of certain memory areas --=20 2.17.1