]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop xen-introduce-generic-helper-checking-for-memory-map.patch
authorSasha Levin <sashal@kernel.org>
Sun, 6 Oct 2024 08:06:52 +0000 (04:06 -0400)
committerSasha Levin <sashal@kernel.org>
Sun, 6 Oct 2024 08:06:52 +0000 (04:06 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/series
queue-4.19/xen-introduce-generic-helper-checking-for-memory-map.patch [deleted file]
queue-5.10/series
queue-5.10/xen-introduce-generic-helper-checking-for-memory-map.patch [deleted file]
queue-5.15/series
queue-5.15/xen-introduce-generic-helper-checking-for-memory-map.patch [deleted file]
queue-5.4/series
queue-5.4/xen-introduce-generic-helper-checking-for-memory-map.patch [deleted file]
queue-6.1/series
queue-6.1/xen-introduce-generic-helper-checking-for-memory-map.patch [deleted file]

index d7478b4cce44dc7b309cd788da6c09f1541c4c1e..8ad3f86ddc04e8f67ad6176501fd69fb19c6a492 100644 (file)
@@ -61,7 +61,6 @@ drm-msm-a5xx-fix-races-in-preemption-evaluation-stag.patch
 ipmi-docs-don-t-advertise-deprecated-sysfs-entries.patch
 drm-msm-fix-s-null-argument-error.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
-xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-swiotlb-simplify-range_straddles_page_boundary.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
diff --git a/queue-4.19/xen-introduce-generic-helper-checking-for-memory-map.patch b/queue-4.19/xen-introduce-generic-helper-checking-for-memory-map.patch
deleted file mode 100644 (file)
index f1bcfab..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-From d0a21324a95797dc2daebe340ff4498c2162c89e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 2 Aug 2024 14:11:06 +0200
-Subject: xen: introduce generic helper checking for memory map conflicts
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Juergen Gross <jgross@suse.com>
-
-[ Upstream commit ba88829706e2c5b7238638fc2b0713edf596495e ]
-
-When booting as a Xen PV dom0 the memory layout of the dom0 is
-modified to match that of the host, as this requires less changes in
-the kernel for supporting Xen.
-
-There are some cases, though, which are problematic, as it is the Xen
-hypervisor selecting the kernel's load address plus some other data,
-which might conflict with the host's memory map.
-
-These conflicts are detected at boot time and result in a boot error.
-In order to support handling at least some of these conflicts in
-future, introduce a generic helper function which will later gain the
-ability to adapt the memory layout when possible.
-
-Add the missing check for the xen_start_info area.
-
-Note that possible p2m map and initrd memory conflicts are handled
-already by copying the data to memory areas not conflicting with the
-memory map. The initial stack allocated by Xen doesn't need to be
-checked, as early boot code is switching to the statically allocated
-initial kernel stack. Initial page tables and the kernel itself will
-be handled later.
-
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/mmu_pv.c  |  5 +----
- arch/x86/xen/setup.c   | 34 ++++++++++++++++++++++++++++------
- arch/x86/xen/xen-ops.h |  3 ++-
- 3 files changed, 31 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
-index 73aa0b89a74a4..54e5d4f3d8608 100644
---- a/arch/x86/xen/mmu_pv.c
-+++ b/arch/x86/xen/mmu_pv.c
-@@ -2286,10 +2286,7 @@ void __init xen_reserve_special_pages(void)
- void __init xen_pt_check_e820(void)
- {
--      if (xen_is_e820_reserved(xen_pt_base, xen_pt_size)) {
--              xen_raw_console_write("Xen hypervisor allocated page table memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(xen_pt_base, xen_pt_size, "page table");
- }
- static unsigned char dummy_mapping[PAGE_SIZE] __page_aligned_bss;
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index ad69e5796cd0c..2fd89830b1ffb 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -605,7 +605,7 @@ static void __init xen_ignore_unusable(void)
-       }
- }
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
-+static bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
- {
-       struct e820_entry *entry;
-       unsigned mapcnt;
-@@ -662,6 +662,23 @@ phys_addr_t __init xen_find_free_area(phys_addr_t size)
-       return 0;
- }
-+/*
-+ * Check for an area in physical memory to be usable for non-movable purposes.
-+ * An area is considered to usable if the used E820 map lists it to be RAM.
-+ * In case the area is not usable, crash the system with an error message.
-+ */
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component)
-+{
-+      if (!xen_is_e820_reserved(start, size))
-+              return;
-+
-+      xen_raw_console_write("Xen hypervisor allocated ");
-+      xen_raw_console_write(component);
-+      xen_raw_console_write(" memory conflicts with E820 map\n");
-+      BUG();
-+}
-+
- /*
-  * Like memcpy, but with physical addresses for dest and src.
-  */
-@@ -862,11 +879,16 @@ char * __init xen_memory_setup(void)
-        * Failing now is better than running into weird problems later due
-        * to relocating (and even reusing) pages with kernel text or data.
-        */
--      if (xen_is_e820_reserved(__pa_symbol(_text),
--                               __pa_symbol(_end) - __pa_symbol(_text))) {
--              xen_raw_console_write("Xen hypervisor allocated kernel memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(__pa_symbol(_text),
-+                             __pa_symbol(_end) - __pa_symbol(_text),
-+                             "kernel");
-+
-+      /*
-+       * Check for a conflict of the xen_start_info memory with the target
-+       * E820 map.
-+       */
-+      xen_chk_is_e820_usable(__pa(xen_start_info), sizeof(*xen_start_info),
-+                             "xen_start_info");
-       /*
-        * Check for a conflict of the hypervisor supplied page tables with
-diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
-index 9faec8543237a..83f980867bc0b 100644
---- a/arch/x86/xen/xen-ops.h
-+++ b/arch/x86/xen/xen-ops.h
-@@ -46,7 +46,8 @@ void xen_mm_unpin_all(void);
- void __init xen_relocate_p2m(void);
- #endif
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size);
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component);
- unsigned long __ref xen_chk_extra_mem(unsigned long pfn);
- void __init xen_inv_extra_mem(void);
- void __init xen_remap_memory(void);
--- 
-2.43.0
-
index 6a92e02a9e524309b35478b0a519cba83dffdb05..cdb1ddc1dc6ba0456a5d7c108cc5f8bedd21eb39 100644 (file)
@@ -131,7 +131,6 @@ ipmi-docs-don-t-advertise-deprecated-sysfs-entries.patch
 drm-msm-fix-s-null-argument-error.patch
 drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
-xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 tpm-clean-up-tpm-space-after-command-failure.patch
diff --git a/queue-5.10/xen-introduce-generic-helper-checking-for-memory-map.patch b/queue-5.10/xen-introduce-generic-helper-checking-for-memory-map.patch
deleted file mode 100644 (file)
index bca09d1..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-From 65fa40a58556f7162058cad59fc6d8fa6bf25aac Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 2 Aug 2024 14:11:06 +0200
-Subject: xen: introduce generic helper checking for memory map conflicts
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Juergen Gross <jgross@suse.com>
-
-[ Upstream commit ba88829706e2c5b7238638fc2b0713edf596495e ]
-
-When booting as a Xen PV dom0 the memory layout of the dom0 is
-modified to match that of the host, as this requires less changes in
-the kernel for supporting Xen.
-
-There are some cases, though, which are problematic, as it is the Xen
-hypervisor selecting the kernel's load address plus some other data,
-which might conflict with the host's memory map.
-
-These conflicts are detected at boot time and result in a boot error.
-In order to support handling at least some of these conflicts in
-future, introduce a generic helper function which will later gain the
-ability to adapt the memory layout when possible.
-
-Add the missing check for the xen_start_info area.
-
-Note that possible p2m map and initrd memory conflicts are handled
-already by copying the data to memory areas not conflicting with the
-memory map. The initial stack allocated by Xen doesn't need to be
-checked, as early boot code is switching to the statically allocated
-initial kernel stack. Initial page tables and the kernel itself will
-be handled later.
-
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/mmu_pv.c  |  5 +----
- arch/x86/xen/setup.c   | 34 ++++++++++++++++++++++++++++------
- arch/x86/xen/xen-ops.h |  3 ++-
- 3 files changed, 31 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
-index cf2ade864c302..a78e0afe46701 100644
---- a/arch/x86/xen/mmu_pv.c
-+++ b/arch/x86/xen/mmu_pv.c
-@@ -1985,10 +1985,7 @@ void __init xen_reserve_special_pages(void)
- void __init xen_pt_check_e820(void)
- {
--      if (xen_is_e820_reserved(xen_pt_base, xen_pt_size)) {
--              xen_raw_console_write("Xen hypervisor allocated page table memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(xen_pt_base, xen_pt_size, "page table");
- }
- static unsigned char dummy_mapping[PAGE_SIZE] __page_aligned_bss;
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index dfb11a7420a3f..7fb9c9e368158 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -611,7 +611,7 @@ static void __init xen_ignore_unusable(void)
-       }
- }
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
-+static bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
- {
-       struct e820_entry *entry;
-       unsigned mapcnt;
-@@ -668,6 +668,23 @@ phys_addr_t __init xen_find_free_area(phys_addr_t size)
-       return 0;
- }
-+/*
-+ * Check for an area in physical memory to be usable for non-movable purposes.
-+ * An area is considered to usable if the used E820 map lists it to be RAM.
-+ * In case the area is not usable, crash the system with an error message.
-+ */
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component)
-+{
-+      if (!xen_is_e820_reserved(start, size))
-+              return;
-+
-+      xen_raw_console_write("Xen hypervisor allocated ");
-+      xen_raw_console_write(component);
-+      xen_raw_console_write(" memory conflicts with E820 map\n");
-+      BUG();
-+}
-+
- /*
-  * Like memcpy, but with physical addresses for dest and src.
-  */
-@@ -856,11 +873,16 @@ char * __init xen_memory_setup(void)
-        * Failing now is better than running into weird problems later due
-        * to relocating (and even reusing) pages with kernel text or data.
-        */
--      if (xen_is_e820_reserved(__pa_symbol(_text),
--                               __pa_symbol(_end) - __pa_symbol(_text))) {
--              xen_raw_console_write("Xen hypervisor allocated kernel memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(__pa_symbol(_text),
-+                             __pa_symbol(_end) - __pa_symbol(_text),
-+                             "kernel");
-+
-+      /*
-+       * Check for a conflict of the xen_start_info memory with the target
-+       * E820 map.
-+       */
-+      xen_chk_is_e820_usable(__pa(xen_start_info), sizeof(*xen_start_info),
-+                             "xen_start_info");
-       /*
-        * Check for a conflict of the hypervisor supplied page tables with
-diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
-index 98242430d07e7..d205686d92054 100644
---- a/arch/x86/xen/xen-ops.h
-+++ b/arch/x86/xen/xen-ops.h
-@@ -44,7 +44,8 @@ void xen_mm_unpin_all(void);
- void __init xen_relocate_p2m(void);
- #endif
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size);
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component);
- unsigned long __ref xen_chk_extra_mem(unsigned long pfn);
- void __init xen_inv_extra_mem(void);
- void __init xen_remap_memory(void);
--- 
-2.43.0
-
index 2ec7983dc3718f200618a8a795f7aed1aad81b83..6075da2beefa4d4fd5fcb7b1321b7539d3cf8899 100644 (file)
@@ -172,7 +172,6 @@ ipmi-docs-don-t-advertise-deprecated-sysfs-entries.patch
 drm-msm-fix-s-null-argument-error.patch
 drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
-xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 tpm-clean-up-tpm-space-after-command-failure.patch
diff --git a/queue-5.15/xen-introduce-generic-helper-checking-for-memory-map.patch b/queue-5.15/xen-introduce-generic-helper-checking-for-memory-map.patch
deleted file mode 100644 (file)
index ff6ebe1..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-From 1a8c7de6df9358657190daa998aba9d93a88752b Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 2 Aug 2024 14:11:06 +0200
-Subject: xen: introduce generic helper checking for memory map conflicts
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Juergen Gross <jgross@suse.com>
-
-[ Upstream commit ba88829706e2c5b7238638fc2b0713edf596495e ]
-
-When booting as a Xen PV dom0 the memory layout of the dom0 is
-modified to match that of the host, as this requires less changes in
-the kernel for supporting Xen.
-
-There are some cases, though, which are problematic, as it is the Xen
-hypervisor selecting the kernel's load address plus some other data,
-which might conflict with the host's memory map.
-
-These conflicts are detected at boot time and result in a boot error.
-In order to support handling at least some of these conflicts in
-future, introduce a generic helper function which will later gain the
-ability to adapt the memory layout when possible.
-
-Add the missing check for the xen_start_info area.
-
-Note that possible p2m map and initrd memory conflicts are handled
-already by copying the data to memory areas not conflicting with the
-memory map. The initial stack allocated by Xen doesn't need to be
-checked, as early boot code is switching to the statically allocated
-initial kernel stack. Initial page tables and the kernel itself will
-be handled later.
-
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/mmu_pv.c  |  5 +----
- arch/x86/xen/setup.c   | 34 ++++++++++++++++++++++++++++------
- arch/x86/xen/xen-ops.h |  3 ++-
- 3 files changed, 31 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
-index 3359c23573c50..7058490784c54 100644
---- a/arch/x86/xen/mmu_pv.c
-+++ b/arch/x86/xen/mmu_pv.c
-@@ -1987,10 +1987,7 @@ void __init xen_reserve_special_pages(void)
- void __init xen_pt_check_e820(void)
- {
--      if (xen_is_e820_reserved(xen_pt_base, xen_pt_size)) {
--              xen_raw_console_write("Xen hypervisor allocated page table memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(xen_pt_base, xen_pt_size, "page table");
- }
- static unsigned char dummy_mapping[PAGE_SIZE] __page_aligned_bss;
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index dfb11a7420a3f..7fb9c9e368158 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -611,7 +611,7 @@ static void __init xen_ignore_unusable(void)
-       }
- }
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
-+static bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
- {
-       struct e820_entry *entry;
-       unsigned mapcnt;
-@@ -668,6 +668,23 @@ phys_addr_t __init xen_find_free_area(phys_addr_t size)
-       return 0;
- }
-+/*
-+ * Check for an area in physical memory to be usable for non-movable purposes.
-+ * An area is considered to usable if the used E820 map lists it to be RAM.
-+ * In case the area is not usable, crash the system with an error message.
-+ */
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component)
-+{
-+      if (!xen_is_e820_reserved(start, size))
-+              return;
-+
-+      xen_raw_console_write("Xen hypervisor allocated ");
-+      xen_raw_console_write(component);
-+      xen_raw_console_write(" memory conflicts with E820 map\n");
-+      BUG();
-+}
-+
- /*
-  * Like memcpy, but with physical addresses for dest and src.
-  */
-@@ -856,11 +873,16 @@ char * __init xen_memory_setup(void)
-        * Failing now is better than running into weird problems later due
-        * to relocating (and even reusing) pages with kernel text or data.
-        */
--      if (xen_is_e820_reserved(__pa_symbol(_text),
--                               __pa_symbol(_end) - __pa_symbol(_text))) {
--              xen_raw_console_write("Xen hypervisor allocated kernel memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(__pa_symbol(_text),
-+                             __pa_symbol(_end) - __pa_symbol(_text),
-+                             "kernel");
-+
-+      /*
-+       * Check for a conflict of the xen_start_info memory with the target
-+       * E820 map.
-+       */
-+      xen_chk_is_e820_usable(__pa(xen_start_info), sizeof(*xen_start_info),
-+                             "xen_start_info");
-       /*
-        * Check for a conflict of the hypervisor supplied page tables with
-diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
-index 71f31032c635f..55e6e7efb426e 100644
---- a/arch/x86/xen/xen-ops.h
-+++ b/arch/x86/xen/xen-ops.h
-@@ -44,7 +44,8 @@ void xen_mm_unpin_all(void);
- void __init xen_relocate_p2m(void);
- #endif
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size);
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component);
- unsigned long __ref xen_chk_extra_mem(unsigned long pfn);
- void __init xen_inv_extra_mem(void);
- void __init xen_remap_memory(void);
--- 
-2.43.0
-
index 1ee7b13cddbf705ec9d6f153d0bb6d72f7e7c1b1..7c8fa270c820352bfb2e62aebfc6496c23fdf512 100644 (file)
@@ -83,7 +83,6 @@ ipmi-docs-don-t-advertise-deprecated-sysfs-entries.patch
 drm-msm-fix-s-null-argument-error.patch
 drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
-xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 tpm-clean-up-tpm-space-after-command-failure.patch
diff --git a/queue-5.4/xen-introduce-generic-helper-checking-for-memory-map.patch b/queue-5.4/xen-introduce-generic-helper-checking-for-memory-map.patch
deleted file mode 100644 (file)
index cc0eda8..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-From d5cf0018ba33cf6aae44de08cc0136d8951236e9 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 2 Aug 2024 14:11:06 +0200
-Subject: xen: introduce generic helper checking for memory map conflicts
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Juergen Gross <jgross@suse.com>
-
-[ Upstream commit ba88829706e2c5b7238638fc2b0713edf596495e ]
-
-When booting as a Xen PV dom0 the memory layout of the dom0 is
-modified to match that of the host, as this requires less changes in
-the kernel for supporting Xen.
-
-There are some cases, though, which are problematic, as it is the Xen
-hypervisor selecting the kernel's load address plus some other data,
-which might conflict with the host's memory map.
-
-These conflicts are detected at boot time and result in a boot error.
-In order to support handling at least some of these conflicts in
-future, introduce a generic helper function which will later gain the
-ability to adapt the memory layout when possible.
-
-Add the missing check for the xen_start_info area.
-
-Note that possible p2m map and initrd memory conflicts are handled
-already by copying the data to memory areas not conflicting with the
-memory map. The initial stack allocated by Xen doesn't need to be
-checked, as early boot code is switching to the statically allocated
-initial kernel stack. Initial page tables and the kernel itself will
-be handled later.
-
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/mmu_pv.c  |  5 +----
- arch/x86/xen/setup.c   | 34 ++++++++++++++++++++++++++++------
- arch/x86/xen/xen-ops.h |  3 ++-
- 3 files changed, 31 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
-index c8dbee62ec2ab..5792980317861 100644
---- a/arch/x86/xen/mmu_pv.c
-+++ b/arch/x86/xen/mmu_pv.c
-@@ -2284,10 +2284,7 @@ void __init xen_reserve_special_pages(void)
- void __init xen_pt_check_e820(void)
- {
--      if (xen_is_e820_reserved(xen_pt_base, xen_pt_size)) {
--              xen_raw_console_write("Xen hypervisor allocated page table memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(xen_pt_base, xen_pt_size, "page table");
- }
- static unsigned char dummy_mapping[PAGE_SIZE] __page_aligned_bss;
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index 858de52cfacff..32ac3deb193b9 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -614,7 +614,7 @@ static void __init xen_ignore_unusable(void)
-       }
- }
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
-+static bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
- {
-       struct e820_entry *entry;
-       unsigned mapcnt;
-@@ -671,6 +671,23 @@ phys_addr_t __init xen_find_free_area(phys_addr_t size)
-       return 0;
- }
-+/*
-+ * Check for an area in physical memory to be usable for non-movable purposes.
-+ * An area is considered to usable if the used E820 map lists it to be RAM.
-+ * In case the area is not usable, crash the system with an error message.
-+ */
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component)
-+{
-+      if (!xen_is_e820_reserved(start, size))
-+              return;
-+
-+      xen_raw_console_write("Xen hypervisor allocated ");
-+      xen_raw_console_write(component);
-+      xen_raw_console_write(" memory conflicts with E820 map\n");
-+      BUG();
-+}
-+
- /*
-  * Like memcpy, but with physical addresses for dest and src.
-  */
-@@ -875,11 +892,16 @@ char * __init xen_memory_setup(void)
-        * Failing now is better than running into weird problems later due
-        * to relocating (and even reusing) pages with kernel text or data.
-        */
--      if (xen_is_e820_reserved(__pa_symbol(_text),
--                               __pa_symbol(_end) - __pa_symbol(_text))) {
--              xen_raw_console_write("Xen hypervisor allocated kernel memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(__pa_symbol(_text),
-+                             __pa_symbol(_end) - __pa_symbol(_text),
-+                             "kernel");
-+
-+      /*
-+       * Check for a conflict of the xen_start_info memory with the target
-+       * E820 map.
-+       */
-+      xen_chk_is_e820_usable(__pa(xen_start_info), sizeof(*xen_start_info),
-+                             "xen_start_info");
-       /*
-        * Check for a conflict of the hypervisor supplied page tables with
-diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
-index 120e2bcf20f88..4e2cc1e23f843 100644
---- a/arch/x86/xen/xen-ops.h
-+++ b/arch/x86/xen/xen-ops.h
-@@ -46,7 +46,8 @@ void xen_mm_unpin_all(void);
- void __init xen_relocate_p2m(void);
- #endif
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size);
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component);
- unsigned long __ref xen_chk_extra_mem(unsigned long pfn);
- void __init xen_inv_extra_mem(void);
- void __init xen_remap_memory(void);
--- 
-2.43.0
-
index ad9ef63540ed8393046e4ea5b9a8079e0067bbee..c762eaf143db66ab54adda969f12d13e3d6281d4 100644 (file)
@@ -132,7 +132,6 @@ drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
 hid-wacom-support-sequence-numbers-smaller-than-16-b.patch
 hid-wacom-do-not-warn-about-dropped-packets-for-firs.patch
-xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 xen-swiotlb-fix-allocated-size.patch
diff --git a/queue-6.1/xen-introduce-generic-helper-checking-for-memory-map.patch b/queue-6.1/xen-introduce-generic-helper-checking-for-memory-map.patch
deleted file mode 100644 (file)
index 8d51a17..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-From 698a7c44fb0ebb8d738d7feff9751817beac08c0 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 2 Aug 2024 14:11:06 +0200
-Subject: xen: introduce generic helper checking for memory map conflicts
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Juergen Gross <jgross@suse.com>
-
-[ Upstream commit ba88829706e2c5b7238638fc2b0713edf596495e ]
-
-When booting as a Xen PV dom0 the memory layout of the dom0 is
-modified to match that of the host, as this requires less changes in
-the kernel for supporting Xen.
-
-There are some cases, though, which are problematic, as it is the Xen
-hypervisor selecting the kernel's load address plus some other data,
-which might conflict with the host's memory map.
-
-These conflicts are detected at boot time and result in a boot error.
-In order to support handling at least some of these conflicts in
-future, introduce a generic helper function which will later gain the
-ability to adapt the memory layout when possible.
-
-Add the missing check for the xen_start_info area.
-
-Note that possible p2m map and initrd memory conflicts are handled
-already by copying the data to memory areas not conflicting with the
-memory map. The initial stack allocated by Xen doesn't need to be
-checked, as early boot code is switching to the statically allocated
-initial kernel stack. Initial page tables and the kernel itself will
-be handled later.
-
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/mmu_pv.c  |  5 +----
- arch/x86/xen/setup.c   | 34 ++++++++++++++++++++++++++++------
- arch/x86/xen/xen-ops.h |  3 ++-
- 3 files changed, 31 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
-index ee29fb558f2e6..4f7cde57a40fd 100644
---- a/arch/x86/xen/mmu_pv.c
-+++ b/arch/x86/xen/mmu_pv.c
-@@ -2010,10 +2010,7 @@ void __init xen_reserve_special_pages(void)
- void __init xen_pt_check_e820(void)
- {
--      if (xen_is_e820_reserved(xen_pt_base, xen_pt_size)) {
--              xen_raw_console_write("Xen hypervisor allocated page table memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(xen_pt_base, xen_pt_size, "page table");
- }
- static unsigned char dummy_mapping[PAGE_SIZE] __page_aligned_bss;
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index f0bb5e350990d..96fb245d901b3 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -608,7 +608,7 @@ static void __init xen_ignore_unusable(void)
-       }
- }
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
-+static bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size)
- {
-       struct e820_entry *entry;
-       unsigned mapcnt;
-@@ -665,6 +665,23 @@ phys_addr_t __init xen_find_free_area(phys_addr_t size)
-       return 0;
- }
-+/*
-+ * Check for an area in physical memory to be usable for non-movable purposes.
-+ * An area is considered to usable if the used E820 map lists it to be RAM.
-+ * In case the area is not usable, crash the system with an error message.
-+ */
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component)
-+{
-+      if (!xen_is_e820_reserved(start, size))
-+              return;
-+
-+      xen_raw_console_write("Xen hypervisor allocated ");
-+      xen_raw_console_write(component);
-+      xen_raw_console_write(" memory conflicts with E820 map\n");
-+      BUG();
-+}
-+
- /*
-  * Like memcpy, but with physical addresses for dest and src.
-  */
-@@ -853,11 +870,16 @@ char * __init xen_memory_setup(void)
-        * Failing now is better than running into weird problems later due
-        * to relocating (and even reusing) pages with kernel text or data.
-        */
--      if (xen_is_e820_reserved(__pa_symbol(_text),
--                               __pa_symbol(_end) - __pa_symbol(_text))) {
--              xen_raw_console_write("Xen hypervisor allocated kernel memory conflicts with E820 map\n");
--              BUG();
--      }
-+      xen_chk_is_e820_usable(__pa_symbol(_text),
-+                             __pa_symbol(_end) - __pa_symbol(_text),
-+                             "kernel");
-+
-+      /*
-+       * Check for a conflict of the xen_start_info memory with the target
-+       * E820 map.
-+       */
-+      xen_chk_is_e820_usable(__pa(xen_start_info), sizeof(*xen_start_info),
-+                             "xen_start_info");
-       /*
-        * Check for a conflict of the hypervisor supplied page tables with
-diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
-index b2b2f4315b78d..35670a44ef4c5 100644
---- a/arch/x86/xen/xen-ops.h
-+++ b/arch/x86/xen/xen-ops.h
-@@ -44,7 +44,8 @@ void xen_mm_unpin_all(void);
- void __init xen_relocate_p2m(void);
- #endif
--bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size);
-+void __init xen_chk_is_e820_usable(phys_addr_t start, phys_addr_t size,
-+                                 const char *component);
- unsigned long __ref xen_chk_extra_mem(unsigned long pfn);
- void __init xen_inv_extra_mem(void);
- void __init xen_remap_memory(void);
--- 
-2.43.0
-