From: Roger Pau Monne Date: Fri, 4 Sep 2015 11:06:49 +0000 (+0200) Subject: elfnotes: intorduce a new PHYS_ENTRY elfnote X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3e5e08ba843ac0ff8d673a6ed5a8fc9f63a03a58;p=people%2Froyger%2Fxen.git elfnotes: intorduce a new PHYS_ENTRY elfnote 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é Acked-by: Wei Liu Reviewed-by: Andrew Cooper Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell Cc: Wei Liu --- Changes since v6: - Reword a comment. Changes since v4: - Add Andrew Cooper Reviewed-by and Wei Liu Acked-by. --- diff --git a/tools/xcutils/readnotes.c b/tools/xcutils/readnotes.c index 5fa445eec3..e682dd1a21 100644 --- a/tools/xcutils/readnotes.c +++ b/tools/xcutils/readnotes.c @@ -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)); diff --git a/xen/common/libelf/libelf-dominfo.c b/xen/common/libelf/libelf-dominfo.c index 3de1c230b2..dacd4ba868 100644 --- a/xen/common/libelf/libelf-dominfo.c +++ b/xen/common/libelf/libelf-dominfo.c @@ -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; } diff --git a/xen/include/public/elfnote.h b/xen/include/public/elfnote.h index 3824a94572..353985fe58 100644 --- a/xen/include/public/elfnote.h +++ b/xen/include/public/elfnote.h @@ -199,10 +199,20 @@ */ #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.