[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] Update Xen public headers.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1282809042 -3600
# Node ID 6f7bda25a4de7a4186d65bc0e8e816b1c3664b71
# Parent  53705d74a41b4d86238e6b275893fba95fd13550
Update Xen public headers.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 include/xen/interface/arch-x86/xen-mca.h |   17 +++++++++++++++++
 include/xen/interface/domctl.h           |    5 -----
 include/xen/interface/features.h         |    6 ++++++
 include/xen/interface/hvm/hvm_op.h       |   27 +++++++++++++++++++++++++++
 include/xen/interface/hvm/params.h       |    9 ++++++++-
 include/xen/interface/io/ring.h          |   15 ++++++++++++---
 include/xen/interface/io/xs_wire.h       |    3 ++-
 include/xen/interface/mem_event.h        |   10 +++++-----
 include/xen/interface/memory.h           |    3 +++
 include/xen/interface/sched.h            |   24 ++++++++++++++++++++++++
 include/xen/interface/sysctl.h           |   28 ++++++++++++++++++----------
 include/xen/interface/trace.h            |    3 +++
 include/xen/interface/xen.h              |   18 ++++++++++++++++--
 include/xen/interface/xenoprof.h         |    3 ++-
 14 files changed, 143 insertions(+), 28 deletions(-)

diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/arch-x86/xen-mca.h
--- a/include/xen/interface/arch-x86/xen-mca.h  Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/arch-x86/xen-mca.h  Thu Aug 26 08:50:42 2010 +0100
@@ -404,6 +404,20 @@ struct xen_mc_mceinject {
        unsigned int mceinj_cpunr;      /* target processor id */
 };
 
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
+#define XEN_MC_inject_v2        6
+#define XEN_MC_INJECT_TYPE_MASK     0x7
+#define XEN_MC_INJECT_TYPE_MCE      0x0
+#define XEN_MC_INJECT_TYPE_CMCI     0x1
+
+#define XEN_MC_INJECT_CPU_BROADCAST 0x8
+
+struct xen_mc_inject_v2 {
+       uint32_t flags;
+       struct xenctl_cpumap cpumap;
+};
+#endif
+
 struct xen_mc {
     uint32_t cmd;
     uint32_t interface_version; /* XEN_MCA_INTERFACE_VERSION */
@@ -413,6 +427,9 @@ struct xen_mc {
         struct xen_mc_physcpuinfo  mc_physcpuinfo;
         struct xen_mc_msrinject    mc_msrinject;
         struct xen_mc_mceinject    mc_mceinject;
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
+        struct xen_mc_inject_v2    mc_inject_v2;
+#endif
     } u;
 };
 typedef struct xen_mc xen_mc_t;
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/domctl.h
--- a/include/xen/interface/domctl.h    Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/domctl.h    Thu Aug 26 08:50:42 2010 +0100
@@ -36,11 +36,6 @@
 #include "grant_table.h"
 
 #define XEN_DOMCTL_INTERFACE_VERSION 0x00000007
-
-struct xenctl_cpumap {
-    XEN_GUEST_HANDLE_64(uint8) bitmap;
-    uint32_t nr_cpus;
-};
 
 /*
  * NB. xen_domctl.domain is an IN/OUT parameter for this operation.
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/features.h
--- a/include/xen/interface/features.h  Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/features.h  Thu Aug 26 08:50:42 2010 +0100
@@ -68,6 +68,12 @@
  */
 #define XENFEAT_gnttab_map_avail_bits      7
 
+/* x86: Does this Xen host support the HVM callback vector type? */
+#define XENFEAT_hvm_callback_vector        8
+
+/* x86: pvclock algorithm is safe to use on HVM */
+#define XENFEAT_hvm_safe_pvclock           9
+
 #define XENFEAT_NR_SUBMAPS 1
 
 #endif /* __XEN_PUBLIC_FEATURES_H__ */
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/hvm/hvm_op.h
--- a/include/xen/interface/hvm/hvm_op.h        Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/hvm/hvm_op.h        Thu Aug 26 08:50:42 2010 +0100
@@ -22,6 +22,7 @@
 #define __XEN_PUBLIC_HVM_HVM_OP_H__
 
 #include "../xen.h"
+#include "../trace.h"
 
 /* Get/set subcommands: extra argument == pointer to xen_hvm_param struct. */
 #define HVMOP_set_param           0
@@ -127,6 +128,32 @@ typedef struct xen_hvm_set_mem_type xen_
 typedef struct xen_hvm_set_mem_type xen_hvm_set_mem_type_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_set_mem_type_t);
 
+/* Hint from PV drivers for pagetable destruction. */
+#define HVMOP_pagetable_dying        9
+struct xen_hvm_pagetable_dying {
+    /* Domain with a pagetable about to be destroyed. */
+    domid_t  domid;
+    /* guest physical address of the toplevel pagetable dying */
+    uint64_aligned_t gpa;
+};
+typedef struct xen_hvm_pagetable_dying xen_hvm_pagetable_dying_t;
+DEFINE_XEN_GUEST_HANDLE(xen_hvm_pagetable_dying_t);
+
+/* Get the current Xen time, in nanoseconds since system boot. */
+#define HVMOP_get_time              10
+struct xen_hvm_get_time {
+    uint64_t now;      /* OUT */
+};
+typedef struct xen_hvm_get_time xen_hvm_get_time_t;
+DEFINE_XEN_GUEST_HANDLE(xen_hvm_get_time_t);
+
+#define HVMOP_xentrace              11
+struct xen_hvm_xentrace {
+    uint16_t event, extra_bytes;
+    uint8_t extra[TRACE_EXTRA_MAX * sizeof(uint32_t)];
+};
+typedef struct xen_hvm_xentrace xen_hvm_xentrace_t;
+DEFINE_XEN_GUEST_HANDLE(xen_hvm_xentrace_t);
 
 #endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
 
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/hvm/params.h
--- a/include/xen/interface/hvm/params.h        Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/hvm/params.h        Thu Aug 26 08:50:42 2010 +0100
@@ -33,6 +33,9 @@
  * val[63:56] == 1: val[55:0] is a delivery PCI INTx line, as follows:
  *                  Domain = val[47:32], Bus  = val[31:16],
  *                  DevFn  = val[15: 8], IntX = val[ 1: 0]
+ * val[63:56] == 2: val[7:0] is a vector number, check for
+ *                  XENFEAT_hvm_callback_vector to know if this delivery
+ *                  method is available.
  * If val == 0 then CPU0 event-channel notifications are not delivered.
  */
 #define HVM_PARAM_CALLBACK_IRQ 0
@@ -106,6 +109,10 @@
 /* Boolean: Enable aligning all periodic vpts to reduce interrupts */
 #define HVM_PARAM_VPT_ALIGN    16
 
-#define HVM_NR_PARAMS          17
+/* Console debug shared memory ring and event channel */
+#define HVM_PARAM_CONSOLE_PFN    17
+#define HVM_PARAM_CONSOLE_EVTCHN 18
+
+#define HVM_NR_PARAMS          19
 
 #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/io/ring.h
--- a/include/xen/interface/io/ring.h   Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/io/ring.h   Thu Aug 26 08:50:42 2010 +0100
@@ -103,8 +103,16 @@ struct __name##_sring {                 
 struct __name##_sring {                                                 \
     RING_IDX req_prod, req_event;                                       \
     RING_IDX rsp_prod, rsp_event;                                       \
-    uint8_t  netfront_smartpoll_active;                                 \
-    uint8_t  pad[47];                                                   \
+    union {                                                             \
+        struct {                                                        \
+            uint8_t smartpoll_active;                                   \
+        } netif;                                                        \
+        struct {                                                        \
+            uint8_t msg;                                                \
+        } tapif_user;                                                   \
+        uint8_t pvt_pad[4];                                             \
+    } private;                                                          \
+    uint8_t __pad[44];                                                  \
     union __name##_sring_entry ring[1]; /* variable-length */           \
 };                                                                      \
                                                                         \
@@ -148,7 +156,8 @@ typedef struct __name##_back_ring __name
 #define SHARED_RING_INIT(_s) do {                                       \
     (_s)->req_prod  = (_s)->rsp_prod  = 0;                              \
     (_s)->req_event = (_s)->rsp_event = 1;                              \
-    (void)memset((_s)->pad, 0, sizeof((_s)->pad));                      \
+    (void)memset((_s)->private.pvt_pad, 0, sizeof((_s)->private.pvt_pad)); \
+    (void)memset((_s)->__pad, 0, sizeof((_s)->__pad));                  \
 } while(0)
 
 #define FRONT_RING_INIT(_r, _s, __size) do {                            \
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/io/xs_wire.h
--- a/include/xen/interface/io/xs_wire.h        Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/io/xs_wire.h        Thu Aug 26 08:50:42 2010 +0100
@@ -47,7 +47,8 @@ enum xsd_sockmsg_type
     XS_ERROR,
     XS_IS_DOMAIN_INTRODUCED,
     XS_RESUME,
-    XS_SET_TARGET
+    XS_SET_TARGET,
+    XS_RESTRICT
 };
 
 #define XS_WRITE_NONE "NONE"
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/mem_event.h
--- a/include/xen/interface/mem_event.h Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/mem_event.h Thu Aug 26 08:50:42 2010 +0100
@@ -40,14 +40,14 @@
 
 
 typedef struct mem_event_shared_page {
-    int port;
+    uint32_t 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 gfn;
+    uint64_t offset;
+    uint32_t p2mt;
+    int32_t vcpu_id;
     uint64_t flags;
 } mem_event_request_t, mem_event_response_t;
 
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/memory.h
--- a/include/xen/interface/memory.h    Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/memory.h    Thu Aug 26 08:50:42 2010 +0100
@@ -52,6 +52,9 @@
 #define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
 /* Flag to populate physmap with populate-on-demand entries */
 #define XENMEMF_populate_on_demand (1<<16)
+/* Flag to request allocation only from the node specified */
+#define XENMEMF_exact_node_request  (1<<17)
+#define XENMEMF_exact_node(n) (XENMEMF_node(n) | XENMEMF_exact_node_request)
 #endif
 
 struct xen_memory_reservation {
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/sched.h
--- a/include/xen/interface/sched.h     Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/sched.h     Thu Aug 26 08:50:42 2010 +0100
@@ -99,6 +99,29 @@ DEFINE_XEN_GUEST_HANDLE(sched_remote_shu
 DEFINE_XEN_GUEST_HANDLE(sched_remote_shutdown_t);
 
 /*
+ * Latch a shutdown code, so that when the domain later shuts down it
+ * reports this code to the control tools.
+ * @arg == as for SCHEDOP_shutdown.
+ */
+#define SCHEDOP_shutdown_code 5
+
+/*
+ * Setup, poke and destroy a domain watchdog timer.
+ * @arg == pointer to sched_watchdog structure.
+ * With id == 0, setup a domain watchdog timer to cause domain shutdown
+ *               after timeout, returns watchdog id.
+ * With id != 0 and timeout == 0, destroy domain watchdog timer.
+ * With id != 0 and timeout != 0, poke watchdog timer and set new timeout.
+ */
+#define SCHEDOP_watchdog    6
+struct sched_watchdog {
+    uint32_t id;                /* watchdog ID */
+    uint32_t timeout;           /* timeout */
+};
+typedef struct sched_watchdog sched_watchdog_t;
+DEFINE_XEN_GUEST_HANDLE(sched_watchdog_t);
+
+/*
  * Reason codes for SCHEDOP_shutdown. These may be interpreted by control
  * software to determine the appropriate action. For the most part, Xen does
  * not care about the shutdown code.
@@ -107,6 +130,7 @@ DEFINE_XEN_GUEST_HANDLE(sched_remote_shu
 #define SHUTDOWN_reboot     1  /* Clean up, kill, and then restart.          */
 #define SHUTDOWN_suspend    2  /* Clean up, save suspend info, kill.         */
 #define SHUTDOWN_crash      3  /* Tell controller we've crashed.             */
+#define SHUTDOWN_watchdog   4  /* Restart because watchdog time expired.     */
 
 #endif /* __XEN_PUBLIC_SCHED_H__ */
 
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/sysctl.h
--- a/include/xen/interface/sysctl.h    Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/sysctl.h    Thu Aug 26 08:50:42 2010 +0100
@@ -93,8 +93,10 @@ struct xen_sysctl_physinfo {
 struct xen_sysctl_physinfo {
     uint32_t threads_per_core;
     uint32_t cores_per_socket;
-    uint32_t nr_cpus, max_cpu_id;
-    uint32_t nr_nodes, max_node_id;
+    uint32_t nr_cpus;     /* # CPUs currently online */
+    uint32_t max_cpu_id;  /* Largest possible CPU ID on this host */
+    uint32_t nr_nodes;    /* # nodes currently online */
+    uint32_t max_node_id; /* Largest possible node ID on this host */
     uint32_t cpu_khz;
     uint64_aligned_t total_pages;
     uint64_aligned_t free_pages;
@@ -223,6 +225,11 @@ struct pm_cx_stat {
     uint64_aligned_t idle_time;                 /* idle time from boot */
     XEN_GUEST_HANDLE_64(uint64) triggers;    /* Cx trigger counts */
     XEN_GUEST_HANDLE_64(uint64) residencies; /* Cx residencies */
+    uint64_aligned_t pc3;
+    uint64_aligned_t pc6;
+    uint64_aligned_t pc7;
+    uint64_aligned_t cc3;
+    uint64_aligned_t cc6;
 };
 
 struct xen_sysctl_get_pmstat {
@@ -463,17 +470,17 @@ struct xen_sysctl_topologyinfo {
      * IN: maximum addressable entry in the caller-provided arrays.
      * OUT: largest cpu identifier in the system.
      * If OUT is greater than IN then the arrays are truncated!
+     * If OUT is leass than IN then the array tails are not written by sysctl.
      */
     uint32_t max_cpu_index;
 
     /*
-     * If not NULL, this array is filled with core/socket/node identifier for 
-     * each cpu.
+     * If not NULL, these arrays are filled with core/socket/node identifier
+     * for each cpu.
      * If a cpu has no core/socket/node information (e.g., cpu not present) 
-     * then the sentinel value ~0u is written.
-     * The size of this array is specified by the caller in @max_cpu_index.
-     * If the actual @max_cpu_index is smaller than the array then the trailing
-     * elements of the array will not be written by the sysctl.
+     * then the sentinel value ~0u is written to each array.
+     * The number of array elements written by the sysctl is:
+     *   min(@max_cpu_index_IN,@max_cpu_index_OUT)+1
      */
     XEN_GUEST_HANDLE_64(uint32) cpu_to_core;
     XEN_GUEST_HANDLE_64(uint32) cpu_to_socket;
@@ -540,8 +547,9 @@ DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpupo
 #define XEN_SYSCTL_SCHEDOP_putinfo 0
 #define XEN_SYSCTL_SCHEDOP_getinfo 1
 struct xen_sysctl_scheduler_op {
-    uint32_t sched_id;  /* XEN_SCHEDULER_* (domctl.h) */
-    uint32_t cmd;       /* XEN_SYSCTL_SCHEDOP_* */
+    uint32_t cpupool_id; /* Cpupool whose scheduler is to be targetted. */
+    uint32_t sched_id;   /* XEN_SCHEDULER_* (domctl.h) */
+    uint32_t cmd;        /* XEN_SYSCTL_SCHEDOP_* */
     union {
     } u;
 };
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/trace.h
--- a/include/xen/interface/trace.h     Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/trace.h     Thu Aug 26 08:50:42 2010 +0100
@@ -39,6 +39,7 @@
 #define TRC_PV       0x0020f000    /* Xen PV traces            */
 #define TRC_SHADOW   0x0040f000    /* Xen shadow tracing       */
 #define TRC_PM       0x0080f000    /* Xen power management trace */
+#define TRC_GUEST    0x0800f000    /* Guest-generated traces   */
 #define TRC_ALL      0x0ffff000
 #define TRC_HD_TO_EVENT(x) ((x)&0x0fffffff)
 #define TRC_HD_CYCLE_FLAG (1UL<<31)
@@ -79,6 +80,7 @@
 #define TRC_SCHED_DOM_TIMER_FN   (TRC_SCHED_VERBOSE + 13)
 #define TRC_SCHED_SWITCH_INFPREV (TRC_SCHED_VERBOSE + 14)
 #define TRC_SCHED_SWITCH_INFNEXT (TRC_SCHED_VERBOSE + 15)
+#define TRC_SCHED_SHUTDOWN_CODE  (TRC_SCHED_VERBOSE + 16)
 
 #define TRC_MEM_PAGE_GRANT_MAP      (TRC_MEM + 1)
 #define TRC_MEM_PAGE_GRANT_UNMAP    (TRC_MEM + 2)
@@ -155,6 +157,7 @@
 #define TRC_HVM_CLTS            (TRC_HVM_HANDLER + 0x18)
 #define TRC_HVM_LMSW            (TRC_HVM_HANDLER + 0x19)
 #define TRC_HVM_LMSW64          (TRC_HVM_HANDLER + TRC_64_FLAG + 0x19)
+#define TRC_HVM_RDTSC           (TRC_HVM_HANDLER + 0x1a)
 #define TRC_HVM_INTR_WINDOW     (TRC_HVM_HANDLER + 0x20)
 #define TRC_HVM_NPF             (TRC_HVM_HANDLER + 0x21)
 
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/xen.h
--- a/include/xen/interface/xen.h       Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/xen.h       Thu Aug 26 08:50:42 2010 +0100
@@ -254,6 +254,9 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
  * cmd: MMUEXT_COPY_PAGE
  * mfn: Machine frame number of the destination page.
  * src_mfn: Machine frame number of the source page.
+ *
+ * cmd: MMUEXT_[UN]MARK_SUPER
+ * mfn: Machine frame number of head of superpage to be [un]marked.
  */
 #define MMUEXT_PIN_L1_TABLE      0
 #define MMUEXT_PIN_L2_TABLE      1
@@ -273,13 +276,15 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 #define MMUEXT_CLEAR_PAGE       16
 #define MMUEXT_COPY_PAGE        17
 #define MMUEXT_FLUSH_CACHE_GLOBAL 18
+#define MMUEXT_MARK_SUPER       19
+#define MMUEXT_UNMARK_SUPER     20
 
 #ifndef __ASSEMBLY__
 struct mmuext_op {
     unsigned int cmd;
     union {
         /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR
-         * CLEAR_PAGE, COPY_PAGE */
+         * CLEAR_PAGE, COPY_PAGE, [UN]MARK_SUPER */
         xen_pfn_t     mfn;
         /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
         unsigned long linear_addr;
@@ -685,13 +690,22 @@ __DEFINE_XEN_GUEST_HANDLE(uint64, uint64
 
 /* Default definitions for macros used by domctl/sysctl. */
 #if defined(__XEN__) || defined(__XEN_TOOLS__)
+
 #ifndef uint64_aligned_t
 #define uint64_aligned_t uint64_t
 #endif
 #ifndef XEN_GUEST_HANDLE_64
 #define XEN_GUEST_HANDLE_64(name) XEN_GUEST_HANDLE(name)
 #endif
-#endif
+
+#ifndef __ASSEMBLY__
+struct xenctl_cpumap {
+    XEN_GUEST_HANDLE_64(uint8) bitmap;
+    uint32_t nr_cpus;
+};
+#endif
+
+#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
 
 #endif /* __XEN_PUBLIC_XEN_H__ */
 
diff -r 53705d74a41b -r 6f7bda25a4de include/xen/interface/xenoprof.h
--- a/include/xen/interface/xenoprof.h  Tue Aug 10 15:47:41 2010 +0100
+++ b/include/xen/interface/xenoprof.h  Thu Aug 26 08:50:42 2010 +0100
@@ -50,10 +50,10 @@
 #define XENOPROF_shutdown           13
 #define XENOPROF_get_buffer         14
 #define XENOPROF_set_backtrace      15
+
 /* AMD IBS support */
 #define XENOPROF_get_ibs_caps       16
 #define XENOPROF_ibs_counter        17
-
 #define XENOPROF_last_op            17
 
 #define MAX_OPROF_EVENTS    32
@@ -138,6 +138,7 @@ struct xenoprof_ibs_counter {
 };
 typedef struct xenoprof_ibs_counter xenoprof_ibs_counter_t;
 DEFINE_XEN_GUEST_HANDLE(xenoprof_ibs_counter_t);
+
 #endif /* __XEN_PUBLIC_XENOPROF_H__ */
 
 /*

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.