# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1261488645 0
# Node ID 89bb6edd1b98237722c90b6183229a46d0f45ec5
# Parent 65a7b6de919118c86b3798402901324d4b491249
Sync Xen public headers for Xen 4.0.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
include/xen/interface/arch-ia64.h | 2
include/xen/interface/arch-x86/hvm/save.h | 3
include/xen/interface/arch-x86/xen.h | 4
include/xen/interface/domctl.h | 162 +++++++++++++++++++++++++--
include/xen/interface/grant_table.h | 174 ++++++++++++++++++++++++++---
include/xen/interface/hvm/hvm_info_table.h | 6 +
include/xen/interface/hvm/ioreq.h | 32 ++---
include/xen/interface/mem_event.h | 69 +++++++++++
include/xen/interface/memory.h | 9 +
include/xen/interface/physdev.h | 13 ++
include/xen/interface/platform.h | 47 +++++++
include/xen/interface/sysctl.h | 37 +++++-
include/xen/interface/tmem.h | 61 +++++++---
include/xen/interface/vcpu.h | 28 ++++
include/xen/interface/xen-compat.h | 2
include/xen/interface/xen.h | 66 +++++++++--
include/xen/interface/xsm/acm.h | 12 --
include/xen/interface/xsm/flask_op.h | 4
18 files changed, 638 insertions(+), 93 deletions(-)
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/arch-ia64.h
--- a/include/xen/interface/arch-ia64.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/arch-ia64.h Tue Dec 22 13:30:45 2009 +0000
@@ -66,7 +66,7 @@ typedef unsigned long xen_pfn_t;
/* Maximum number of virtual CPUs in multi-processor guests. */
/* WARNING: before changing this, check that shared_info fits on a page */
-#define MAX_VIRT_CPUS 64
+#define XEN_LEGACY_MAX_VCPUS 64
/* IO ports location for PV. */
#define IO_PORTS_PADDR 0x00000ffffc000000UL
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/arch-x86/hvm/save.h
--- a/include/xen/interface/arch-x86/hvm/save.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/arch-x86/hvm/save.h Tue Dec 22 13:30:45 2009 +0000
@@ -38,7 +38,7 @@ struct hvm_save_header {
uint32_t version; /* File format version */
uint64_t changeset; /* Version of Xen that saved this file */
uint32_t cpuid; /* CPUID[0x01][%eax] on the saving machine */
- uint32_t pad0;
+ uint32_t gtsc_khz; /* Guest's TSC frequency in kHz */
};
DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
@@ -137,6 +137,7 @@ struct hvm_hw_cpu {
uint64_t msr_cstar;
uint64_t msr_syscall_mask;
uint64_t msr_efer;
+ uint64_t msr_tsc_aux;
/* guest's idea of what rdtsc() would return */
uint64_t tsc;
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/arch-x86/xen.h
--- a/include/xen/interface/arch-x86/xen.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/arch-x86/xen.h Tue Dec 22 13:30:45 2009 +0000
@@ -73,8 +73,8 @@ typedef unsigned long xen_pfn_t;
#define FIRST_RESERVED_GDT_BYTE (FIRST_RESERVED_GDT_PAGE * 4096)
#define FIRST_RESERVED_GDT_ENTRY (FIRST_RESERVED_GDT_BYTE / 8)
-/* Maximum number of virtual CPUs in multi-processor guests. */
-#define MAX_VIRT_CPUS 32
+/* Maximum number of virtual CPUs in legacy multi-processor guests. */
+#define XEN_LEGACY_MAX_VCPUS 32
#ifndef __ASSEMBLY__
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/domctl.h
--- a/include/xen/interface/domctl.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/domctl.h Tue Dec 22 13:30:45 2009 +0000
@@ -33,8 +33,9 @@
#endif
#include "xen.h"
-
-#define XEN_DOMCTL_INTERFACE_VERSION 0x00000005
+#include "grant_table.h"
+
+#define XEN_DOMCTL_INTERFACE_VERSION 0x00000006
struct xenctl_cpumap {
XEN_GUEST_HANDLE_64(uint8) bitmap;
@@ -60,6 +61,9 @@ struct xen_domctl_createdomain {
#define _XEN_DOMCTL_CDF_s3_integrity 2
#define XEN_DOMCTL_CDF_s3_integrity (1U<<_XEN_DOMCTL_CDF_s3_integrity)
uint32_t flags;
+ /* Disable out-of-sync shadow page tables? */
+#define _XEN_DOMCTL_CDF_oos_off 3
+#define XEN_DOMCTL_CDF_oos_off (1U<<_XEN_DOMCTL_CDF_oos_off)
};
typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
DEFINE_XEN_GUEST_HANDLE(xen_domctl_createdomain_t);
@@ -94,15 +98,13 @@ struct xen_domctl_getdomaininfo {
/* Being debugged. */
#define _XEN_DOMINF_debugged 6
#define XEN_DOMINF_debugged (1U<<_XEN_DOMINF_debugged)
- /* CPU to which this domain is bound. */
-#define XEN_DOMINF_cpumask 255
-#define XEN_DOMINF_cpushift 8
/* XEN_DOMINF_shutdown guest-supplied code. */
#define XEN_DOMINF_shutdownmask 255
#define XEN_DOMINF_shutdownshift 16
uint32_t flags; /* XEN_DOMINF_* */
uint64_aligned_t tot_pages;
uint64_aligned_t max_pages;
+ uint64_aligned_t shr_pages;
uint64_aligned_t shared_info_frame; /* GMFN of shared_info struct */
uint64_aligned_t cpu_time;
uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */
@@ -140,6 +142,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_getme
#define XEN_DOMCTL_PFINFO_LTABTYPE_MASK (0x7U<<28)
#define XEN_DOMCTL_PFINFO_LPINTAB (0x1U<<31)
#define XEN_DOMCTL_PFINFO_XTAB (0xfU<<28) /* invalid page */
+#define XEN_DOMCTL_PFINFO_PAGEDTAB (0x8U<<28)
#define XEN_DOMCTL_PFINFO_LTAB_MASK (0xfU<<28)
struct xen_domctl_getpageframeinfo {
@@ -401,7 +404,6 @@ typedef struct xen_domctl_settimeoffset
typedef struct xen_domctl_settimeoffset xen_domctl_settimeoffset_t;
DEFINE_XEN_GUEST_HANDLE(xen_domctl_settimeoffset_t);
-
#define XEN_DOMCTL_gethvmcontext 33
#define XEN_DOMCTL_sethvmcontext 34
typedef struct xen_domctl_hvmcontext {
@@ -537,7 +539,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_iopor
#define XEN_DOMCTL_MEM_CACHEATTR_UCM 7
struct xen_domctl_pin_mem_cacheattr {
uint64_aligned_t start, end;
- unsigned int type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
+ uint32_t type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
};
typedef struct xen_domctl_pin_mem_cacheattr xen_domctl_pin_mem_cacheattr_t;
DEFINE_XEN_GUEST_HANDLE(xen_domctl_pin_mem_cacheattr_t);
@@ -596,11 +598,11 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_t
# define XEN_CPUID_INPUT_UNUSED 0xFFFFFFFF
# define XEN_DOMCTL_set_cpuid 49
struct xen_domctl_cpuid {
- unsigned int input[2];
- unsigned int eax;
- unsigned int ebx;
- unsigned int ecx;
- unsigned int edx;
+ uint32_t input[2];
+ uint32_t eax;
+ uint32_t ebx;
+ uint32_t ecx;
+ uint32_t edx;
};
typedef struct xen_domctl_cpuid xen_domctl_cpuid_t;
DEFINE_XEN_GUEST_HANDLE(xen_domctl_cpuid_t);
@@ -645,6 +647,135 @@ typedef struct xen_domctl_hvmcontext_par
XEN_GUEST_HANDLE_64(uint8) buffer; /* OUT: buffer to write record into */
} xen_domctl_hvmcontext_partial_t;
DEFINE_XEN_GUEST_HANDLE(xen_domctl_hvmcontext_partial_t);
+
+#define XEN_DOMCTL_disable_migrate 58
+typedef struct xen_domctl_disable_migrate {
+ uint32_t disable; /* IN: 1: disable migration and restore */
+} xen_domctl_disable_migrate_t;
+
+
+#define XEN_DOMCTL_gettscinfo 59
+#define XEN_DOMCTL_settscinfo 60
+struct xen_guest_tsc_info {
+ uint32_t tsc_mode;
+ uint32_t gtsc_khz;
+ uint32_t incarnation;
+ uint32_t pad;
+ uint64_aligned_t elapsed_nsec;
+};
+typedef struct xen_guest_tsc_info xen_guest_tsc_info_t;
+DEFINE_XEN_GUEST_HANDLE(xen_guest_tsc_info_t);
+typedef struct xen_domctl_tsc_info {
+ XEN_GUEST_HANDLE_64(xen_guest_tsc_info_t) out_info; /* OUT */
+ xen_guest_tsc_info_t info; /* IN */
+} xen_domctl_tsc_info_t;
+
+#define XEN_DOMCTL_gdbsx_guestmemio 1000 /* guest mem io */
+struct xen_domctl_gdbsx_memio {
+ /* IN */
+ uint64_aligned_t pgd3val;/* optional: init_mm.pgd[3] value */
+ uint64_aligned_t gva; /* guest virtual address */
+ uint64_aligned_t uva; /* user buffer virtual address */
+ uint32_t len; /* number of bytes to read/write */
+ uint8_t gwr; /* 0 = read from guest. 1 = write to guest */
+ /* OUT */
+ uint32_t remain; /* bytes remaining to be copied */
+};
+
+#define XEN_DOMCTL_gdbsx_pausevcpu 1001
+#define XEN_DOMCTL_gdbsx_unpausevcpu 1002
+struct xen_domctl_gdbsx_pauseunp_vcpu { /* pause/unpause a vcpu */
+ uint32_t vcpu; /* which vcpu */
+};
+
+#define XEN_DOMCTL_gdbsx_domstatus 1003
+struct xen_domctl_gdbsx_domstatus {
+ /* OUT */
+ uint8_t paused; /* is the domain paused */
+ uint32_t vcpu_id; /* any vcpu in an event? */
+ uint32_t vcpu_ev; /* if yes, what event? */
+};
+
+/*
+ * Memory event operations
+ */
+
+#define XEN_DOMCTL_mem_event_op 56
+
+/* Add and remove memory handlers */
+#define XEN_DOMCTL_MEM_EVENT_OP_ENABLE 0
+#define XEN_DOMCTL_MEM_EVENT_OP_DISABLE 1
+
+/*
+ * Page memory in and out.
+ */
+#define XEN_DOMCTL_MEM_EVENT_OP_PAGING (1 << 0)
+
+/* Domain memory paging */
+#define XEN_DOMCTL_MEM_EVENT_OP_PAGING_NOMINATE 0
+#define XEN_DOMCTL_MEM_EVENT_OP_PAGING_EVICT 1
+#define XEN_DOMCTL_MEM_EVENT_OP_PAGING_PREP 2
+#define XEN_DOMCTL_MEM_EVENT_OP_PAGING_RESUME 3
+
+struct xen_domctl_mem_event_op {
+ uint32_t op; /* XEN_DOMCTL_MEM_EVENT_OP_* */
+ uint32_t mode; /* XEN_DOMCTL_MEM_EVENT_ENABLE_* */
+
+ /* OP_ENABLE */
+ uint64_aligned_t shared_addr; /* IN: Virtual address of shared page */
+ uint64_aligned_t ring_addr; /* IN: Virtual address of ring page */
+
+ /* Other OPs */
+ uint64_aligned_t gfn; /* IN: gfn of page being operated on */
+};
+typedef struct xen_domctl_mem_event_op xen_domctl_mem_event_op_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_mem_event_op_t);
+
+/*
+ * Memory sharing operations
+ */
+#define XEN_DOMCTL_mem_sharing_op 58
+
+#define XEN_DOMCTL_MEM_SHARING_OP_CONTROL 0
+#define XEN_DOMCTL_MEM_SHARING_OP_NOMINATE_GFN 1
+#define XEN_DOMCTL_MEM_SHARING_OP_NOMINATE_GREF 2
+#define XEN_DOMCTL_MEM_SHARING_OP_SHARE 3
+#define XEN_DOMCTL_MEM_SHARING_OP_RESUME 4
+#define XEN_DOMCTL_MEM_SHARING_OP_DEBUG_GFN 5
+#define XEN_DOMCTL_MEM_SHARING_OP_DEBUG_MFN 6
+#define XEN_DOMCTL_MEM_SHARING_OP_DEBUG_GREF 7
+
+#define XEN_DOMCTL_MEM_SHARING_S_HANDLE_INVALID (-10)
+#define XEN_DOMCTL_MEM_SHARING_C_HANDLE_INVALID (-9)
+
+struct xen_domctl_mem_sharing_op {
+ uint8_t op; /* XEN_DOMCTL_MEM_EVENT_OP_* */
+
+ union {
+ uint8_t enable; /* OP_CONTROL */
+
+ struct mem_sharing_op_nominate { /* OP_NOMINATE_xxx */
+ union {
+ uint64_aligned_t gfn; /* IN: gfn to nominate */
+ uint32_t grant_ref; /* IN: grant ref to nominate */
+ } u;
+ uint64_aligned_t handle; /* OUT: the handle */
+ } nominate;
+ struct mem_sharing_op_share { /* OP_SHARE */
+ uint64_aligned_t source_handle; /* IN: handle to the source page */
+ uint64_aligned_t client_handle; /* IN: handle to the client page */
+ } share;
+ struct mem_sharing_op_debug { /* OP_DEBUG_xxx */
+ union {
+ uint64_aligned_t gfn; /* IN: gfn to debug */
+ uint64_aligned_t mfn; /* IN: mfn to debug */
+ grant_ref_t gref; /* IN: gref to debug */
+ } u;
+ } debug;
+ } u;
+};
+typedef struct xen_domctl_mem_sharing_op xen_domctl_mem_sharing_op_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_mem_sharing_op_t);
struct xen_domctl {
@@ -672,6 +803,8 @@ struct xen_domctl {
struct xen_domctl_hypercall_init hypercall_init;
struct xen_domctl_arch_setup arch_setup;
struct xen_domctl_settimeoffset settimeoffset;
+ struct xen_domctl_disable_migrate disable_migrate;
+ struct xen_domctl_tsc_info tsc_info;
struct xen_domctl_real_mode_area real_mode_area;
struct xen_domctl_hvmcontext hvmcontext;
struct xen_domctl_hvmcontext_partial hvmcontext_partial;
@@ -688,9 +821,14 @@ struct xen_domctl {
struct xen_domctl_set_target set_target;
struct xen_domctl_subscribe subscribe;
struct xen_domctl_debug_op debug_op;
+ struct xen_domctl_mem_event_op mem_event_op;
+ struct xen_domctl_mem_sharing_op mem_sharing_op;
#if defined(__i386__) || defined(__x86_64__)
struct xen_domctl_cpuid cpuid;
#endif
+ struct xen_domctl_gdbsx_memio gdbsx_guest_memio;
+ struct xen_domctl_gdbsx_pauseunp_vcpu gdbsx_pauseunp_vcpu;
+ struct xen_domctl_gdbsx_domstatus gdbsx_domstatus;
uint8_t pad[128];
} u;
};
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/grant_table.h
--- a/include/xen/interface/grant_table.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/grant_table.h Tue Dec 22 13:30:45 2009 +0000
@@ -85,12 +85,26 @@
*/
/*
+ * Reference to a grant entry in a specified domain's grant table.
+ */
+typedef uint32_t grant_ref_t;
+
+/*
* A grant table comprises a packed array of grant entries in one or more
* page frames shared between Xen and a guest.
* [XEN]: This field is written by Xen and read by the sharing guest.
* [GST]: This field is written by the guest and read by Xen.
*/
-struct grant_entry {
+
+/*
+ * Version 1 of the grant table entry structure is maintained purely
+ * for backwards compatibility. New guests should use version 2.
+ */
+#if __XEN_INTERFACE_VERSION__ < 0x0003020a
+#define grant_entry_v1 grant_entry
+#define grant_entry_v1_t grant_entry_t
+#endif
+struct grant_entry_v1 {
/* GTF_xxx: various type and flag information. [XEN,GST] */
uint16_t flags;
/* The domain being granted foreign privileges. [GST] */
@@ -101,7 +115,7 @@ struct grant_entry {
*/
uint32_t frame;
};
-typedef struct grant_entry grant_entry_t;
+typedef struct grant_entry_v1 grant_entry_v1_t;
/*
* Type of grant entry.
@@ -109,10 +123,13 @@ typedef struct grant_entry grant_entry_t
* GTF_permit_access: Allow @domid to map/access @frame.
* GTF_accept_transfer: Allow @domid to transfer ownership of one page frame
* to this guest. Xen writes the page number to @frame.
+ * GTF_transitive: Allow @domid to transitively access a subrange of
+ * @trans_grant in @trans_domid. No mappings are allowed.
*/
#define GTF_invalid (0U<<0)
#define GTF_permit_access (1U<<0)
#define GTF_accept_transfer (2U<<0)
+#define GTF_transitive (3U<<0)
#define GTF_type_mask (3U<<0)
/*
@@ -121,6 +138,9 @@ typedef struct grant_entry grant_entry_t
* GTF_reading: Grant entry is currently mapped for reading by @domid. [XEN]
* GTF_writing: Grant entry is currently mapped for writing by @domid. [XEN]
* GTF_PAT, GTF_PWT, GTF_PCD: (x86) cache attribute flags for the grant [GST]
+ * GTF_sub_page: Grant access to only a subrange of the page. @domid
+ * will only be allowed to copy from the grant, and not
+ * map it. [GST]
*/
#define _GTF_readonly (2)
#define GTF_readonly (1U<<_GTF_readonly)
@@ -134,6 +154,8 @@ typedef struct grant_entry grant_entry_t
#define GTF_PCD (1U<<_GTF_PCD)
#define _GTF_PAT (7)
#define GTF_PAT (1U<<_GTF_PAT)
+#define _GTF_sub_page (8)
+#define GTF_sub_page (1U<<_GTF_sub_page)
/*
* Subflags for GTF_accept_transfer:
@@ -150,15 +172,87 @@ typedef struct grant_entry grant_entry_t
#define _GTF_transfer_completed (3)
#define GTF_transfer_completed (1U<<_GTF_transfer_completed)
+/*
+ * Version 2 grant table entries. These fulfil the same role as
+ * version 1 entries, but can represent more complicated operations.
+ * Any given domain will have either a version 1 or a version 2 table,
+ * and every entry in the table will be the same version.
+ *
+ * The interface by which domains use grant references does not depend
+ * on the grant table version in use by the other domain.
+ */
+#if __XEN_INTERFACE_VERSION__ >= 0x0003020a
+/*
+ * Version 1 and version 2 grant entries share a common prefix. The
+ * fields of the prefix are documented as part of struct
+ * grant_entry_v1.
+ */
+struct grant_entry_header {
+ uint16_t flags;
+ domid_t domid;
+};
+typedef struct grant_entry_header grant_entry_header_t;
+
+/*
+ * Version 2 of the grant entry structure.
+ */
+union grant_entry_v2 {
+ grant_entry_header_t hdr;
+
+ /*
+ * This member is used for V1-style full page grants, where either:
+ *
+ * -- hdr.type is GTF_accept_transfer, or
+ * -- hdr.type is GTF_permit_access and GTF_sub_page is not set.
+ *
+ * In that case, the frame field has the same semantics as the
+ * field of the same name in the V1 entry structure.
+ */
+ struct {
+ grant_entry_header_t hdr;
+ uint32_t pad0;
+ uint64_t frame;
+ } full_page;
+
+ /*
+ * If the grant type is GTF_grant_access and GTF_sub_page is set,
+ * @domid is allowed to access bytes [@page_off,@page_off+@length)
+ * in frame @frame.
+ */
+ struct {
+ grant_entry_header_t hdr;
+ uint16_t page_off;
+ uint16_t length;
+ uint64_t frame;
+ } sub_page;
+
+ /*
+ * If the grant is GTF_transitive, @domid is allowed to use the
+ * grant @gref in domain @trans_domid, as if it was the local
+ * domain. Obviously, the transitive access must be compatible
+ * with the original grant.
+ *
+ * The current version of Xen does not allow transitive grants
+ * to be mapped.
+ */
+ struct {
+ grant_entry_header_t hdr;
+ domid_t trans_domid;
+ uint16_t pad0;
+ grant_ref_t gref;
+ } transitive;
+
+ uint32_t __spacer[4]; /* Pad to a power of two */
+};
+typedef union grant_entry_v2 grant_entry_v2_t;
+
+typedef uint16_t grant_status_t;
+
+#endif /* __XEN_INTERFACE_VERSION__ */
/***********************************
* GRANT TABLE QUERIES AND USES
*/
-
-/*
- * Reference to a grant entry in a specified domain's grant table.
- */
-typedef uint32_t grant_ref_t;
/*
* Handle to track a mapping created via a grant reference.
@@ -298,8 +392,6 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_transfer_
#define GNTCOPY_source_gref (1<<_GNTCOPY_source_gref)
#define _GNTCOPY_dest_gref (1)
#define GNTCOPY_dest_gref (1<<_GNTCOPY_dest_gref)
-#define _GNTCOPY_can_fail (2)
-#define GNTCOPY_can_fail (1<<_GNTCOPY_can_fail)
#define GNTTABOP_copy 5
typedef struct gnttab_copy {
@@ -361,6 +453,63 @@ typedef struct gnttab_unmap_and_replace
typedef struct gnttab_unmap_and_replace gnttab_unmap_and_replace_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_and_replace_t);
+#if __XEN_INTERFACE_VERSION__ >= 0x0003020a
+/*
+ * GNTTABOP_set_version: Request a particular version of the grant
+ * table shared table structure. This operation can only be performed
+ * once in any given domain. It must be performed before any grants
+ * are activated; otherwise, the domain will be stuck with version 1.
+ * The only defined versions are 1 and 2.
+ */
+#define GNTTABOP_set_version 8
+struct gnttab_set_version {
+ /* IN/OUT parameters */
+ uint32_t version;
+};
+typedef struct gnttab_set_version gnttab_set_version_t;
+DEFINE_XEN_GUEST_HANDLE(gnttab_set_version_t);
+
+
+/*
+ * GNTTABOP_get_status_frames: Get the list of frames used to store grant
+ * status for <dom>. In grant format version 2, the status is separated
+ * from the other shared grant fields to allow more efficient synchronization
+ * using barriers instead of atomic cmpexch operations.
+ * <nr_frames> specify the size of vector <frame_list>.
+ * The frame addresses are returned in the <frame_list>.
+ * Only <nr_frames> addresses are returned, even if the table is larger.
+ * NOTES:
+ * 1. <dom> may be specified as DOMID_SELF.
+ * 2. Only a sufficiently-privileged domain may specify <dom> != DOMID_SELF.
+ */
+#define GNTTABOP_get_status_frames 9
+struct gnttab_get_status_frames {
+ /* IN parameters. */
+ uint32_t nr_frames;
+ domid_t dom;
+ /* OUT parameters. */
+ int16_t status; /* GNTST_* */
+ XEN_GUEST_HANDLE(uint64_t) frame_list;
+};
+typedef struct gnttab_get_status_frames gnttab_get_status_frames_t;
+DEFINE_XEN_GUEST_HANDLE(gnttab_get_status_frames_t);
+
+/*
+ * GNTTABOP_get_version: Get the grant table version which is in
+ * effect for domain <dom>.
+ */
+#define GNTTABOP_get_version 10
+struct gnttab_get_version {
+ /* IN parameters */
+ domid_t dom;
+ uint16_t pad;
+ /* OUT parameters */
+ uint32_t version;
+};
+typedef struct gnttab_get_version gnttab_get_version_t;
+DEFINE_XEN_GUEST_HANDLE(gnttab_get_version_t);
+
+#endif /* __XEN_INTERFACE_VERSION__ */
/*
* Bitfield values for gnttab_map_grant_ref.flags.
@@ -390,9 +539,6 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_and
#define _GNTMAP_contains_pte (4)
#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte)
-#define _GNTMAP_can_fail (5)
-#define GNTMAP_can_fail (1<<_GNTMAP_can_fail)
-
/*
* Bits to be placed in guest kernel available PTE bits (architecture
* dependent; only supported when XENFEAT_gnttab_map_avail_bits is set).
@@ -415,7 +561,6 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_and
#define GNTST_bad_page (-9) /* Specified page was invalid for op. */
#define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary. */
#define GNTST_address_too_big (-11) /* transfer page address too large. */
-#define GNTST_eagain (-12) /* Could not map at the moment. Retry. */
#define GNTTABOP_error_msgs { \
"okay", \
@@ -429,8 +574,7 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_and
"permission denied", \
"bad page", \
"copy arguments cross page boundary", \
- "page address size too large", \
- "could not map at the moment, retry" \
+ "page address size too large" \
}
#endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/hvm/hvm_info_table.h
--- a/include/xen/interface/hvm/hvm_info_table.h Thu Dec 17 06:37:50
2009 +0000
+++ b/include/xen/interface/hvm/hvm_info_table.h Tue Dec 22 13:30:45
2009 +0000
@@ -28,6 +28,9 @@
#define HVM_INFO_PFN 0x09F
#define HVM_INFO_OFFSET 0x800
#define HVM_INFO_PADDR ((HVM_INFO_PFN << 12) + HVM_INFO_OFFSET)
+
+/* Maximum we can support with current vLAPIC ID mapping. */
+#define HVM_MAX_VCPUS 128
struct hvm_info_table {
char signature[8]; /* "HVM INFO" */
@@ -64,6 +67,9 @@ struct hvm_info_table {
* RAM above 4GB
*/
uint32_t high_mem_pgend;
+
+ /* Bitmap of which CPUs are online at boot time. */
+ uint8_t vcpu_online[HVM_MAX_VCPUS/8];
};
#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/hvm/ioreq.h
--- a/include/xen/interface/hvm/ioreq.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/hvm/ioreq.h Tue Dec 22 13:30:45 2009 +0000
@@ -43,32 +43,24 @@
* virq
*/
struct ioreq {
- uint64_t addr; /* physical address */
- uint64_t size; /* size in bytes */
- uint64_t count; /* for rep prefixes */
- uint64_t data; /* data (or paddr of data) */
+ uint64_t addr; /* physical address */
+ uint64_t data; /* data (or paddr of data) */
+ uint32_t count; /* for rep prefixes */
+ uint32_t size; /* size in bytes */
+ uint32_t vp_eport; /* evtchn for notifications to/from device model */
+ uint16_t _pad0;
uint8_t state:4;
- uint8_t data_is_ptr:1; /* if 1, data above is the guest paddr
- * of the real data to use. */
- uint8_t dir:1; /* 1=read, 0=write */
+ uint8_t data_is_ptr:1; /* if 1, data above is the guest paddr
+ * of the real data to use. */
+ uint8_t dir:1; /* 1=read, 0=write */
uint8_t df:1;
- uint8_t pad:1;
- uint8_t type; /* I/O type */
- uint8_t _pad0[6];
- uint64_t io_count; /* How many IO done on a vcpu */
+ uint8_t _pad1:1;
+ uint8_t type; /* I/O type */
};
typedef struct ioreq ioreq_t;
-struct vcpu_iodata {
- struct ioreq vp_ioreq;
- /* Event channel port, used for notifications to/from the device model. */
- uint32_t vp_eport;
- uint32_t _pad0;
-};
-typedef struct vcpu_iodata vcpu_iodata_t;
-
struct shared_iopage {
- struct vcpu_iodata vcpu_iodata[1];
+ struct ioreq vcpu_ioreq[1];
};
typedef struct shared_iopage shared_iopage_t;
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/mem_event.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/xen/interface/mem_event.h Tue Dec 22 13:30:45 2009 +0000
@@ -0,0 +1,69 @@
+/******************************************************************************
+ * mem_event.h
+ *
+ * Memory event common structures.
+ *
+ * Copyright (c) 2009 by Citrix Systems, Inc. (Patrick Colp)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _XEN_PUBLIC_MEM_EVENT_H
+#define _XEN_PUBLIC_MEM_EVENT_H
+
+
+#include "xen.h"
+#include "io/ring.h"
+
+
+/* Memory event notification modes */
+#define MEM_EVENT_MODE_ASYNC 0
+#define MEM_EVENT_MODE_SYNC (1 << 0)
+#define MEM_EVENT_MODE_SYNC_ALL (1 << 1)
+
+/* Memory event flags */
+#define MEM_EVENT_FLAG_VCPU_PAUSED (1 << 0)
+#define MEM_EVENT_FLAG_DOM_PAUSED (1 << 1)
+#define MEM_EVENT_FLAG_OUT_OF_MEM (1 << 2)
+
+
+typedef struct mem_event_shared_page {
+ int port;
+} mem_event_shared_page_t;
+
+typedef struct mem_event_st {
+ unsigned long gfn;
+ unsigned long offset;
+ unsigned long p2mt;
+ int vcpu_id;
+ uint64_t flags;
+} mem_event_request_t, mem_event_response_t;
+
+
+DEFINE_RING_TYPES(mem_event, mem_event_request_t, mem_event_response_t);
+
+
+#endif
+
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/memory.h
--- a/include/xen/interface/memory.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/memory.h Tue Dec 22 13:30:45 2009 +0000
@@ -211,6 +211,8 @@ struct xen_add_to_physmap {
#define XENMAPSPACE_gmfn 2 /* GMFN */
unsigned int space;
+#define XENMAPIDX_grant_table_status 0x80000000
+
/* Index into source mapping space. */
xen_ulong_t idx;
@@ -279,6 +281,13 @@ struct xen_pod_target {
domid_t domid;
};
typedef struct xen_pod_target xen_pod_target_t;
+
+/*
+ * Get the number of MFNs saved through memory sharing.
+ * The call never fails.
+ */
+#define XENMEM_get_sharing_freed_pages 18
+
#endif /* __XEN_PUBLIC_MEMORY_H__ */
/*
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/physdev.h
--- a/include/xen/interface/physdev.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/physdev.h Tue Dec 22 13:30:45 2009 +0000
@@ -227,6 +227,19 @@ typedef struct physdev_op physdev_op_t;
typedef struct physdev_op physdev_op_t;
DEFINE_XEN_GUEST_HANDLE(physdev_op_t);
+#define PHYSDEVOP_setup_gsi 21
+struct physdev_setup_gsi {
+ int gsi;
+ /* IN */
+ uint8_t triggering;
+ /* IN */
+ uint8_t polarity;
+ /* IN */
+};
+
+typedef struct physdev_setup_gsi physdev_setup_gsi_t;
+DEFINE_XEN_GUEST_HANDLE(physdev_setup_gsi_t);
+
/*
* Notify that some PIRQ-bound event channels have been unmasked.
* ** This command is obsolete since interface version 0x00030202 and is **
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/platform.h
--- a/include/xen/interface/platform.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/platform.h Tue Dec 22 13:30:45 2009 +0000
@@ -312,6 +312,49 @@ typedef struct xenpf_set_processor_pminf
typedef struct xenpf_set_processor_pminfo xenpf_set_processor_pminfo_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_set_processor_pminfo_t);
+#define XENPF_get_cpuinfo 55
+struct xenpf_pcpuinfo {
+ /* IN */
+ uint32_t xen_cpuid;
+ /* OUT */
+ /* The maxium cpu_id that is present */
+ uint32_t max_present;
+#define XEN_PCPU_FLAGS_ONLINE 1
+ /* Correponding xen_cpuid is not present*/
+#define XEN_PCPU_FLAGS_INVALID 2
+ uint32_t flags;
+ uint32_t apic_id;
+ uint32_t acpi_id;
+};
+typedef struct xenpf_pcpuinfo xenpf_pcpuinfo_t;
+DEFINE_XEN_GUEST_HANDLE(xenpf_pcpuinfo_t);
+
+#define XENPF_cpu_online 56
+#define XENPF_cpu_offline 57
+struct xenpf_cpu_ol
+{
+ uint32_t cpuid;
+};
+typedef struct xenpf_cpu_ol xenpf_cpu_ol_t;
+DEFINE_XEN_GUEST_HANDLE(xenpf_cpu_ol_t);
+
+#define XENPF_cpu_hotadd 58
+struct xenpf_cpu_hotadd
+{
+ uint32_t apic_id;
+ uint32_t acpi_id;
+ uint32_t pxm;
+};
+
+#define XENPF_mem_hotadd 59
+struct xenpf_mem_hotadd
+{
+ uint64_t spfn;
+ uint64_t epfn;
+ uint32_t pxm;
+ uint32_t flags;
+};
+
struct xen_platform_op {
uint32_t cmd;
uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
@@ -327,6 +370,10 @@ struct xen_platform_op {
struct xenpf_change_freq change_freq;
struct xenpf_getidletime getidletime;
struct xenpf_set_processor_pminfo set_pminfo;
+ struct xenpf_pcpuinfo pcpu_info;
+ struct xenpf_cpu_ol cpu_ol;
+ struct xenpf_cpu_hotadd cpu_add;
+ struct xenpf_mem_hotadd mem_add;
uint8_t pad[128];
} u;
};
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/sysctl.h
--- a/include/xen/interface/sysctl.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/sysctl.h Tue Dec 22 13:30:45 2009 +0000
@@ -396,14 +396,14 @@ struct xen_sysctl_pm_op {
struct xen_get_cpufreq_para get_para;
struct xen_set_cpufreq_gov set_gov;
struct xen_set_cpufreq_para set_para;
- uint64_t get_avgfreq;
+ uint64_aligned_t get_avgfreq;
struct xen_get_cputopo get_topo;
uint32_t set_sched_opt_smt;
uint32_t get_max_cstate;
uint32_t set_max_cstate;
uint32_t get_vcpu_migration_delay;
uint32_t set_vcpu_migration_delay;
- };
+ } u;
};
#define XEN_SYSCTL_page_offline_op 14
@@ -453,6 +453,38 @@ struct xen_sysctl_page_offline_op {
#define PG_ONLINE_BROKEN PG_OFFLINE_BROKEN
#define PG_OFFLINE_OWNER_SHIFT 16
+
+#define XEN_SYSCTL_lockprof_op 15
+/* Sub-operations: */
+#define XEN_SYSCTL_LOCKPROF_reset 1 /* Reset all profile data to zero. */
+#define XEN_SYSCTL_LOCKPROF_query 2 /* Get lock profile information. */
+/* Record-type: */
+#define LOCKPROF_TYPE_GLOBAL 0 /* global lock, idx meaningless */
+#define LOCKPROF_TYPE_PERDOM 1 /* per-domain lock, idx is domid */
+#define LOCKPROF_TYPE_N 2 /* number of types */
+struct xen_sysctl_lockprof_data {
+ char name[40]; /* lock name (may include up to 2 %d specifiers) */
+ int32_t type; /* LOCKPROF_TYPE_??? */
+ int32_t idx; /* index (e.g. domain id) */
+ uint64_aligned_t lock_cnt; /* # of locking succeeded */
+ uint64_aligned_t block_cnt; /* # of wait for lock */
+ uint64_aligned_t lock_time; /* nsecs lock held */
+ uint64_aligned_t block_time; /* nsecs waited for lock */
+};
+typedef struct xen_sysctl_lockprof_data xen_sysctl_lockprof_data_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_lockprof_data_t);
+struct xen_sysctl_lockprof_op {
+ /* IN variables. */
+ uint32_t cmd; /* XEN_SYSCTL_LOCKPROF_??? */
+ uint32_t max_elem; /* size of output buffer */
+ /* OUT variables (query only). */
+ uint32_t nr_elem; /* number of elements available */
+ uint64_aligned_t time; /* nsecs of profile measurement */
+ /* profile information (or NULL) */
+ XEN_GUEST_HANDLE_64(xen_sysctl_lockprof_data_t) data;
+};
+typedef struct xen_sysctl_lockprof_op xen_sysctl_lockprof_op_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_lockprof_op_t);
struct xen_sysctl {
uint32_t cmd;
@@ -471,6 +503,7 @@ struct xen_sysctl {
struct xen_sysctl_cpu_hotplug cpu_hotplug;
struct xen_sysctl_pm_op pm_op;
struct xen_sysctl_page_offline_op page_offline;
+ struct xen_sysctl_lockprof_op lockprof_op;
uint8_t pad[128];
} u;
};
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/tmem.h
--- a/include/xen/interface/tmem.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/tmem.h Tue Dec 22 13:30:45 2009 +0000
@@ -42,15 +42,35 @@
#define TMEM_WRITE 9
#define TMEM_XCHG 10
+/* Privileged commands to HYPERVISOR_tmem_op() */
+#define TMEM_AUTH 101
+#define TMEM_RESTORE_NEW 102
+
/* Subops for HYPERVISOR_tmem_op(TMEM_CONTROL) */
-#define TMEMC_THAW 0
-#define TMEMC_FREEZE 1
-#define TMEMC_FLUSH 2
-#define TMEMC_DESTROY 3
-#define TMEMC_LIST 4
-#define TMEMC_SET_WEIGHT 5
-#define TMEMC_SET_CAP 6
-#define TMEMC_SET_COMPRESS 7
+#define TMEMC_THAW 0
+#define TMEMC_FREEZE 1
+#define TMEMC_FLUSH 2
+#define TMEMC_DESTROY 3
+#define TMEMC_LIST 4
+#define TMEMC_SET_WEIGHT 5
+#define TMEMC_SET_CAP 6
+#define TMEMC_SET_COMPRESS 7
+#define TMEMC_QUERY_FREEABLE_MB 8
+#define TMEMC_SAVE_BEGIN 10
+#define TMEMC_SAVE_GET_VERSION 11
+#define TMEMC_SAVE_GET_MAXPOOLS 12
+#define TMEMC_SAVE_GET_CLIENT_WEIGHT 13
+#define TMEMC_SAVE_GET_CLIENT_CAP 14
+#define TMEMC_SAVE_GET_CLIENT_FLAGS 15
+#define TMEMC_SAVE_GET_POOL_FLAGS 16
+#define TMEMC_SAVE_GET_POOL_NPAGES 17
+#define TMEMC_SAVE_GET_POOL_UUID 18
+#define TMEMC_SAVE_GET_NEXT_PAGE 19
+#define TMEMC_SAVE_GET_NEXT_INV 20
+#define TMEMC_SAVE_END 21
+#define TMEMC_RESTORE_BEGIN 30
+#define TMEMC_RESTORE_PUT_PAGE 32
+#define TMEMC_RESTORE_FLUSH_PAGE 33
/* Bits for HYPERVISOR_tmem_op(TMEM_NEW_POOL) */
#define TMEM_POOL_PERSIST 1
@@ -60,6 +80,10 @@
#define TMEM_POOL_VERSION_SHIFT 24
#define TMEM_POOL_VERSION_MASK 0xff
+/* Bits for client flags (save/restore) */
+#define TMEM_CLIENT_COMPRESS 1
+#define TMEM_CLIENT_FROZEN 2
+
/* Special errno values */
#define EFROZEN 1000
#define EEMPTY 1001
@@ -70,31 +94,40 @@ typedef XEN_GUEST_HANDLE(char) tmem_cli_
typedef XEN_GUEST_HANDLE(char) tmem_cli_va_t;
struct tmem_op {
uint32_t cmd;
- int32_t pool_id; /* private > 0; shared < 0; 0 is invalid */
+ int32_t pool_id;
union {
- struct { /* for cmd == TMEM_NEW_POOL */
+ struct {
uint64_t uuid[2];
uint32_t flags;
- } new;
- struct { /* for cmd == TMEM_CONTROL */
+ uint32_t arg1;
+ } new; /* for cmd == TMEM_NEW_POOL, TMEM_AUTH, TMEM_RESTORE_NEW */
+ struct {
uint32_t subop;
uint32_t cli_id;
uint32_t arg1;
uint32_t arg2;
+ uint64_t arg3;
tmem_cli_va_t buf;
- } ctrl;
+ } ctrl; /* for cmd == TMEM_CONTROL */
struct {
+
uint64_t object;
uint32_t index;
uint32_t tmem_offset;
uint32_t pfn_offset;
uint32_t len;
tmem_cli_mfn_t cmfn; /* client machine page frame */
- } gen;
+ } gen; /* for all other cmd ("generic") */
} u;
};
typedef struct tmem_op tmem_op_t;
DEFINE_XEN_GUEST_HANDLE(tmem_op_t);
+
+struct tmem_handle {
+ uint32_t pool_id;
+ uint32_t index;
+ uint64_t oid;
+};
#endif
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/vcpu.h
--- a/include/xen/interface/vcpu.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/vcpu.h Tue Dec 22 13:30:45 2009 +0000
@@ -202,6 +202,34 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_get_physid_
#define xen_vcpu_physid_to_x86_acpiid(physid) \
((((uint32_t)((physid)>>32)) >= 0xff) ? 0xff : ((uint8_t)((physid)>>32)))
+/*
+ * Register a memory location to get a secondary copy of the vcpu time
+ * parameters. The master copy still exists as part of the vcpu shared
+ * memory area, and this secondary copy is updated whenever the master copy
+ * is updated (and using the same versioning scheme for synchronisation).
+ *
+ * The intent is that this copy may be mapped (RO) into userspace so
+ * that usermode can compute system time using the time info and the
+ * tsc. Usermode will see an array of vcpu_time_info structures, one
+ * for each vcpu, and choose the right one by an existing mechanism
+ * which allows it to get the current vcpu number (such as via a
+ * segment limit). It can then apply the normal algorithm to compute
+ * system time from the tsc.
+ *
+ * @extra_arg == pointer to vcpu_register_time_info_memory_area structure.
+ */
+#define VCPUOP_register_vcpu_time_memory_area 13
+DEFINE_XEN_GUEST_HANDLE(vcpu_time_info_t);
+struct vcpu_register_time_memory_area {
+ union {
+ XEN_GUEST_HANDLE(vcpu_time_info_t) h;
+ struct vcpu_time_info *v;
+ uint64_t p;
+ } addr;
+};
+typedef struct vcpu_register_time_memory_area vcpu_register_time_memory_area_t;
+DEFINE_XEN_GUEST_HANDLE(vcpu_register_time_memory_area_t);
+
#endif /* __XEN_PUBLIC_VCPU_H__ */
/*
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/xen-compat.h
--- a/include/xen/interface/xen-compat.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/xen-compat.h Tue Dec 22 13:30:45 2009 +0000
@@ -27,7 +27,7 @@
#ifndef __XEN_PUBLIC_XEN_COMPAT_H__
#define __XEN_PUBLIC_XEN_COMPAT_H__
-#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030209
+#define __XEN_LATEST_INTERFACE_VERSION__ 0x0003020a
#if defined(__XEN__) || defined(__XEN_TOOLS__)
/* Xen is built with matching headers and implements the latest interface. */
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/xen.h
--- a/include/xen/interface/xen.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/xen.h Tue Dec 22 13:30:45 2009 +0000
@@ -47,6 +47,7 @@ __DEFINE_XEN_GUEST_HANDLE(ulong, unsigne
__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
DEFINE_XEN_GUEST_HANDLE(void);
+DEFINE_XEN_GUEST_HANDLE(uint64_t);
DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
#endif
@@ -144,6 +145,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
#define VIRQ_DEBUGGER 6 /* G. (DOM0) A domain has paused for debugging. */
#define VIRQ_XENOPROF 7 /* V. XenOprofile interrupt: new sample available */
#define VIRQ_CON_RING 8 /* G. (DOM0) Bytes received on console */
+#define VIRQ_PCPU_STATE 9 /* G. (DOM0) PCPU state changed */
+#define VIRQ_MEM_EVENT 10 /* G. (DOM0) A memory event has occured */
/* Architecture-specific VIRQ definitions. */
#define VIRQ_ARCH_0 16
@@ -158,18 +161,26 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
#define NR_VIRQS 24
/*
- * MMU-UPDATE REQUESTS
- *
- * HYPERVISOR_mmu_update() accepts a list of (ptr, val) pairs.
- * A foreigndom (FD) can be specified (or DOMID_SELF for none).
- * Where the FD has some effect, it is described below.
- * ptr[1:0] specifies the appropriate MMU_* command.
- *
+ * HYPERVISOR_mmu_update(reqs, count, pdone, foreigndom)
+ *
+ * @reqs is an array of mmu_update_t structures ((ptr, val) pairs).
+ * @count is the length of the above array.
+ * @pdone is an output parameter indicating number of completed operations
+ * @foreigndom[15:0]: FD, the expected owner of data pages referenced in this
+ * hypercall invocation. Can be DOMID_SELF.
+ * @foreigndom[31:16]: PFD, the expected owner of pagetable pages referenced
+ * in this hypercall invocation. The value of this field
+ * (x) encodes the PFD as follows:
+ * x == 0 => PFD == DOMID_SELF
+ * x != 0 => PFD == x - 1
+ *
+ * Sub-commands: ptr[1:0] specifies the appropriate MMU_* command.
+ * -------------
* ptr[1:0] == MMU_NORMAL_PT_UPDATE:
- * Updates an entry in a page table. If updating an L1 table, and the new
- * table entry is valid/present, the mapped frame must belong to the FD, if
- * an FD has been specified. If attempting to map an I/O page then the
- * caller assumes the privilege of the FD.
+ * Updates an entry in a page table belonging to PFD. If updating an L1 table,
+ * and the new table entry is valid/present, the mapped frame must belong to
+ * FD. If attempting to map an I/O page then the caller assumes the privilege
+ * of the FD.
* FD == DOMID_IO: Permit /only/ I/O mappings, at the priv level of the caller.
* FD == DOMID_XEN: Map restricted areas of Xen's heap space.
* ptr[:2] -- Machine address of the page-table entry to modify.
@@ -354,6 +365,10 @@ typedef uint16_t domid_t;
* the caller is privileged.
*/
#define DOMID_XEN (0x7FF2U)
+
+/*
+ * DOMID_COW is used as the owner of sharable pages */
+#define DOMID_COW (0x7FF3U)
/* DOMID_INVALID is used to identity invalid domid */
#define DOMID_INVALID (0x7FFFU)
@@ -458,7 +473,7 @@ typedef struct vcpu_info vcpu_info_t;
* of this structure remaining constant.
*/
struct shared_info {
- struct vcpu_info vcpu_info[MAX_VIRT_CPUS];
+ struct vcpu_info vcpu_info[XEN_LEGACY_MAX_VCPUS];
/*
* A domain can create "event channels" on which it can send and receive
@@ -574,7 +589,34 @@ typedef struct start_info start_info_t;
/* These flags are passed in the 'flags' field of start_info_t. */
#define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */
#define SIF_INITDOMAIN (1<<1) /* Is this the initial control domain? */
+#define SIF_MULTIBOOT_MOD (1<<2) /* Is mod_start a multiboot module? */
#define SIF_PM_MASK (0xFF<<8) /* reserve 1 byte for xen-pm options */
+
+/*
+ * A multiboot module is a package containing modules very similar to a
+ * multiboot module array. The only differences are:
+ * - the array of module descriptors is by convention simply at the beginning
+ * of the multiboot module,
+ * - addresses in the module descriptors are based on the beginning of the
+ * multiboot module,
+ * - the number of modules is determined by a termination descriptor that has
+ * mod_start == 0.
+ *
+ * This permits to both build it statically and reference it in a configuration
+ * file, and let the PV guest easily rebase the addresses to virtual addresses
+ * and at the same time count the number of modules.
+ */
+struct xen_multiboot_mod_list
+{
+ /* Address of first byte of the module */
+ uint32_t mod_start;
+ /* Address of last byte of the module (inclusive) */
+ uint32_t mod_end;
+ /* Address of zero-terminated command line */
+ uint32_t cmdline;
+ /* Unused, must be zero */
+ uint32_t pad;
+};
typedef struct dom0_vga_console_info {
uint8_t video_type; /* DOM0_VGA_CONSOLE_??? */
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/xsm/acm.h
--- a/include/xen/interface/xsm/acm.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/xsm/acm.h Tue Dec 22 13:30:45 2009 +0000
@@ -27,18 +27,6 @@
#define _XEN_PUBLIC_ACM_H
#include "../xen.h"
-
-/* if ACM_DEBUG defined, all hooks should
- * print a short trace message (comment it out
- * when not in testing mode )
- */
-/* #define ACM_DEBUG */
-
-#ifdef ACM_DEBUG
-# define printkd(fmt, args...) printk(fmt,## args)
-#else
-# define printkd(fmt, args...)
-#endif
/* default ssid reference value if not supplied */
#define ACM_DEFAULT_SSID 0x0
diff -r 65a7b6de9191 -r 89bb6edd1b98 include/xen/interface/xsm/flask_op.h
--- a/include/xen/interface/xsm/flask_op.h Thu Dec 17 06:37:50 2009 +0000
+++ b/include/xen/interface/xsm/flask_op.h Tue Dec 22 13:30:45 2009 +0000
@@ -31,8 +31,10 @@
#define FLASK_AVC_HASHSTATS 18
#define FLASK_AVC_CACHESTATS 19
#define FLASK_MEMBER 20
+#define FLASK_ADD_OCONTEXT 21
+#define FLASK_DEL_OCONTEXT 22
-#define FLASK_LAST FLASK_MEMBER
+#define FLASK_LAST FLASK_DEL_OCONTEXT
typedef struct flask_op {
uint32_t cmd;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|