diff -Nur kexec-tools/kexec-Quick-kexec-implementation-for-x86.patch obs_kexec-tools/kexec-Quick-kexec-implementation-for-x86.patch
--- kexec-tools/kexec-Quick-kexec-implementation-for-x86.patch	1970-01-01 08:00:00.000000000 +0800
+++ obs_kexec-tools/kexec-Quick-kexec-implementation-for-x86.patch	2022-10-14 14:44:53.000000000 +0800
@@ -0,0 +1,106 @@
+From aca89e2674901b20f20d9c6f828b3a95fd090a72 Mon Sep 17 00:00:00 2001
+From: Jingxian He <hejingxian@huawei.com>
+Date: Sat, 20 Feb 2021 03:34:14 +0000
+Subject: [PATCH 1/1] x86: add support for quick kexec
+
+Supply new command options for kexec tools:
+1) Add '-q, --load-quick' for quick upgrade kernel;
+
+Signed-off-by: Jingxian He <hejingxian@huawei.com>
+Signed-off-by: fu.lin <fulin10@huawei.com>
+---
+ kexec/arch/i386/kexec-x86-common.c | 13 ++++++++++++-
+ kexec/arch/i386/x86-linux-setup.c  |  4 ++--
+ kexec/kexec.c                      |  4 +---
+ kexec/kexec.h                      |  1 -
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
+index 61ea193..877e9e5 100644
+--- a/kexec/arch/i386/kexec-x86-common.c
++++ b/kexec/arch/i386/kexec-x86-common.c
+@@ -48,6 +48,10 @@
+ #define E820_PRAM         12
+ #endif
+ 
++#define QUICK_KEXEC	"Quick kexec\n"
++
++struct memory_range quick_reserved_mem;
++
+ static struct memory_range memory_range[MAX_MEMORY_RANGES];
+ 
+ /**
+@@ -386,8 +390,15 @@ int get_memory_ranges(struct memory_range **range, int *ranges,
+ 			mem_min = start;
+ 		if (end < mem_max)
+ 			mem_max = end;
++	} else if (kexec_flags & KEXEC_QUICK) {
++		parse_iomem_single(QUICK_KEXEC,
++			(uint64_t *)&quick_reserved_mem.start,
++			(uint64_t *)&quick_reserved_mem.end);
++		if (quick_reserved_mem.start > mem_min)
++			mem_min = quick_reserved_mem.start;
++		if (quick_reserved_mem.end < mem_max)
++			mem_max = quick_reserved_mem.end;
+ 	}
+-
+ 	dbgprint_mem_range("MEMORY RANGES", *range, *ranges);
+ 
+ 	return ret;
+diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
+index 057ee14..fb0c598 100644
+--- a/kexec/arch/i386/x86-linux-setup.c
++++ b/kexec/arch/i386/x86-linux-setup.c
+@@ -78,8 +78,8 @@ void setup_linux_bootloader_parameters_high(
+ 	/* Load the initrd if we have one */
+ 	if (initrd_buf) {
+ 		initrd_base = add_buffer(info,
+-			initrd_buf, initrd_size, initrd_size,
+-			4096, INITRD_BASE, initrd_addr_max, -1);
++				initrd_buf, initrd_size, initrd_size,
++				4096, INITRD_BASE, initrd_addr_max, -1);
+ 		dbgprintf("Loaded initrd at 0x%lx size 0x%lx\n", initrd_base,
+ 			initrd_size);
+ 	} else {
+diff --git a/kexec/kexec.c b/kexec/kexec.c
+index 48825af..37db64d 100644
+--- a/kexec/kexec.c
++++ b/kexec/kexec.c
+@@ -997,7 +997,7 @@ void usage(void)
+ 	       " -l, --load           Load the new kernel into the\n"
+ 	       "                      current kernel.\n"
+ 	       " -p, --load-panic     Load the new kernel for use on panic.\n"
+-	       " -q, --load-quick     Load the new kernel to quick kexec\n"
++	       " -q, --load-quick     Load the new kernel to quick kexec.\n"
+ 	       " -u, --unload         Unload the current kexec target kernel.\n"
+ 	       "                      If capture kernel is being unloaded\n"
+ 	       "                      specify -p with -u.\n"
+@@ -1269,7 +1269,6 @@ int main(int argc, char *argv[])
+ {
+ 	int do_load = 1;
+ 	int do_exec = 0;
+-	int do_quick = 0;
+ 	int do_load_jump_back_helper = 0;
+ 	int do_shutdown = 1;
+ 	int do_sync = 1, skip_sync = 0;
+@@ -1383,7 +1382,6 @@ int main(int argc, char *argv[])
+ 			do_load = 1;
+ 			do_exec = 0;
+ 			do_shutdown = 0;
+-			do_quick = 1;
+ 			kexec_flags = KEXEC_QUICK;
+ 			skip_checks = 1;
+ 			break;
+diff --git a/kexec/kexec.h b/kexec/kexec.h
+index e31e4d2..c7c16a4 100644
+--- a/kexec/kexec.h
++++ b/kexec/kexec.h
+@@ -328,5 +328,4 @@ void xen_kexec_exec(void);
+ int xen_kexec_status(uint64_t kexec_flags);
+ 
+ extern unsigned long long get_kernel_sym(const char *text);
+-
+ #endif /* KEXEC_H */
+-- 
+2.27.0
+
diff -Nur kexec-tools/kexec-tools.spec obs_kexec-tools/kexec-tools.spec
--- kexec-tools/kexec-tools.spec	2022-11-02 15:29:16.226306211 +0800
+++ obs_kexec-tools/kexec-tools.spec	2022-10-19 09:39:40.000000000 +0800
@@ -4,7 +4,7 @@
 
 Name: kexec-tools
 Version: 2.0.20
-Release: 18
+Release: 19
 License: GPLv2+
 Summary: The kexec/kdump userspace component
 URL:     https://www.kernel.org/
@@ -87,11 +87,17 @@
 Patch10: fix-header-offset-overflow-when-large-pfn.patch
 
 Patch11: kexec-Add-quick-kexec-support.patch
+
+%ifarch %{ix86} x86_64
+Patch12: kexec-Quick-kexec-implementation-for-x86.patch
+%endif
+
 %ifarch aarch64
-Patch12: kexec-Quick-kexec-implementation-for-arm64.patch
-Patch13: arm64-kdump-deal-with-a-lot-of-resource-entries-in-p.patch
+Patch13: kexec-Quick-kexec-implementation-for-arm64.patch
+Patch14: arm64-kdump-deal-with-a-lot-of-resource-entries-in-p.patch
 %endif
 
+
 %description
 kexec-tools provides /sbin/kexec binary that facilitates a new
 kernel to boot using the kernel's kexec feature either on a
@@ -129,9 +135,12 @@
 %patch10 -p1
 
 %patch11 -p1
-%ifarch aarch64
+%ifarch %{ix86} x86_64
 %patch12 -p1
+%endif
+%ifarch aarch64
 %patch13 -p1
+%patch14 -p1
 %endif
 
 %build
@@ -318,6 +327,9 @@
 %endif
 
 %changelog
+* Sat Oct 15 2022 fu.lin <fulin10@huawei.com> - 2.0.20-19
+- quick kexec: support x86 arch
+
 * Wed Aug 3 2022 chenhaixiang <chenhaixiang3@huawei.com> - 2.0.20-18
 - fix CVE-2021-20269
 
