[Xen-devel] [PATCH] x86/desc: Move boot_gdtr into .rodata

Andrew Cooper posted 1 patch 1 week ago
Failed in applying to current master (apply log)
xen/arch/x86/desc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[Xen-devel] [PATCH] x86/desc: Move boot_gdtr into .rodata

Posted by Andrew Cooper 1 week ago
It is never written to.

This was an oversight when it was moved from asm into C.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/desc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/desc.c b/xen/arch/x86/desc.c
index 42ccdc2f8c..dfeb1beaa8 100644
--- a/xen/arch/x86/desc.c
+++ b/xen/arch/x86/desc.c
@@ -89,7 +89,7 @@ seg_desc_t boot_compat_gdt[PAGE_SIZE / sizeof(seg_desc_t)] =
  * References boot_cpu_gdt_table for a short period, until the CPUs switch
  * onto their per-CPU GDTs.
  */
-struct desc_ptr boot_gdtr = {
+const struct desc_ptr boot_gdtr = {
     .limit = LAST_RESERVED_GDT_BYTE,
     .base = (unsigned long)(boot_gdt - FIRST_RESERVED_GDT_ENTRY),
 };
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel