]> xenbits.xensource.com Git - xen.git/commitdiff
elfnotes: intorduce a new PHYS_ENTRY elfnote
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 12 Nov 2015 15:58:07 +0000 (16:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Nov 2015 15:58:07 +0000 (16:58 +0100)
This new elfnote contains the 32bit entry point into the kernel. Xen will
use this entry point in order to launch the guest kernel in 32bit protected
mode with paging disabled.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/xcutils/readnotes.c
xen/common/libelf/libelf-dominfo.c
xen/include/public/elfnote.h

index 5fa445eec3d1b7373c4102813fc594e41e563c87..e682dd1a213b30952b95b75d0d2be0a6bdf2cfa8 100644 (file)
@@ -159,6 +159,9 @@ static unsigned print_notes(struct elf_binary *elf, ELF_HANDLE_DECL(elf_note) st
                case XEN_ELFNOTE_L1_MFN_VALID:
                        print_l1_mfn_valid_note("L1_MFN_VALID", elf , note);
                        break;
+               case XEN_ELFNOTE_PHYS32_ENTRY:
+                       print_numeric_note("PHYS32_ENTRY", elf , note);
+                       break;
                default:
                        printf("unknown note type %#x\n",
                               (unsigned)elf_uval(elf, note, type));
index 3de1c230b20967a700ba4a6387d7c8badbca91d7..dacd4ba868e097e0b23076af97abbb2566b4883f 100644 (file)
@@ -119,6 +119,7 @@ elf_errorstatus elf_xen_parse_note(struct elf_binary *elf,
         [XEN_ELFNOTE_BSD_SYMTAB] = { "BSD_SYMTAB", 1},
         [XEN_ELFNOTE_SUSPEND_CANCEL] = { "SUSPEND_CANCEL", 0 },
         [XEN_ELFNOTE_MOD_START_PFN] = { "MOD_START_PFN", 0 },
+        [XEN_ELFNOTE_PHYS32_ENTRY] = { "PHYS32_ENTRY", 0 },
     };
 /* *INDENT-ON* */
 
@@ -212,6 +213,9 @@ elf_errorstatus elf_xen_parse_note(struct elf_binary *elf,
                 elf, note, sizeof(*parms->f_supported), i);
         break;
 
+    case XEN_ELFNOTE_PHYS32_ENTRY:
+        parms->phys_entry = val;
+        break;
     }
     return 0;
 }
index 3824a94572b506fb07afde3bfb4c638e8625b5b8..353985fe58f3781e9f25a5ffed9603c8168138a9 100644 (file)
  */
 #define XEN_ELFNOTE_SUPPORTED_FEATURES 17
 
+/*
+ * Physical entry point into the kernel.
+ *
+ * 32bit entry point into the kernel. When requested to launch the
+ * guest kernel in a HVM container, Xen will use this entry point to
+ * launch the guest in 32bit protected mode with paging disabled.
+ * Ignored otherwise.
+ */
+#define XEN_ELFNOTE_PHYS32_ENTRY 18
+
 /*
  * The number of the highest elfnote defined.
  */
-#define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUPPORTED_FEATURES
+#define XEN_ELFNOTE_MAX XEN_ELFNOTE_PHYS32_ENTRY
 
 /*
  * System information exported through crash notes.