Commit 7e0edc1bc343231029084761ebf59e522902eb49
Committed by
Ingo Molnar
1 parent
d07af1f0e3
Exists in
master
and in
7 other branches
xen: add new Xen elfnote types and use them appropriately
Define recently added XEN_ELFNOTEs, and use them appropriately. Most significantly, this enables domain checkpointing (xm save -c). Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 25 additions and 0 deletions Side-by-side Diff
arch/x86/xen/xen-head.S
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | #include <linux/init.h> |
8 | 8 | #include <asm/boot.h> |
9 | 9 | #include <xen/interface/elfnote.h> |
10 | +#include <asm/xen/interface.h> | |
10 | 11 | |
11 | 12 | __INIT |
12 | 13 | ENTRY(startup_xen) |
... | ... | @@ -32,6 +33,10 @@ |
32 | 33 | ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb") |
33 | 34 | ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes") |
34 | 35 | ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") |
36 | + ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID, | |
37 | + .quad _PAGE_PRESENT; .quad _PAGE_PRESENT) | |
38 | + ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1) | |
39 | + ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, .long __HYPERVISOR_VIRT_START) | |
35 | 40 | |
36 | 41 | #endif /*CONFIG_XEN */ |
include/xen/interface/elfnote.h
... | ... | @@ -120,6 +120,26 @@ |
120 | 120 | */ |
121 | 121 | #define XEN_ELFNOTE_BSD_SYMTAB 11 |
122 | 122 | |
123 | +/* | |
124 | + * The lowest address the hypervisor hole can begin at (numeric). | |
125 | + * | |
126 | + * This must not be set higher than HYPERVISOR_VIRT_START. Its presence | |
127 | + * also indicates to the hypervisor that the kernel can deal with the | |
128 | + * hole starting at a higher address. | |
129 | + */ | |
130 | +#define XEN_ELFNOTE_HV_START_LOW 12 | |
131 | + | |
132 | +/* | |
133 | + * List of maddr_t-sized mask/value pairs describing how to recognize | |
134 | + * (non-present) L1 page table entries carrying valid MFNs (numeric). | |
135 | + */ | |
136 | +#define XEN_ELFNOTE_L1_MFN_VALID 13 | |
137 | + | |
138 | +/* | |
139 | + * Whether or not the guest supports cooperative suspend cancellation. | |
140 | + */ | |
141 | +#define XEN_ELFNOTE_SUSPEND_CANCEL 14 | |
142 | + | |
123 | 143 | #endif /* __XEN_PUBLIC_ELFNOTE_H__ */ |
124 | 144 | |
125 | 145 | /* |