Skip to content

Commit

Permalink
xen: add new Xen elfnote types and use them appropriately
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Jun 2, 2008
1 parent d07af1f commit 7e0edc1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/x86/xen/xen-head.S
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/init.h>
#include <asm/boot.h>
#include <xen/interface/elfnote.h>
#include <asm/xen/interface.h>

__INIT
ENTRY(startup_xen)
Expand All @@ -32,5 +33,9 @@ ENTRY(hypercall_page)
ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
.quad _PAGE_PRESENT; .quad _PAGE_PRESENT)
ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, .long __HYPERVISOR_VIRT_START)

#endif /*CONFIG_XEN */
20 changes: 20 additions & 0 deletions include/xen/interface/elfnote.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,26 @@
*/
#define XEN_ELFNOTE_BSD_SYMTAB 11

/*
* The lowest address the hypervisor hole can begin at (numeric).
*
* This must not be set higher than HYPERVISOR_VIRT_START. Its presence
* also indicates to the hypervisor that the kernel can deal with the
* hole starting at a higher address.
*/
#define XEN_ELFNOTE_HV_START_LOW 12

/*
* List of maddr_t-sized mask/value pairs describing how to recognize
* (non-present) L1 page table entries carrying valid MFNs (numeric).
*/
#define XEN_ELFNOTE_L1_MFN_VALID 13

/*
* Whether or not the guest supports cooperative suspend cancellation.
*/
#define XEN_ELFNOTE_SUSPEND_CANCEL 14

#endif /* __XEN_PUBLIC_ELFNOTE_H__ */

/*
Expand Down

0 comments on commit 7e0edc1

Please sign in to comment.