Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Feb 2006 02:29:25 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 90947 for review
Message-ID:  <200602030229.k132TPEe045208@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=90947

Change 90947 by kmacy@kmacy:freebsd7_xen3 on 2006/02/03 02:28:50

	sync xen headers with xen-unstable
	dom0 interface version has changed since I pulled the headers *sigh*

Affected files ...

.. //depot/projects/xen3/src/sys/i386-xen/include/xen-public/arch-x86_32.h#2 edit
.. //depot/projects/xen3/src/sys/i386-xen/include/xen-public/arch-x86_64.h#2 edit
.. //depot/projects/xen3/src/sys/i386-xen/include/xen-public/dom0_ops.h#2 edit
.. //depot/projects/xen3/src/sys/i386-xen/include/xen-public/version.h#2 edit
.. //depot/projects/xen3/src/sys/i386-xen/include/xen-public/xen.h#2 edit

Differences ...

==== //depot/projects/xen3/src/sys/i386-xen/include/xen-public/arch-x86_32.h#2 (text+ko) ====

@@ -49,10 +49,15 @@
  * machine->physical mapping table starts at this address, read-only.
  */
 #ifdef CONFIG_X86_PAE
-# define HYPERVISOR_VIRT_START (0xF5800000UL)
+#define __HYPERVISOR_VIRT_START 0xF5800000
 #else
-# define HYPERVISOR_VIRT_START (0xFC000000UL)
+#define __HYPERVISOR_VIRT_START 0xFC000000
+#endif
+
+#ifndef HYPERVISOR_VIRT_START
+#define HYPERVISOR_VIRT_START mk_unsigned_long(__HYPERVISOR_VIRT_START)
 #endif
+
 #ifndef machine_to_phys_mapping
 #define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
 #endif
@@ -109,11 +114,11 @@
     /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */
     struct { char x[512]; } fpu_ctxt;       /* User-level FPU registers     */
 #define VGCF_I387_VALID (1<<0)
-#define VGCF_VMX_GUEST  (1<<1)
+#define VGCF_HVM_GUEST  (1<<1)
 #define VGCF_IN_KERNEL  (1<<2)
     unsigned long flags;                    /* VGCF_* flags                 */
     cpu_user_regs_t user_regs;              /* User-level CPU registers     */
-    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
+    struct trap_info trap_ctxt[256];        /* Virtual IDT                  */
     unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
     unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
     unsigned long kernel_ss, kernel_sp;     /* Virtual TSS (only SS1/SP1)   */
@@ -130,6 +135,7 @@
     unsigned long max_pfn;                  /* max pfn that appears in table */
     /* Frame containing list of mfns containing list of mfns containing p2m. */
     unsigned long pfn_to_mfn_frame_list_list; 
+    unsigned long nmi_reason;
 } arch_shared_info_t;
 
 typedef struct {
@@ -137,7 +143,7 @@
     unsigned long pad[5]; /* sizeof(vcpu_info_t) == 64 */
 } arch_vcpu_info_t;
 
-#endif
+#endif /* !__ASSEMBLY__ */
 
 #endif
 

==== //depot/projects/xen3/src/sys/i386-xen/include/xen-public/arch-x86_64.h#2 (text+ko) ====

@@ -59,9 +59,12 @@
 /* And the trap vector is... */
 #define TRAP_INSTR "syscall"
 
+#define __HYPERVISOR_VIRT_START 0xFFFF800000000000
+#define __HYPERVISOR_VIRT_END   0xFFFF880000000000
+
 #ifndef HYPERVISOR_VIRT_START
-#define HYPERVISOR_VIRT_START (0xFFFF800000000000UL)
-#define HYPERVISOR_VIRT_END   (0xFFFF880000000000UL)
+#define HYPERVISOR_VIRT_START mk_unsigned_long(__HYPERVISOR_VIRT_START)
+#define HYPERVISOR_VIRT_END   mk_unsigned_long(__HYPERVISOR_VIRT_END)
 #endif
 
 /* Maximum number of virtual CPUs in multi-processor guests. */
@@ -85,11 +88,20 @@
 #define SEGBASE_GS_USER_SEL 3 /* Set user %gs specified in base[15:0] */
 
 /*
- * int HYPERVISOR_switch_to_user(void)
+ * int HYPERVISOR_iret(void)
  * All arguments are on the kernel stack, in the following format.
  * Never returns if successful. Current kernel context is lost.
+ * The saved CS is mapped as follows:
+ *   RING0 -> RING3 kernel mode.
+ *   RING1 -> RING3 kernel mode.
+ *   RING2 -> RING3 kernel mode.
+ *   RING3 -> RING3 user mode.
+ * However RING0 indicates that the guest kernel should return to iteself
+ * directly with
+ *      orb   $3,1*8(%rsp)
+ *      iretq
  * If flags contains VGCF_IN_SYSCALL:
- *   Restore RAX, RIP, RFLAGS, RSP. 
+ *   Restore RAX, RIP, RFLAGS, RSP.
  *   Discard R11, RCX, CS, SS.
  * Otherwise:
  *   Restore RAX, R11, RCX, CS:RIP, RFLAGS, SS:RSP.
@@ -97,10 +109,19 @@
  */
 /* Guest exited in SYSCALL context? Return to guest with SYSRET? */
 #define VGCF_IN_SYSCALL (1<<8)
+struct iret_context {
+    /* Top of stack (%rsp at point of hypercall). */
+    uint64_t rax, r11, rcx, flags, rip, cs, rflags, rsp, ss;
+    /* Bottom of iret stack frame. */
+};
+/*
+ * For compatibility with HYPERVISOR_switch_to_user which is the old
+ * name for HYPERVISOR_iret.
+ */
 struct switch_to_user {
     /* Top of stack (%rsp at point of hypercall). */
     uint64_t rax, r11, rcx, flags, rip, cs, rflags, rsp, ss;
-    /* Bottom of switch_to_user stack frame. */
+    /* Bottom of iret stack frame. */
 };
 
 /*
@@ -175,11 +196,11 @@
     /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */
     struct { char x[512]; } fpu_ctxt;       /* User-level FPU registers     */
 #define VGCF_I387_VALID (1<<0)
-#define VGCF_VMX_GUEST  (1<<1)
+#define VGCF_HVM_GUEST  (1<<1)
 #define VGCF_IN_KERNEL  (1<<2)
     unsigned long flags;                    /* VGCF_* flags                 */
     cpu_user_regs_t user_regs;              /* User-level CPU registers     */
-    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
+    struct trap_info trap_ctxt[256];        /* Virtual IDT                  */
     unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
     unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
     unsigned long kernel_ss, kernel_sp;     /* Virtual TSS (only SS1/SP1)   */
@@ -199,6 +220,7 @@
     unsigned long max_pfn;                  /* max pfn that appears in table */
     /* Frame containing list of mfns containing list of mfns containing p2m. */
     unsigned long pfn_to_mfn_frame_list_list; 
+    unsigned long nmi_reason;
 } arch_shared_info_t;
 
 typedef struct {

==== //depot/projects/xen3/src/sys/i386-xen/include/xen-public/dom0_ops.h#2 (text+ko) ====

@@ -19,12 +19,12 @@
  * This makes sure that old versions of dom0 tools will stop working in a
  * well-defined way (rather than crashing the machine, for instance).
  */
-#define DOM0_INTERFACE_VERSION   0xAAAA1014
+#define DOM0_INTERFACE_VERSION   0x03000000
 
 /************************************************************************/
 
 #define DOM0_GETMEMLIST        2
-typedef struct {
+typedef struct dom0_getmemlist {
     /* IN variables. */
     domid_t       domain;
     unsigned long max_pfns;
@@ -42,7 +42,7 @@
 typedef struct sched_adjdom_cmd dom0_adjustdom_t;
 
 #define DOM0_CREATEDOMAIN      8
-typedef struct {
+typedef struct dom0_createdomain {
     /* IN parameters */
     uint32_t ssidref;
     xen_domain_handle_t handle;
@@ -52,25 +52,25 @@
 } dom0_createdomain_t;
 
 #define DOM0_DESTROYDOMAIN     9
-typedef struct {
+typedef struct dom0_destroydomain {
     /* IN variables. */
     domid_t domain;
 } dom0_destroydomain_t;
 
 #define DOM0_PAUSEDOMAIN      10
-typedef struct {
+typedef struct dom0_pausedomain {
     /* IN parameters. */
     domid_t domain;
 } dom0_pausedomain_t;
 
 #define DOM0_UNPAUSEDOMAIN    11
-typedef struct {
+typedef struct dom0_unpausedomain {
     /* IN parameters. */
     domid_t domain;
 } dom0_unpausedomain_t;
 
 #define DOM0_GETDOMAININFO    12
-typedef struct {
+typedef struct dom0_getdomaininfo {
     /* IN variables. */
     domid_t  domain;                  /* NB. IN/OUT variable. */
     /* OUT variables. */
@@ -94,17 +94,17 @@
     xen_domain_handle_t handle;
 } dom0_getdomaininfo_t;
 
-#define DOM0_SETDOMAININFO      13
-typedef struct {
+#define DOM0_SETVCPUCONTEXT   13
+typedef struct dom0_setvcpucontext {
     /* IN variables. */
     domid_t               domain;
     uint32_t              vcpu;
     /* IN/OUT parameters */
     vcpu_guest_context_t *ctxt;
-} dom0_setdomaininfo_t;
+} dom0_setvcpucontext_t;
 
 #define DOM0_MSR              15
-typedef struct {
+typedef struct dom0_msr {
     /* IN variables. */
     uint32_t write;
     cpumap_t cpu_mask;
@@ -121,7 +121,7 @@
  * 1 January, 1970 if the current system time was <system_time>.
  */
 #define DOM0_SETTIME          17
-typedef struct {
+typedef struct dom0_settime {
     /* IN variables. */
     uint32_t secs;
     uint32_t nsecs;
@@ -139,20 +139,20 @@
 #define LTAB_MASK XTAB
 #define LTABTYPE_MASK (0x7<<28)
 
-typedef struct {
+typedef struct dom0_getpageframeinfo {
     /* IN variables. */
-    unsigned long pfn;     /* Machine page frame number to query.       */
+    unsigned long mfn;     /* Machine page frame number to query.       */
     domid_t domain;        /* To which domain does the frame belong?    */
     /* OUT variables. */
     /* Is the page PINNED to a type? */
-    uint32_t type;              /* see above type defs */
+    uint32_t type;         /* see above type defs */
 } dom0_getpageframeinfo_t;
 
 /*
  * Read console content from Xen buffer ring.
  */
 #define DOM0_READCONSOLE      19
-typedef struct {
+typedef struct dom0_readconsole {
     /* IN variables. */
     uint32_t clear;        /* Non-zero -> clear after reading. */
     /* IN/OUT variables. */
@@ -163,17 +163,17 @@
 /* 
  * Set which physical cpus a vcpu can execute on.
  */
-#define DOM0_PINCPUDOMAIN     20
-typedef struct {
+#define DOM0_SETVCPUAFFINITY  20
+typedef struct dom0_setvcpuaffinity {
     /* IN variables. */
     domid_t   domain;
     uint32_t  vcpu;
     cpumap_t  cpumap;
-} dom0_pincpudomain_t;
+} dom0_setvcpuaffinity_t;
 
 /* Get trace buffers machine base address */
 #define DOM0_TBUFCONTROL       21
-typedef struct {
+typedef struct dom0_tbufcontrol {
     /* IN variables */
 #define DOM0_TBUF_GET_INFO     0
 #define DOM0_TBUF_SET_CPU_MASK 1
@@ -194,7 +194,7 @@
  * Get physical information about the host machine
  */
 #define DOM0_PHYSINFO         22
-typedef struct {
+typedef struct dom0_physinfo {
     uint32_t threads_per_core;
     uint32_t cores_per_socket;
     uint32_t sockets_per_node;
@@ -209,7 +209,7 @@
  * Get the ID of the current scheduler.
  */
 #define DOM0_SCHED_ID        24
-typedef struct {
+typedef struct dom0_sched_id {
     /* OUT variable */
     uint32_t sched_id;
 } dom0_sched_id_t;
@@ -228,15 +228,14 @@
 #define DOM0_SHADOW_CONTROL_OP_CLEAN       11
 #define DOM0_SHADOW_CONTROL_OP_PEEK        12
 
-typedef struct dom0_shadow_control
-{
+typedef struct dom0_shadow_control_stats {
     uint32_t fault_count;
     uint32_t dirty_count;
     uint32_t dirty_net_count;     
     uint32_t dirty_block_count;     
 } dom0_shadow_control_stats_t;
 
-typedef struct {
+typedef struct dom0_shadow_control {
     /* IN variables. */
     domid_t        domain;
     uint32_t       op;
@@ -248,14 +247,14 @@
 } dom0_shadow_control_t;
 
 #define DOM0_SETDOMAINMAXMEM   28
-typedef struct {
+typedef struct dom0_setdomainmaxmem {
     /* IN variables. */
     domid_t       domain;
     unsigned long max_memkb;
 } dom0_setdomainmaxmem_t;
 
 #define DOM0_GETPAGEFRAMEINFO2 29   /* batched interface */
-typedef struct {
+typedef struct dom0_getpageframeinfo2 {
     /* IN variables. */
     domid_t        domain;
     unsigned long  num;
@@ -264,17 +263,17 @@
 } dom0_getpageframeinfo2_t;
 
 /*
- * Request memory range (@pfn, @pfn+@nr_pfns-1) to have type @type.
+ * Request memory range (@mfn, @mfn+@nr_mfns-1) to have type @type.
  * On x86, @type is an architecture-defined MTRR memory type.
  * On success, returns the MTRR that was used (@reg) and a handle that can
  * be passed to DOM0_DEL_MEMTYPE to accurately tear down the new setting.
  * (x86-specific).
  */
 #define DOM0_ADD_MEMTYPE         31
-typedef struct {
+typedef struct dom0_add_memtype {
     /* IN variables. */
-    unsigned long pfn;
-    unsigned long nr_pfns;
+    unsigned long mfn;
+    unsigned long nr_mfns;
     uint32_t      type;
     /* OUT variables. */
     uint32_t      handle;
@@ -289,7 +288,7 @@
  * (x86-specific).
  */
 #define DOM0_DEL_MEMTYPE         32
-typedef struct {
+typedef struct dom0_del_memtype {
     /* IN variables. */
     uint32_t handle;
     uint32_t reg;
@@ -297,12 +296,12 @@
 
 /* Read current type of an MTRR (x86-specific). */
 #define DOM0_READ_MEMTYPE        33
-typedef struct {
+typedef struct dom0_read_memtype {
     /* IN variables. */
     uint32_t reg;
     /* OUT variables. */
-    unsigned long pfn;
-    unsigned long nr_pfns;
+    unsigned long mfn;
+    unsigned long nr_mfns;
     uint32_t type;
 } dom0_read_memtype_t;
 
@@ -311,12 +310,12 @@
 /* Sub-operations: */
 #define DOM0_PERFCCONTROL_OP_RESET 1   /* Reset all counters to zero. */
 #define DOM0_PERFCCONTROL_OP_QUERY 2   /* Get perfctr information. */
-typedef struct {
+typedef struct dom0_perfc_desc {
     uint8_t      name[80];             /* name of perf counter */
     uint32_t     nr_vals;              /* number of values for this counter */
     uint32_t     vals[64];             /* array of values */
 } dom0_perfc_desc_t;
-typedef struct {
+typedef struct dom0_perfccontrol {
     /* IN variables. */
     uint32_t       op;                /*  DOM0_PERFCCONTROL_OP_??? */
     /* OUT variables. */
@@ -325,14 +324,14 @@
 } dom0_perfccontrol_t;
 
 #define DOM0_MICROCODE           35
-typedef struct {
+typedef struct dom0_microcode {
     /* IN variables. */
     void    *data;                    /* Pointer to microcode data */
     uint32_t length;                  /* Length of microcode data. */
 } dom0_microcode_t;
 
 #define DOM0_IOPORT_PERMISSION   36
-typedef struct {
+typedef struct dom0_ioport_permission {
     domid_t  domain;                  /* domain to be affected */
     uint32_t first_port;              /* first port int range */
     uint32_t nr_ports;                /* size of port range */
@@ -340,7 +339,7 @@
 } dom0_ioport_permission_t;
 
 #define DOM0_GETVCPUCONTEXT      37
-typedef struct {
+typedef struct dom0_getvcpucontext {
     /* IN variables. */
     domid_t  domain;                  /* domain to be affected */
     uint32_t vcpu;                    /* vcpu # */
@@ -349,7 +348,7 @@
 } dom0_getvcpucontext_t;
 
 #define DOM0_GETVCPUINFO         43
-typedef struct {
+typedef struct dom0_getvcpuinfo {
     /* IN variables. */
     domid_t  domain;                  /* domain to be affected */
     uint32_t vcpu;                    /* vcpu # */
@@ -363,7 +362,7 @@
 } dom0_getvcpuinfo_t;
 
 #define DOM0_GETDOMAININFOLIST   38
-typedef struct {
+typedef struct dom0_getdomaininfolist {
     /* IN variables. */
     domid_t               first_domain;
     uint32_t              max_domains;
@@ -374,13 +373,13 @@
 
 #define DOM0_PLATFORM_QUIRK      39  
 #define QUIRK_NOIRQBALANCING  1
-typedef struct {
+typedef struct dom0_platform_quirk {
     /* IN variables. */
     uint32_t quirk_id;
 } dom0_platform_quirk_t;
 
 #define DOM0_PHYSICAL_MEMORY_MAP 40
-typedef struct {
+typedef struct dom0_physical_memory_map {
     /* IN variables. */
     uint32_t max_map_entries;
     /* OUT variables. */
@@ -393,61 +392,85 @@
 } dom0_physical_memory_map_t;
 
 #define DOM0_MAX_VCPUS 41
-typedef struct {
+typedef struct dom0_max_vcpus {
     domid_t  domain;        /* domain to be affected */
     uint32_t max;           /* maximum number of vcpus */
 } dom0_max_vcpus_t;
 
 #define DOM0_SETDOMAINHANDLE 44
-typedef struct {
+typedef struct dom0_setdomainhandle {
     domid_t domain;
     xen_domain_handle_t handle;
 } dom0_setdomainhandle_t;
 
-#define DOM0_SETPTRACE 45
-typedef struct {
+#define DOM0_SETDEBUGGING 45
+typedef struct dom0_setdebugging {
     domid_t domain;
     uint8_t enable;
-} dom0_setptrace_t;
+} dom0_setdebugging_t;
+
+#define DOM0_IRQ_PERMISSION 46
+typedef struct dom0_irq_permission {
+    domid_t domain;          /* domain to be affected */
+    uint8_t pirq;
+    uint8_t allow_access;    /* flag to specify enable/disable of IRQ access */
+} dom0_irq_permission_t;
 
-typedef struct {
+#define DOM0_IOMEM_PERMISSION 47
+typedef struct dom0_iomem_permission {
+    domid_t  domain;          /* domain to be affected */
+    unsigned long first_mfn;  /* first page (physical page number) in range */
+    unsigned long nr_mfns;    /* number of pages in range (>0) */
+    uint8_t allow_access;     /* allow (!0) or deny (0) access to range? */
+} dom0_iomem_permission_t;
+ 
+#define DOM0_HYPERCALL_INIT   48
+typedef struct dom0_hypercall_init {
+    domid_t  domain;          /* domain to be affected */
+    unsigned long mfn;        /* machine frame to be initialised */
+} dom0_hypercall_init_t;
+ 
+typedef struct dom0_op {
     uint32_t cmd;
     uint32_t interface_version; /* DOM0_INTERFACE_VERSION */
     union {
-        dom0_createdomain_t      createdomain;
-        dom0_pausedomain_t       pausedomain;
-        dom0_unpausedomain_t     unpausedomain;
-        dom0_destroydomain_t     destroydomain;
-        dom0_getmemlist_t        getmemlist;
-        dom0_schedctl_t          schedctl;
-        dom0_adjustdom_t         adjustdom;
-        dom0_setdomaininfo_t     setdomaininfo;
-        dom0_getdomaininfo_t     getdomaininfo;
-        dom0_getpageframeinfo_t  getpageframeinfo;
-        dom0_msr_t               msr;
-        dom0_settime_t           settime;
-        dom0_readconsole_t       readconsole;
-        dom0_pincpudomain_t      pincpudomain;
-        dom0_tbufcontrol_t       tbufcontrol;
-        dom0_physinfo_t          physinfo;
-        dom0_sched_id_t          sched_id;
-        dom0_shadow_control_t    shadow_control;
-        dom0_setdomainmaxmem_t   setdomainmaxmem;
-        dom0_getpageframeinfo2_t getpageframeinfo2;
-        dom0_add_memtype_t       add_memtype;
-        dom0_del_memtype_t       del_memtype;
-        dom0_read_memtype_t      read_memtype;
-        dom0_perfccontrol_t      perfccontrol;
-        dom0_microcode_t         microcode;
-        dom0_ioport_permission_t ioport_permission;
-        dom0_getvcpucontext_t    getvcpucontext;
-        dom0_getvcpuinfo_t       getvcpuinfo;
-        dom0_getdomaininfolist_t getdomaininfolist;
-        dom0_platform_quirk_t    platform_quirk;
-        dom0_physical_memory_map_t physical_memory_map;
-        dom0_max_vcpus_t         max_vcpus;
-        dom0_setdomainhandle_t   setdomainhandle;        
-        dom0_setptrace_t         setptrace;
+        struct dom0_createdomain      createdomain;
+        struct dom0_pausedomain       pausedomain;
+        struct dom0_unpausedomain     unpausedomain;
+        struct dom0_destroydomain     destroydomain;
+        struct dom0_getmemlist        getmemlist;
+        struct sched_ctl_cmd          schedctl;
+        struct sched_adjdom_cmd       adjustdom;
+        struct dom0_setvcpucontext    setvcpucontext;
+        struct dom0_getdomaininfo     getdomaininfo;
+        struct dom0_getpageframeinfo  getpageframeinfo;
+        struct dom0_msr               msr;
+        struct dom0_settime           settime;
+        struct dom0_readconsole       readconsole;
+        struct dom0_setvcpuaffinity   setvcpuaffinity;
+        struct dom0_tbufcontrol       tbufcontrol;
+        struct dom0_physinfo          physinfo;
+        struct dom0_sched_id          sched_id;
+        struct dom0_shadow_control    shadow_control;
+        struct dom0_setdomainmaxmem   setdomainmaxmem;
+        struct dom0_getpageframeinfo2 getpageframeinfo2;
+        struct dom0_add_memtype       add_memtype;
+        struct dom0_del_memtype       del_memtype;
+        struct dom0_read_memtype      read_memtype;
+        struct dom0_perfccontrol      perfccontrol;
+        struct dom0_microcode         microcode;
+        struct dom0_ioport_permission ioport_permission;
+        struct dom0_getvcpucontext    getvcpucontext;
+        struct dom0_getvcpuinfo       getvcpuinfo;
+        struct dom0_getdomaininfolist getdomaininfolist;
+        struct dom0_platform_quirk    platform_quirk;
+        struct dom0_physical_memory_map physical_memory_map;
+        struct dom0_max_vcpus         max_vcpus;
+        struct dom0_setdomainhandle   setdomainhandle;        
+        struct dom0_setdebugging      setdebugging;
+        struct dom0_irq_permission    irq_permission;
+        struct dom0_iomem_permission  iomem_permission;
+        struct dom0_hypercall_init    hypercall_init;
         uint8_t                  pad[128];
     } u;
 } dom0_op_t;

==== //depot/projects/xen3/src/sys/i386-xen/include/xen-public/version.h#2 (text+ko) ====

@@ -39,6 +39,18 @@
     unsigned long virt_start;
 } xen_platform_parameters_t;
 
+#define XENVER_get_features 6
+typedef struct xen_feature_info {
+    unsigned int submap_idx;    /* IN: which 32-bit submap to return */
+    uint32_t     submap;        /* OUT: 32-bit submap */
+} xen_feature_info_t;
+
+#define XENFEAT_writable_page_tables       0
+#define XENFEAT_writable_descriptor_tables 1
+#define XENFEAT_auto_translated_physmap    2
+
+#define XENFEAT_NR_SUBMAPS 1
+
 #endif /* __XEN_PUBLIC_VERSION_H__ */
 
 /*

==== //depot/projects/xen3/src/sys/i386-xen/include/xen-public/xen.h#2 (text+ko) ====

@@ -12,7 +12,7 @@
 #if defined(__i386__)
 #include <machine/xen-public/arch-x86_32.h>
 #elif defined(__x86_64__)
-#include "arch-x86_64.h"
+#include <machine/xen-public/arch-x86_64.h>
 #elif defined(__ia64__)
 #include "arch-ia64.h"
 #else
@@ -53,12 +53,14 @@
 #define __HYPERVISOR_grant_table_op       20
 #define __HYPERVISOR_vm_assist            21
 #define __HYPERVISOR_update_va_mapping_otherdomain 22
-#define __HYPERVISOR_switch_vm86          23 /* x86/32 only */
-#define __HYPERVISOR_switch_to_user       23 /* x86/64 only */
+#define __HYPERVISOR_iret                 23 /* x86 only */
+#define __HYPERVISOR_switch_vm86          23 /* x86/32 only (obsolete name) */
+#define __HYPERVISOR_switch_to_user       23 /* x86/64 only (obsolete name) */
 #define __HYPERVISOR_vcpu_op              24
 #define __HYPERVISOR_set_segment_base     25 /* x86/64 only */
 #define __HYPERVISOR_mmuext_op            26
 #define __HYPERVISOR_acm_op               27
+#define __HYPERVISOR_nmi_op               28
 
 /* 
  * VIRTUAL INTERRUPTS
@@ -67,12 +69,10 @@
  */
 #define VIRQ_TIMER      0  /* Timebase update, and/or requested timeout.  */
 #define VIRQ_DEBUG      1  /* Request guest to dump debug info.           */
-#define VIRQ_CONSOLE    2  /* (DOM0) bytes received on emergency console. */
+#define VIRQ_CONSOLE    2  /* (DOM0) Bytes received on emergency console. */
 #define VIRQ_DOM_EXC    3  /* (DOM0) Exceptional event for some domain.   */
-#define VIRQ_PARITY_ERR 4  /* (DOM0) NMI parity error.                    */
-#define VIRQ_IO_ERR     5  /* (DOM0) NMI I/O error.                       */
 #define VIRQ_DEBUGGER   6  /* (DOM0) A domain has paused for debugging.   */
-#define NR_VIRQS        7
+#define NR_VIRQS        8
 
 /*
  * MMU-UPDATE REQUESTS
@@ -144,10 +144,6 @@
  * cmd: MMUEXT_SET_LDT
  * linear_addr: Linear address of LDT base (NB. must be page-aligned).
  * nr_ents: Number of entries in LDT.
- * 
- * cmd: MMUEXT_REASSIGN_PAGE
- * mfn: Machine frame number to be reassigned to the FD.
- *      (NB. page must currently belong to the calling domain).
  */
 #define MMUEXT_PIN_L1_TABLE      0
 #define MMUEXT_PIN_L2_TABLE      1
@@ -163,14 +159,13 @@
 #define MMUEXT_INVLPG_ALL       11
 #define MMUEXT_FLUSH_CACHE      12
 #define MMUEXT_SET_LDT          13
-#define MMUEXT_REASSIGN_PAGE    14
 #define MMUEXT_NEW_USER_BASEPTR 15
 
 #ifndef __ASSEMBLY__
 struct mmuext_op {
     unsigned int cmd;
     union {
-        /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR, REASSIGN_PAGE */
+        /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR */
         unsigned long mfn;
         /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
         unsigned long linear_addr;
@@ -244,8 +239,7 @@
  * Send an array of these to HYPERVISOR_mmu_update().
  * NB. The fields are natural pointer/address size for this architecture.
  */
-typedef struct
-{
+typedef struct mmu_update {
     uint64_t ptr;       /* Machine address of PTE. */
     uint64_t val;       /* New contents of PTE.    */
 } mmu_update_t;
@@ -254,8 +248,7 @@
  * Send an array of these to HYPERVISOR_multicall().
  * NB. The fields are natural register size for this architecture.
  */
-typedef struct
-{
+typedef struct multicall_entry {
     unsigned long op, result;
     unsigned long args[6];
 } multicall_entry_t;
@@ -430,6 +423,15 @@
 
 typedef uint8_t xen_domain_handle_t[16];
 
+/* Turn a plain number into a C unsigned long constant. */
+#define __mk_unsigned_long(x) x ## UL
+#define mk_unsigned_long(x) __mk_unsigned_long(x)
+
+#else /* __ASSEMBLY__ */
+
+/* In assembly code we cannot use C numeric constant suffixes. */
+#define mk_unsigned_long(x) x
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __XEN_PUBLIC_XEN_H__ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602030229.k132TPEe045208>