]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
Sync Xen public headers with xen-unstable tip.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 31 Mar 2008 17:07:41 +0000 (18:07 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 31 Mar 2008 17:07:41 +0000 (18:07 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 files changed:
include/xen/interface/arch-ia64.h
include/xen/interface/arch-ia64/sioemu.h [new file with mode: 0644]
include/xen/interface/arch-powerpc.h
include/xen/interface/arch-x86/hvm/save.h
include/xen/interface/arch-x86/xen-x86_64.h
include/xen/interface/arch-x86/xen.h
include/xen/interface/domctl.h
include/xen/interface/hvm/ioreq.h
include/xen/interface/hvm/params.h
include/xen/interface/hvm/save.h
include/xen/interface/io/ring.h
include/xen/interface/io/xs_wire.h
include/xen/interface/kexec.h
include/xen/interface/physdev.h
include/xen/interface/trace.h
include/xen/interface/xen-compat.h
include/xen/interface/xen.h

index e4cf73fc17e9dbcdd37c9b703ed907ac723e4ed3..43ca979cf6e79cad57e375f62709673a60ea09a4 100644 (file)
  *
  */
 
+#include "xen.h"
+
 #ifndef __HYPERVISOR_IF_IA64_H__
 #define __HYPERVISOR_IF_IA64_H__
 
+#if !defined(__GNUC__) || defined(__STRICT_ANSI__)
+#error "Anonymous structs/unions are a GNU extension."
+#endif
+
 /* Structural guest handles introduced in 0x00030201. */
 #if __XEN_INTERFACE_VERSION__ >= 0x00030201
 #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
diff --git a/include/xen/interface/arch-ia64/sioemu.h b/include/xen/interface/arch-ia64/sioemu.h
new file mode 100644 (file)
index 0000000..c34d6ec
--- /dev/null
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * sioemu.h
+ *
+ * Copyright (c) 2008 Tristan Gingold <tgingold@free.fr>
+ *
+ * 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_IA64_SIOEMU_H__
+#define __XEN_PUBLIC_IA64_SIOEMU_H__
+
+/* Defines the callback entry point.  r8=ip, r9=data.
+   Must be called per-vcpu.  */
+#define SIOEMU_HYPERCALL_SET_CALLBACK 0x01
+
+/* Finish sioemu fw initialization and start firmware.  r8=ip.  */
+#define SIOEMU_HYPERCALL_START_FW 0x02
+
+/* Add IO pages in physmap.  */
+#define SIOEMU_HYPERCALL_ADD_IO_PHYSMAP 0x03
+
+/* Get wallclock time.  */
+#define SIOEMU_HYPERCALL_GET_TIME 0x04
+
+/* Return from callback.  r16=0.
+   Unmask vcpu events.  */
+#define SIOEMU_HYPERPRIVOP_CALLBACK_RETURN 0x01
+
+#endif /* __XEN_PUBLIC_IA64_SIOEMU_H__ */
index be668baec2d6cee7ef76d771bc8f439ed2025530..d92532f3ce1839be64187324217e8e1052c47f6f 100644 (file)
@@ -22,6 +22,8 @@
  * Authors: Hollis Blanchard <hollisb@us.ibm.com>
  */
 
+#include "xen.h"
+
 #ifndef __XEN_PUBLIC_ARCH_PPC_64_H__
 #define __XEN_PUBLIC_ARCH_PPC_64_H__
 
index a2b41f03b3e87bcc89e86a9356ada18cc78fb931..73b390998e5643e241867dd98864f8dfdf3a2837 100644 (file)
@@ -271,8 +271,7 @@ struct hvm_hw_lapic {
 DECLARE_HVM_SAVE_TYPE(LAPIC, 5, struct hvm_hw_lapic);
 
 struct hvm_hw_lapic_regs {
-    /* A 4k page of register state */
-    uint8_t  data[0x400];
+    uint8_t data[1024];
 };
 
 DECLARE_HVM_SAVE_TYPE(LAPIC_REGS, 6, struct hvm_hw_lapic_regs);
index 843c0bbbdc109c7b2d18a8f6f3e0940061957375..1e54cf92a746118ea207fa03c60a692579b301af 100644 (file)
@@ -140,7 +140,7 @@ struct iret_context {
     /* Bottom of iret stack frame. */
 };
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 /* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
 #define __DECL_REG(name) union { \
     uint64_t r ## name, e ## name; \
index 0638901b1fa32fdb236560b092997b4517d5e9e7..5f7579aab1ee35df4d258b3fef2997baa37115f4 100644 (file)
@@ -24,6 +24,8 @@
  * Copyright (c) 2004-2006, K A Fraser
  */
 
+#include "../xen.h"
+
 #ifndef __XEN_PUBLIC_ARCH_X86_XEN_H__
 #define __XEN_PUBLIC_ARCH_X86_XEN_H__
 
index a0d3673af8685dc04618de9e10b4909a1c7f3398..cfaa027357464d2f5f661dce0d1a1a8c19611411 100644 (file)
@@ -53,6 +53,9 @@ struct xen_domctl_createdomain {
  /* Is this an HVM guest (as opposed to a PV guest)? */
 #define _XEN_DOMCTL_CDF_hvm_guest 0
 #define XEN_DOMCTL_CDF_hvm_guest  (1U<<_XEN_DOMCTL_CDF_hvm_guest)
+ /* Use hardware-assisted paging if available? */
+#define _XEN_DOMCTL_CDF_hap       1
+#define XEN_DOMCTL_CDF_hap        (1U<<_XEN_DOMCTL_CDF_hap)
     uint32_t flags;
 };
 typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
@@ -373,6 +376,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_hypercall_init_t);
 #define XEN_DOMAINSETUP_hvm_guest  (1UL<<_XEN_DOMAINSETUP_hvm_guest)
 #define _XEN_DOMAINSETUP_query 1 /* Get parameters (for save)  */
 #define XEN_DOMAINSETUP_query  (1UL<<_XEN_DOMAINSETUP_query)
+#define _XEN_DOMAINSETUP_sioemu_guest 2
+#define XEN_DOMAINSETUP_sioemu_guest  (1UL<<_XEN_DOMAINSETUP_sioemu_guest)
 typedef struct xen_domctl_arch_setup {
     uint64_aligned_t flags;  /* XEN_DOMAINSETUP_* */
 #ifdef __ia64__
@@ -436,6 +441,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_sendtrigger_t);
 /* Assign PCI device to HVM guest. Sets up IOMMU structures. */
 #define XEN_DOMCTL_assign_device      37
 #define XEN_DOMCTL_test_assign_device 45
+#define XEN_DOMCTL_deassign_device 47
 struct xen_domctl_assign_device {
     uint32_t  machine_bdf;   /* machine PCI ID of assigned device */
 };
@@ -445,6 +451,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_assign_device_t);
 
 /* Pass-through interrupts: bind real irq -> hvm devfn. */
 #define XEN_DOMCTL_bind_pt_irq       38
+#define XEN_DOMCTL_unbind_pt_irq     48
 typedef enum pt_irq_type_e {
     PT_IRQ_TYPE_PCI,
     PT_IRQ_TYPE_ISA
@@ -554,6 +561,17 @@ struct xen_domctl_set_opt_feature {
 typedef struct xen_domctl_set_opt_feature xen_domctl_set_opt_feature_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_opt_feature_t);
 
+/*
+ * Set the target domain for a domain
+ */
+#define XEN_DOMCTL_set_target    46
+struct xen_domctl_set_target {
+    domid_t target;
+};
+typedef struct xen_domctl_set_target xen_domctl_set_target_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_target_t);
+
+
 struct xen_domctl {
     uint32_t cmd;
     uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */
@@ -590,6 +608,7 @@ struct xen_domctl {
         struct xen_domctl_pin_mem_cacheattr pin_mem_cacheattr;
         struct xen_domctl_ext_vcpucontext   ext_vcpucontext;
         struct xen_domctl_set_opt_feature   set_opt_feature;
+        struct xen_domctl_set_target        set_target;
         uint8_t                             pad[128];
     } u;
 };
index e14d5a92915e14c235e333384cb4a1265f26fec3..5b6873074c4c0cb3497db5a6b3161ccd74bc3c91 100644 (file)
 
 #define IOREQ_TYPE_PIO          0 /* pio */
 #define IOREQ_TYPE_COPY         1 /* mmio ops */
-#define IOREQ_TYPE_AND          2
-#define IOREQ_TYPE_OR           3
-#define IOREQ_TYPE_XOR          4
-#define IOREQ_TYPE_XCHG         5
-#define IOREQ_TYPE_ADD          6
 #define IOREQ_TYPE_TIMEOFFSET   7
 #define IOREQ_TYPE_INVALIDATE   8 /* mapcache */
-#define IOREQ_TYPE_SUB          9
 
 /*
  * VMExit dispatcher should cooperate with instruction decoder to
@@ -114,11 +108,11 @@ struct buffered_piopage {
 };
 #endif /* defined(__ia64__) */
 
-#if defined(__i386__) || defined(__x86_64__)
 #define ACPI_PM1A_EVT_BLK_ADDRESS           0x0000000000001f40
 #define ACPI_PM1A_CNT_BLK_ADDRESS           (ACPI_PM1A_EVT_BLK_ADDRESS + 0x04)
 #define ACPI_PM_TMR_BLK_ADDRESS             (ACPI_PM1A_EVT_BLK_ADDRESS + 0x08)
-#endif /* defined(__i386__) || defined(__x86_64__) */
+#define ACPI_GPE0_BLK_ADDRESS               (ACPI_PM_TMR_BLK_ADDRESS + 0x20)
+#define ACPI_GPE0_BLK_LEN                   0x08
 
 #endif /* _IOREQ_H_ */
 
index 486499816d7247d86a01ba35646af287a3b2c4f5..aad2196db3ab0f56c00d24f5031c1c3247ef4aff 100644 (file)
@@ -81,6 +81,9 @@
 #define HVMPTM_no_missed_ticks_pending   2
 #define HVMPTM_one_missed_tick_pending   3
 
-#define HVM_NR_PARAMS          11
+/* Boolean: Enable virtual HPET (high-precision event timer)? (x86-only) */
+#define HVM_PARAM_HPET_ENABLED 11
+
+#define HVM_NR_PARAMS          12
 
 #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
index 3ffe182a506b1ac6f59d3b15dd05270e2a783760..d45f0c1115cabb97fbda6b160ea827c0e383e3e3 100644 (file)
  * Internal mechanisms should be kept in Xen-private headers.
  */
 
+#if !defined(__GNUC__) || defined(__STRICT_ANSI__)
+#error "Anonymous structs/unions are a GNU extension."
+#endif
+
 /* 
  * Each entry is preceded by a descriptor giving its type and length
  */
index 355eba55452935785534cc3b1bfc7be1dbead478..6ce1d0d485fc884824be4951fcc23be9d6d8dafe 100644 (file)
 #ifndef __XEN_PUBLIC_IO_RING_H__
 #define __XEN_PUBLIC_IO_RING_H__
 
+#include "../xen-compat.h"
+
+#if __XEN_INTERFACE_VERSION__ < 0x00030208
+#define xen_mb()  mb()
+#define xen_rmb() rmb()
+#define xen_wmb() wmb()
+#endif
+
 typedef unsigned int RING_IDX;
 
 /* Round a 32-bit unsigned constant down to the nearest power of two. */
@@ -211,12 +219,12 @@ typedef struct __name##_back_ring __name##_back_ring_t
     (((_cons) - (_r)->rsp_prod_pvt) >= RING_SIZE(_r))
 
 #define RING_PUSH_REQUESTS(_r) do {                                     \
-    wmb(); /* back sees requests /before/ updated producer index */     \
+    xen_wmb(); /* back sees requests /before/ updated producer index */ \
     (_r)->sring->req_prod = (_r)->req_prod_pvt;                         \
 } while (0)
 
 #define RING_PUSH_RESPONSES(_r) do {                                    \
-    wmb(); /* front sees responses /before/ updated producer index */   \
+    xen_wmb(); /* front sees resps /before/ updated producer index */   \
     (_r)->sring->rsp_prod = (_r)->rsp_prod_pvt;                         \
 } while (0)
 
@@ -253,9 +261,9 @@ typedef struct __name##_back_ring __name##_back_ring_t
 #define RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(_r, _notify) do {           \
     RING_IDX __old = (_r)->sring->req_prod;                             \
     RING_IDX __new = (_r)->req_prod_pvt;                                \
-    wmb(); /* back sees requests /before/ updated producer index */     \
+    xen_wmb(); /* back sees requests /before/ updated producer index */ \
     (_r)->sring->req_prod = __new;                                      \
-    mb(); /* back sees new requests /before/ we check req_event */      \
+    xen_mb(); /* back sees new requests /before/ we check req_event */  \
     (_notify) = ((RING_IDX)(__new - (_r)->sring->req_event) <           \
                  (RING_IDX)(__new - __old));                            \
 } while (0)
@@ -263,9 +271,9 @@ typedef struct __name##_back_ring __name##_back_ring_t
 #define RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(_r, _notify) do {          \
     RING_IDX __old = (_r)->sring->rsp_prod;                             \
     RING_IDX __new = (_r)->rsp_prod_pvt;                                \
-    wmb(); /* front sees responses /before/ updated producer index */   \
+    xen_wmb(); /* front sees resps /before/ updated producer index */   \
     (_r)->sring->rsp_prod = __new;                                      \
-    mb(); /* front sees new responses /before/ we check rsp_event */    \
+    xen_mb(); /* front sees new resps /before/ we check rsp_event */    \
     (_notify) = ((RING_IDX)(__new - (_r)->sring->rsp_event) <           \
                  (RING_IDX)(__new - __old));                            \
 } while (0)
@@ -274,7 +282,7 @@ typedef struct __name##_back_ring __name##_back_ring_t
     (_work_to_do) = RING_HAS_UNCONSUMED_REQUESTS(_r);                   \
     if (_work_to_do) break;                                             \
     (_r)->sring->req_event = (_r)->req_cons + 1;                        \
-    mb();                                                               \
+    xen_mb();                                                           \
     (_work_to_do) = RING_HAS_UNCONSUMED_REQUESTS(_r);                   \
 } while (0)
 
@@ -282,7 +290,7 @@ typedef struct __name##_back_ring __name##_back_ring_t
     (_work_to_do) = RING_HAS_UNCONSUMED_RESPONSES(_r);                  \
     if (_work_to_do) break;                                             \
     (_r)->sring->rsp_event = (_r)->rsp_cons + 1;                        \
-    mb();                                                               \
+    xen_mb();                                                           \
     (_work_to_do) = RING_HAS_UNCONSUMED_RESPONSES(_r);                  \
 } while (0)
 
index 3994b11fdfd75f179dcb0cf894c240d26d0e4ea5..103909351613f3aaac9097d63814048ac5e2f53d 100644 (file)
@@ -46,7 +46,8 @@ enum xsd_sockmsg_type
     XS_WATCH_EVENT,
     XS_ERROR,
     XS_IS_DOMAIN_INTRODUCED,
-    XS_RESUME
+    XS_RESUME,
+    XS_SET_TARGET
 };
 
 #define XS_WRITE_NONE "NONE"
index 06a9a278ad2817974ee39449aebe74d4c7bfb897..fbad3606ac27a86f3bad2ecce0fd1c98db00513f 100644 (file)
@@ -130,10 +130,10 @@ typedef struct xen_kexec_load {
 #define KEXEC_RANGE_MA_XEN        1 /* machine address and size of Xen itself */
 #define KEXEC_RANGE_MA_CPU        2 /* machine address and size of a CPU note */
 #define KEXEC_RANGE_MA_XENHEAP    3 /* machine address and size of xenheap
-                                    * Note that although this is adjacent
-                                    * to Xen it exists in a separate EFI
-                                    * region on ia64, and thus needs to be
-                                    * inserted into iomem_machine separately */
+                                     * Note that although this is adjacent
+                                     * to Xen it exists in a separate EFI
+                                     * region on ia64, and thus needs to be
+                                     * inserted into iomem_machine separately */
 #define KEXEC_RANGE_MA_BOOT_PARAM 4 /* machine address and size of
                                      * the ia64_boot_param */
 #define KEXEC_RANGE_MA_EFI_MEMMAP 5 /* machine address and size of
index c5d1ebd5190e45c95d9de2817ce46b6e647e9d4b..75990545b2dd467b32195ebb8f79d5cd13a1ace0 100644 (file)
@@ -81,7 +81,11 @@ DEFINE_XEN_GUEST_HANDLE(physdev_set_iopl_t);
 #define PHYSDEVOP_set_iobitmap           7
 struct physdev_set_iobitmap {
     /* IN */
-    XEN_GUEST_HANDLE_00030205(uint8) bitmap;
+#if __XEN_INTERFACE_VERSION__ >= 0x00030205
+    XEN_GUEST_HANDLE(uint8) bitmap;
+#else
+    uint8_t *bitmap;
+#endif
     uint32_t nr_ports;
 };
 typedef struct physdev_set_iobitmap physdev_set_iobitmap_t;
index 4cbb8963422322c79a06b89f5a240636daba1616..21fe15ffb99f1fb4d6bfd43419af33798e828465 100644 (file)
@@ -141,6 +141,14 @@ struct t_rec {
  * field, indexes into an array of struct t_rec's.
  */
 struct t_buf {
+    /* Assume the data buffer size is X.  X is generally not a power of 2.
+     * CONS and PROD are incremented modulo (2*X):
+     *     0 <= cons < 2*X
+     *     0 <= prod < 2*X
+     * This is done because addition modulo X breaks at 2^32 when X is not a
+     * power of 2:
+     *     (((2^32 - 1) % X) + 1) % X != (2^32) % X
+     */
     uint32_t cons;   /* Offset of next item to be consumed by control tools. */
     uint32_t prod;   /* Offset of next item to be produced by Xen.           */
     /*  Records follow immediately after the meta-data header.    */
index f0e70dddbeff8fdc1d9bbd6376e017d7f34696ff..c2894990cd0e7cb2cf5416f3098db7958511b1a1 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __XEN_PUBLIC_XEN_COMPAT_H__
 #define __XEN_PUBLIC_XEN_COMPAT_H__
 
-#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030207
+#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030208
 
 #if defined(__XEN__) || defined(__XEN_TOOLS__)
 /* Xen is built with matching headers and implements the latest interface. */
 #error "These header files do not support the requested interface version."
 #endif
 
-/* Fields defined as a Xen guest handle since 0x00030205. */
-#if __XEN_INTERFACE_VERSION__ >= 0x00030205
-#define XEN_GUEST_HANDLE_00030205(type) XEN_GUEST_HANDLE(type)
-#else
-#define XEN_GUEST_HANDLE_00030205(type) type *
-#endif
-
 #endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */
index a3b1d2fc3f65a2415b2a2ddc777f21c155861ef4..cce608606291ec7c942b8ce10687e220d61575cc 100644 (file)
@@ -263,7 +263,11 @@ struct mmuext_op {
         /* SET_LDT */
         unsigned int nr_ents;
         /* TLB_FLUSH_MULTI, INVLPG_MULTI */
-        XEN_GUEST_HANDLE_00030205(void) vcpumask;
+#if __XEN_INTERFACE_VERSION__ >= 0x00030205
+        XEN_GUEST_HANDLE(void) vcpumask;
+#else
+        void *vcpumask;
+#endif
     } arg2;
 };
 typedef struct mmuext_op mmuext_op_t;