ia64/xen-unstable

changeset 1990:b89741928aaf

bitkeeper revision 1.1108.33.9 (41091835q6WuyZj9PdFnpNZ9ZQ7vfw)

- for Linux 2.6, use shared defintions of the hypervisor and control interface
- cleanup and sync Linux 2.4 mkbuildtree with Linux 2.6 mkbuildtree
author cl349@freefall.cl.cam.ac.uk
date Thu Jul 29 15:31:01 2004 +0000 (2004-07-29)
parents 2afb533685cb
children 541e28a374a6
files .rootkeys linux-2.4.26-xen-sparse/mkbuildtree linux-2.6.7-xen-sparse/include/asm-xen/domain_controller.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_32.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_64.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/dom0_ops.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/event_channel.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/hypervisor-if.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/physdev.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/sched_ctl.h linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/trace.h linux-2.6.7-xen-sparse/mkbuildtree
line diff
     1.1 --- a/.rootkeys	Thu Jul 29 14:51:29 2004 +0000
     1.2 +++ b/.rootkeys	Thu Jul 29 15:31:01 2004 +0000
     1.3 @@ -244,16 +244,7 @@ 41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6
     1.4  40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/xor.h
     1.5  40f5623bqoi4GEoBiiUc6TZk1HjsMg linux-2.6.7-xen-sparse/include/asm-xen/blkif.h
     1.6  40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.7-xen-sparse/include/asm-xen/ctrl_if.h
     1.7 -40f5623bDU2mp4xcHrO0ThodQ9Vs7w linux-2.6.7-xen-sparse/include/asm-xen/domain_controller.h
     1.8  40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.7-xen-sparse/include/asm-xen/evtchn.h
     1.9 -40f5623bSHoOzh_pYP9ovjpUz019Aw linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_32.h
    1.10 -40f5623c1uIAB_OVr5AFdoOac7zxHA linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_64.h
    1.11 -40f5623cEbvTM2QIJ8G6kJoYMLvFpw linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/dom0_ops.h
    1.12 -40f5623cBiv7JBB2bwezpyMwyDGN_w linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/event_channel.h
    1.13 -40f5623cvr4j1BQI1I82_K5wRocUKg linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/hypervisor-if.h
    1.14 -40f5623cfHK4EBsPz922OqMVkZX6OA linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/physdev.h
    1.15 -40f5623cFINsV23lGJNQNbhO5kus_Q linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/sched_ctl.h
    1.16 -40f5623cb_pJrLt3h_nAzvJsjsV0rQ linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/trace.h
    1.17  40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.7-xen-sparse/include/asm-xen/multicall.h
    1.18  40f5623cTZ80EwjWUBlh44A9F9i_Lg linux-2.6.7-xen-sparse/include/asm-xen/netif.h
    1.19  3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.7-xen-sparse/include/asm-xen/proc_cmd.h
     2.1 --- a/linux-2.4.26-xen-sparse/mkbuildtree	Thu Jul 29 14:51:29 2004 +0000
     2.2 +++ b/linux-2.4.26-xen-sparse/mkbuildtree	Thu Jul 29 15:31:01 2004 +0000
     2.3 @@ -104,21 +104,24 @@ rm -f mkbuildtree
     2.4  
     2.5  LINUX_26=${RS}/../linux-2.6.7-xen-sparse
     2.6  
     2.7 -## There are a whole bunch of special symlinks, mostly for files
     2.8 -## which are identical in the i386 and xen-i386 architecture-dependent
     2.9 -## subdirectories.
    2.10  
    2.11 -# This first symlink is special: it links to shared files in Xen's source tree
    2.12 +# Create links to the shared definitions of the hypervisor interface
    2.13  rm -rf ${AD}/include/asm-xen/hypervisor-ifs
    2.14  mkdir  ${AD}/include/asm-xen/hypervisor-ifs
    2.15  cd     ${AD}/include/asm-xen/hypervisor-ifs
    2.16  relative_lndir ../../../${RS}/../xen/include/hypervisor-ifs
    2.17  
    2.18 -# Another special symlink: to the shared definitions for the control interface
    2.19 -cd ..
    2.20 +# Create a link to the shared definitions for the control interface
    2.21 +cd ${AD}/include/asm-xen
    2.22  ln -sf ../../${RS}/../tools/python/xen/lowlevel/xu/domain_controller.h
    2.23  
    2.24 -# The remainder are the i386 -> xen-i386 links
    2.25 +
    2.26 +## Symlinks for files:
    2.27 +## - which are identical in the i386 and xen-i386 architecture-dependent
    2.28 +##   subdirectories.
    2.29 +## - which are identical in the Linux 2.6 and Linux 2.4 ports.
    2.30 +
    2.31 +cd ${AD}/include/asm-xen
    2.32  ln -sf ../asm-i386/a.out.h 
    2.33  ln -sf ../asm-i386/apicdef.h 
    2.34  ln -sf ../asm-i386/apic.h 
    2.35 @@ -201,7 +204,7 @@ ln -sf ../asm-i386/unistd.h
    2.36  ln -sf ../asm-i386/user.h 
    2.37  ln -sf ../../${LINUX_26}/include/asm-xen/xen_proc.h
    2.38  
    2.39 -cd ../../arch/xen/kernel
    2.40 +cd ${AD}/arch/xen/kernel
    2.41  ln -sf ../../i386/kernel/i387.c
    2.42  ln -sf ../../i386/kernel/init_task.c
    2.43  ln -sf ../../i386/kernel/pci-dma.c
    2.44 @@ -211,7 +214,8 @@ ln -sf ../../i386/kernel/ptrace.c
    2.45  ln -sf ../../i386/kernel/semaphore.c 
    2.46  ln -sf ../../i386/kernel/sys_i386.c 
    2.47  ln -sf ../../../${LINUX_26}/arch/xen/i386/kernel/ioport.c
    2.48 -cd ../lib
    2.49 +
    2.50 +cd ${AD}/arch/xen/lib
    2.51  ln -sf ../../i386/lib/checksum.S 
    2.52  ln -sf ../../i386/lib/dec_and_lock.c 
    2.53  ln -sf ../../i386/lib/getuser.S 
    2.54 @@ -222,12 +226,16 @@ ln -sf ../../i386/lib/old-checksum.c
    2.55  ln -sf ../../i386/lib/strstr.c 
    2.56  ln -sf ../../i386/lib/usercopy.c 
    2.57  ln -sf ../../../${LINUX_26}/arch/xen/kernel/xen_proc.c
    2.58 -cd ../mm
    2.59 +
    2.60 +cd ${AD}/arch/xen/mm
    2.61  ln -sf ../../i386/mm/extable.c 
    2.62  ln -sf ../../i386/mm/pageattr.c 
    2.63 -cd ../drivers/console
    2.64 +
    2.65 +cd ${AD}/arch/xen/drivers/console
    2.66  ln -sf ../../../../${LINUX_26}/drivers/xen/console/console.c 
    2.67 -cd ../dom0
    2.68 +
    2.69 +cd ${AD}/arch/xen/drivers/dom0
    2.70  ln -sf ../../../../${LINUX_26}/drivers/xen/privcmd/privcmd.c core.c
    2.71 -cd ../netif/frontend
    2.72 +
    2.73 +cd ${AD}/arch/xen/drivers/netif/frontend
    2.74  ln -sf ../../../../../${LINUX_26}/drivers/xen/net/network.c main.c
     3.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/domain_controller.h	Thu Jul 29 14:51:29 2004 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,532 +0,0 @@
     3.4 -/******************************************************************************
     3.5 - * domain_controller.h
     3.6 - * 
     3.7 - * Interface to server controller (e.g., 'xend'). This header file defines the 
     3.8 - * interface that is shared with guest OSes.
     3.9 - * 
    3.10 - * Copyright (c) 2004, K A Fraser
    3.11 - */
    3.12 -
    3.13 -#ifndef __DOMAIN_CONTROLLER_H__
    3.14 -#define __DOMAIN_CONTROLLER_H__
    3.15 -
    3.16 -
    3.17 -#ifndef BASIC_START_INFO
    3.18 -#error "Xen header file hypervisor-if.h must already be included here."
    3.19 -#endif
    3.20 -
    3.21 -
    3.22 -/*
    3.23 - * EXTENDED BOOTSTRAP STRUCTURE FOR NEW DOMAINS.
    3.24 - */
    3.25 -
    3.26 -typedef struct {
    3.27 -    BASIC_START_INFO;
    3.28 -    u16 domain_controller_evtchn; /* 320 */
    3.29 -} PACKED extended_start_info_t; /* 322 bytes */
    3.30 -#define SIF_BLK_BE_DOMAIN (1<<4)  /* Is this a block backend domain? */
    3.31 -#define SIF_NET_BE_DOMAIN (1<<5)  /* Is this a net backend domain? */
    3.32 -
    3.33 -
    3.34 -/*
    3.35 - * Reason codes for SCHEDOP_shutdown. These are opaque to Xen but may be
    3.36 - * interpreted by control software to determine the appropriate action. These 
    3.37 - * are only really advisories: the controller can actually do as it likes.
    3.38 - */
    3.39 -#define SHUTDOWN_poweroff   0  /* Domain exited normally. Clean up and kill. */
    3.40 -#define SHUTDOWN_reboot     1  /* Clean up, kill, and then restart.          */
    3.41 -#define SHUTDOWN_suspend    2  /* Clean up, save suspend info, kill.         */
    3.42 -
    3.43 -
    3.44 -/*
    3.45 - * CONTROLLER MESSAGING INTERFACE.
    3.46 - */
    3.47 -
    3.48 -typedef struct {
    3.49 -    u8 type;     /*  0: echoed in response */
    3.50 -    u8 subtype;  /*  1: echoed in response */
    3.51 -    u8 id;       /*  2: echoed in response */
    3.52 -    u8 length;   /*  3: number of bytes in 'msg' */
    3.53 -    u8 msg[60];  /*  4: type-specific message data */
    3.54 -} PACKED control_msg_t; /* 64 bytes */
    3.55 -
    3.56 -#define CONTROL_RING_SIZE 8
    3.57 -typedef u32 CONTROL_RING_IDX;
    3.58 -#define MASK_CONTROL_IDX(_i) ((_i)&(CONTROL_RING_SIZE-1))
    3.59 -
    3.60 -typedef struct {
    3.61 -    control_msg_t tx_ring[CONTROL_RING_SIZE];   /*    0: guest -> controller */
    3.62 -    control_msg_t rx_ring[CONTROL_RING_SIZE];   /*  512: controller -> guest */
    3.63 -    CONTROL_RING_IDX tx_req_prod, tx_resp_prod; /* 1024, 1028 */
    3.64 -    CONTROL_RING_IDX rx_req_prod, rx_resp_prod; /* 1032, 1036 */
    3.65 -} PACKED control_if_t; /* 1040 bytes */
    3.66 -
    3.67 -/*
    3.68 - * Top-level command types.
    3.69 - */
    3.70 -#define CMSG_CONSOLE        0  /* Console                 */
    3.71 -#define CMSG_BLKIF_BE       1  /* Block-device backend    */
    3.72 -#define CMSG_BLKIF_FE       2  /* Block-device frontend   */
    3.73 -#define CMSG_NETIF_BE       3  /* Network-device backend  */
    3.74 -#define CMSG_NETIF_FE       4  /* Network-device frontend */
    3.75 -#define CMSG_SHUTDOWN       6  /* Shutdown messages       */
    3.76 -
    3.77 -
    3.78 -/******************************************************************************
    3.79 - * CONSOLE DEFINITIONS
    3.80 - */
    3.81 -
    3.82 -/*
    3.83 - * Subtypes for console messages.
    3.84 - */
    3.85 -#define CMSG_CONSOLE_DATA       0
    3.86 -
    3.87 -
    3.88 -/******************************************************************************
    3.89 - * BLOCK-INTERFACE FRONTEND DEFINITIONS
    3.90 - */
    3.91 -
    3.92 -/* Messages from domain controller to guest. */
    3.93 -#define CMSG_BLKIF_FE_INTERFACE_STATUS_CHANGED   0
    3.94 -
    3.95 -/* Messages from guest to domain controller. */
    3.96 -#define CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED     32
    3.97 -#define CMSG_BLKIF_FE_INTERFACE_CONNECT         33
    3.98 -#define CMSG_BLKIF_FE_INTERFACE_DISCONNECT      34
    3.99 -
   3.100 -/* These are used by both front-end and back-end drivers. */
   3.101 -#define blkif_vdev_t   u16
   3.102 -#define blkif_pdev_t   u16
   3.103 -#define blkif_sector_t u64
   3.104 -
   3.105 -/*
   3.106 - * CMSG_BLKIF_FE_INTERFACE_STATUS_CHANGED:
   3.107 - *  Notify a guest about a status change on one of its block interfaces.
   3.108 - *  If the interface is DESTROYED or DOWN then the interface is disconnected:
   3.109 - *   1. The shared-memory frame is available for reuse.
   3.110 - *   2. Any unacknowledged messgaes pending on the interface were dropped.
   3.111 - */
   3.112 -#define BLKIF_INTERFACE_STATUS_DESTROYED    0 /* Interface doesn't exist.    */
   3.113 -#define BLKIF_INTERFACE_STATUS_DISCONNECTED 1 /* Exists but is disconnected. */
   3.114 -#define BLKIF_INTERFACE_STATUS_CONNECTED    2 /* Exists and is connected.    */
   3.115 -typedef struct {
   3.116 -    u32 handle; /*  0 */
   3.117 -    u32 status; /*  4 */
   3.118 -    u16 evtchn; /*  8: (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */
   3.119 -} PACKED blkif_fe_interface_status_changed_t; /* 10 bytes */
   3.120 -
   3.121 -/*
   3.122 - * CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED:
   3.123 - *  Notify the domain controller that the front-end driver is DOWN or UP.
   3.124 - *  When the driver goes DOWN then the controller will send no more
   3.125 - *  status-change notifications. When the driver comes UP then the controller
   3.126 - *  will send a notification for each interface that currently exists.
   3.127 - *  If the driver goes DOWN while interfaces are still UP, the domain
   3.128 - *  will automatically take the interfaces DOWN.
   3.129 - */
   3.130 -#define BLKIF_DRIVER_STATUS_DOWN   0
   3.131 -#define BLKIF_DRIVER_STATUS_UP     1
   3.132 -typedef struct {
   3.133 -    /* IN */
   3.134 -    u32 status;        /*  0: BLKIF_DRIVER_STATUS_??? */
   3.135 -    /* OUT */
   3.136 -    /*
   3.137 -     * Tells driver how many interfaces it should expect to immediately
   3.138 -     * receive notifications about.
   3.139 -     */
   3.140 -    u32 nr_interfaces; /*  4 */
   3.141 -} PACKED blkif_fe_driver_status_changed_t; /* 8 bytes */
   3.142 -
   3.143 -/*
   3.144 - * CMSG_BLKIF_FE_INTERFACE_CONNECT:
   3.145 - *  If successful, the domain controller will acknowledge with a
   3.146 - *  STATUS_CONNECTED message.
   3.147 - */
   3.148 -typedef struct {
   3.149 -    u32      handle;      /*  0 */
   3.150 -    u32      __pad;
   3.151 -    memory_t shmem_frame; /*  8 */
   3.152 -    MEMORY_PADDING;
   3.153 -} PACKED blkif_fe_interface_connect_t; /* 16 bytes */
   3.154 -
   3.155 -/*
   3.156 - * CMSG_BLKIF_FE_INTERFACE_DISCONNECT:
   3.157 - *  If successful, the domain controller will acknowledge with a
   3.158 - *  STATUS_DISCONNECTED message.
   3.159 - */
   3.160 -typedef struct {
   3.161 -    u32 handle; /*  0 */
   3.162 -} PACKED blkif_fe_interface_disconnect_t; /* 4 bytes */
   3.163 -
   3.164 -
   3.165 -/******************************************************************************
   3.166 - * BLOCK-INTERFACE BACKEND DEFINITIONS
   3.167 - */
   3.168 -
   3.169 -/* Messages from domain controller. */
   3.170 -#define CMSG_BLKIF_BE_CREATE      0  /* Create a new block-device interface. */
   3.171 -#define CMSG_BLKIF_BE_DESTROY     1  /* Destroy a block-device interface.    */
   3.172 -#define CMSG_BLKIF_BE_CONNECT     2  /* Connect i/f to remote driver.        */
   3.173 -#define CMSG_BLKIF_BE_DISCONNECT  3  /* Disconnect i/f from remote driver.   */
   3.174 -#define CMSG_BLKIF_BE_VBD_CREATE  4  /* Create a new VBD for an interface.   */
   3.175 -#define CMSG_BLKIF_BE_VBD_DESTROY 5  /* Delete a VBD from an interface.      */
   3.176 -#define CMSG_BLKIF_BE_VBD_GROW    6  /* Append an extent to a given VBD.     */
   3.177 -#define CMSG_BLKIF_BE_VBD_SHRINK  7  /* Remove last extent from a given VBD. */
   3.178 -
   3.179 -/* Messages to domain controller. */
   3.180 -#define CMSG_BLKIF_BE_DRIVER_STATUS_CHANGED 32
   3.181 -
   3.182 -/*
   3.183 - * Message request/response definitions for block-device messages.
   3.184 - */
   3.185 -
   3.186 -typedef struct {
   3.187 -    blkif_sector_t sector_start;   /*  0 */
   3.188 -    blkif_sector_t sector_length;  /*  8 */
   3.189 -    blkif_pdev_t   device;         /* 16 */
   3.190 -    u16            __pad;          /* 18 */
   3.191 -} PACKED blkif_extent_t; /* 20 bytes */
   3.192 -
   3.193 -/* Non-specific 'okay' return. */
   3.194 -#define BLKIF_BE_STATUS_OKAY                0
   3.195 -/* Non-specific 'error' return. */
   3.196 -#define BLKIF_BE_STATUS_ERROR               1
   3.197 -/* The following are specific error returns. */
   3.198 -#define BLKIF_BE_STATUS_INTERFACE_EXISTS    2
   3.199 -#define BLKIF_BE_STATUS_INTERFACE_NOT_FOUND 3
   3.200 -#define BLKIF_BE_STATUS_INTERFACE_CONNECTED 4
   3.201 -#define BLKIF_BE_STATUS_VBD_EXISTS          5
   3.202 -#define BLKIF_BE_STATUS_VBD_NOT_FOUND       6
   3.203 -#define BLKIF_BE_STATUS_OUT_OF_MEMORY       7
   3.204 -#define BLKIF_BE_STATUS_EXTENT_NOT_FOUND    8
   3.205 -#define BLKIF_BE_STATUS_MAPPING_ERROR       9
   3.206 -
   3.207 -/* This macro can be used to create an array of descriptive error strings. */
   3.208 -#define BLKIF_BE_STATUS_ERRORS {    \
   3.209 -    "Okay",                         \
   3.210 -    "Non-specific error",           \
   3.211 -    "Interface already exists",     \
   3.212 -    "Interface not found",          \
   3.213 -    "Interface is still connected", \
   3.214 -    "VBD already exists",           \
   3.215 -    "VBD not found",                \
   3.216 -    "Out of memory",                \
   3.217 -    "Extent not found for VBD",     \
   3.218 -    "Could not map domain memory" }
   3.219 -
   3.220 -/*
   3.221 - * CMSG_BLKIF_BE_CREATE:
   3.222 - *  When the driver sends a successful response then the interface is fully
   3.223 - *  created. The controller will send a DOWN notification to the front-end
   3.224 - *  driver.
   3.225 - */
   3.226 -typedef struct { 
   3.227 -    /* IN */
   3.228 -    domid_t    domid;         /*  0: Domain attached to new interface.   */
   3.229 -    u32        blkif_handle;  /*  4: Domain-specific interface handle.   */
   3.230 -    /* OUT */
   3.231 -    u32        status;        /*  8 */
   3.232 -} PACKED blkif_be_create_t; /* 12 bytes */
   3.233 -
   3.234 -/*
   3.235 - * CMSG_BLKIF_BE_DESTROY:
   3.236 - *  When the driver sends a successful response then the interface is fully
   3.237 - *  torn down. The controller will send a DESTROYED notification to the
   3.238 - *  front-end driver.
   3.239 - */
   3.240 -typedef struct { 
   3.241 -    /* IN */
   3.242 -    domid_t    domid;         /*  0: Identify interface to be destroyed. */
   3.243 -    u32        blkif_handle;  /*  4: ...ditto...                         */
   3.244 -    /* OUT */
   3.245 -    u32        status;        /*  8 */
   3.246 -} PACKED blkif_be_destroy_t; /* 12 bytes */
   3.247 -
   3.248 -/*
   3.249 - * CMSG_BLKIF_BE_CONNECT:
   3.250 - *  When the driver sends a successful response then the interface is fully
   3.251 - *  connected. The controller will send a CONNECTED notification to the
   3.252 - *  front-end driver.
   3.253 - */
   3.254 -typedef struct { 
   3.255 -    /* IN */
   3.256 -    domid_t    domid;         /*  0: Domain attached to new interface.   */
   3.257 -    u32        blkif_handle;  /*  4: Domain-specific interface handle.   */
   3.258 -    memory_t   shmem_frame;   /*  8: Page cont. shared comms window.     */
   3.259 -    MEMORY_PADDING;
   3.260 -    u32        evtchn;        /* 16: Event channel for notifications.    */
   3.261 -    /* OUT */
   3.262 -    u32        status;        /* 20 */
   3.263 -} PACKED blkif_be_connect_t;  /* 24 bytes */
   3.264 -
   3.265 -/*
   3.266 - * CMSG_BLKIF_BE_DISCONNECT:
   3.267 - *  When the driver sends a successful response then the interface is fully
   3.268 - *  disconnected. The controller will send a DOWN notification to the front-end
   3.269 - *  driver.
   3.270 - */
   3.271 -typedef struct { 
   3.272 -    /* IN */
   3.273 -    domid_t    domid;         /*  0: Domain attached to new interface.   */
   3.274 -    u32        blkif_handle;  /*  4: Domain-specific interface handle.   */
   3.275 -    /* OUT */
   3.276 -    u32        status;        /*  8 */
   3.277 -} PACKED blkif_be_disconnect_t; /* 12 bytes */
   3.278 -
   3.279 -/* CMSG_BLKIF_BE_VBD_CREATE */
   3.280 -typedef struct { 
   3.281 -    /* IN */
   3.282 -    domid_t    domid;         /*  0: Identify blkdev interface.          */
   3.283 -    u32        blkif_handle;  /*  4: ...ditto...                         */
   3.284 -    blkif_vdev_t vdevice;     /*  8: Interface-specific id for this VBD. */
   3.285 -    u16        readonly;      /* 10: Non-zero -> VBD isn't writeable.    */
   3.286 -    /* OUT */
   3.287 -    u32        status;        /* 12 */
   3.288 -} PACKED blkif_be_vbd_create_t; /* 16 bytes */
   3.289 -
   3.290 -/* CMSG_BLKIF_BE_VBD_DESTROY */
   3.291 -typedef struct {
   3.292 -    /* IN */
   3.293 -    domid_t    domid;         /*  0: Identify blkdev interface.          */
   3.294 -    u32        blkif_handle;  /*  4: ...ditto...                         */
   3.295 -    blkif_vdev_t vdevice;     /*  8: Interface-specific id of the VBD.   */
   3.296 -    u16        __pad;         /* 10 */
   3.297 -    /* OUT */
   3.298 -    u32        status;        /* 12 */
   3.299 -} PACKED blkif_be_vbd_destroy_t; /* 16 bytes */
   3.300 -
   3.301 -/* CMSG_BLKIF_BE_VBD_GROW */
   3.302 -typedef struct { 
   3.303 -    /* IN */
   3.304 -    domid_t    domid;         /*  0: Identify blkdev interface.          */
   3.305 -    u32        blkif_handle;  /*  4: ...ditto...                         */
   3.306 -    blkif_extent_t extent;    /*  8: Physical extent to append to VBD.   */
   3.307 -    blkif_vdev_t vdevice;     /* 28: Interface-specific id of the VBD.   */
   3.308 -    u16        __pad;         /* 30 */
   3.309 -    /* OUT */
   3.310 -    u32        status;        /* 32 */
   3.311 -} PACKED blkif_be_vbd_grow_t; /* 36 bytes */
   3.312 -
   3.313 -/* CMSG_BLKIF_BE_VBD_SHRINK */
   3.314 -typedef struct { 
   3.315 -    /* IN */
   3.316 -    domid_t    domid;         /*  0: Identify blkdev interface.          */
   3.317 -    u32        blkif_handle;  /*  4: ...ditto...                         */
   3.318 -    blkif_vdev_t vdevice;     /*  8: Interface-specific id of the VBD.   */
   3.319 -    u16        __pad;         /* 10 */
   3.320 -    /* OUT */
   3.321 -    u32        status;        /* 12 */
   3.322 -} PACKED blkif_be_vbd_shrink_t; /* 16 bytes */
   3.323 -
   3.324 -/*
   3.325 - * CMSG_BLKIF_BE_DRIVER_STATUS_CHANGED:
   3.326 - *  Notify the domain controller that the back-end driver is DOWN or UP.
   3.327 - *  If the driver goes DOWN while interfaces are still UP, the controller
   3.328 - *  will automatically send DOWN notifications.
   3.329 - */
   3.330 -typedef struct {
   3.331 -    u32        status;        /*  0: BLKIF_DRIVER_STATUS_??? */
   3.332 -} PACKED blkif_be_driver_status_changed_t; /* 4 bytes */
   3.333 -
   3.334 -
   3.335 -/******************************************************************************
   3.336 - * NETWORK-INTERFACE FRONTEND DEFINITIONS
   3.337 - */
   3.338 -
   3.339 -/* Messages from domain controller to guest. */
   3.340 -#define CMSG_NETIF_FE_INTERFACE_STATUS_CHANGED   0
   3.341 -
   3.342 -/* Messages from guest to domain controller. */
   3.343 -#define CMSG_NETIF_FE_DRIVER_STATUS_CHANGED     32
   3.344 -#define CMSG_NETIF_FE_INTERFACE_CONNECT         33
   3.345 -#define CMSG_NETIF_FE_INTERFACE_DISCONNECT      34
   3.346 -
   3.347 -/*
   3.348 - * CMSG_NETIF_FE_INTERFACE_STATUS_CHANGED:
   3.349 - *  Notify a guest about a status change on one of its network interfaces.
   3.350 - *  If the interface is DESTROYED or DOWN then the interface is disconnected:
   3.351 - *   1. The shared-memory frame is available for reuse.
   3.352 - *   2. Any unacknowledged messgaes pending on the interface were dropped.
   3.353 - */
   3.354 -#define NETIF_INTERFACE_STATUS_DESTROYED    0 /* Interface doesn't exist.    */
   3.355 -#define NETIF_INTERFACE_STATUS_DISCONNECTED 1 /* Exists but is disconnected. */
   3.356 -#define NETIF_INTERFACE_STATUS_CONNECTED    2 /* Exists and is connected.    */
   3.357 -typedef struct {
   3.358 -    u32        handle; /*  0 */
   3.359 -    u32        status; /*  4 */
   3.360 -    u16        evtchn; /*  8: status == NETIF_INTERFACE_STATUS_CONNECTED */
   3.361 -    u8         mac[6]; /* 10: status == NETIF_INTERFACE_STATUS_CONNECTED */
   3.362 -} PACKED netif_fe_interface_status_changed_t; /* 16 bytes */
   3.363 -
   3.364 -/*
   3.365 - * CMSG_NETIF_FE_DRIVER_STATUS_CHANGED:
   3.366 - *  Notify the domain controller that the front-end driver is DOWN or UP.
   3.367 - *  When the driver goes DOWN then the controller will send no more
   3.368 - *  status-change notifications. When the driver comes UP then the controller
   3.369 - *  will send a notification for each interface that currently exists.
   3.370 - *  If the driver goes DOWN while interfaces are still UP, the domain
   3.371 - *  will automatically take the interfaces DOWN.
   3.372 - */
   3.373 -#define NETIF_DRIVER_STATUS_DOWN   0
   3.374 -#define NETIF_DRIVER_STATUS_UP     1
   3.375 -typedef struct {
   3.376 -    /* IN */
   3.377 -    u32        status;        /*  0: NETIF_DRIVER_STATUS_??? */
   3.378 -    /* OUT */
   3.379 -    /*
   3.380 -     * Tells driver how many interfaces it should expect to immediately
   3.381 -     * receive notifications about.
   3.382 -     */
   3.383 -    u32        nr_interfaces; /*  4 */
   3.384 -} PACKED netif_fe_driver_status_changed_t; /* 8 bytes */
   3.385 -
   3.386 -/*
   3.387 - * CMSG_NETIF_FE_INTERFACE_CONNECT:
   3.388 - *  If successful, the domain controller will acknowledge with a
   3.389 - *  STATUS_CONNECTED message.
   3.390 - */
   3.391 -typedef struct {
   3.392 -    u32        handle;         /*  0 */
   3.393 -    u32        __pad;          /*  4 */
   3.394 -    memory_t   tx_shmem_frame; /*  8 */
   3.395 -    MEMORY_PADDING;
   3.396 -    memory_t   rx_shmem_frame; /* 16 */
   3.397 -    MEMORY_PADDING;
   3.398 -} PACKED netif_fe_interface_connect_t; /* 24 bytes */
   3.399 -
   3.400 -/*
   3.401 - * CMSG_NETIF_FE_INTERFACE_DISCONNECT:
   3.402 - *  If successful, the domain controller will acknowledge with a
   3.403 - *  STATUS_DISCONNECTED message.
   3.404 - */
   3.405 -typedef struct {
   3.406 -    u32        handle;        /*  0 */
   3.407 -} PACKED netif_fe_interface_disconnect_t; /* 4 bytes */
   3.408 -
   3.409 -
   3.410 -/******************************************************************************
   3.411 - * NETWORK-INTERFACE BACKEND DEFINITIONS
   3.412 - */
   3.413 -
   3.414 -/* Messages from domain controller. */
   3.415 -#define CMSG_NETIF_BE_CREATE      0  /* Create a new net-device interface. */
   3.416 -#define CMSG_NETIF_BE_DESTROY     1  /* Destroy a net-device interface.    */
   3.417 -#define CMSG_NETIF_BE_CONNECT     2  /* Connect i/f to remote driver.        */
   3.418 -#define CMSG_NETIF_BE_DISCONNECT  3  /* Disconnect i/f from remote driver.   */
   3.419 -
   3.420 -/* Messages to domain controller. */
   3.421 -#define CMSG_NETIF_BE_DRIVER_STATUS_CHANGED 32
   3.422 -
   3.423 -/*
   3.424 - * Message request/response definitions for net-device messages.
   3.425 - */
   3.426 -
   3.427 -/* Non-specific 'okay' return. */
   3.428 -#define NETIF_BE_STATUS_OKAY                0
   3.429 -/* Non-specific 'error' return. */
   3.430 -#define NETIF_BE_STATUS_ERROR               1
   3.431 -/* The following are specific error returns. */
   3.432 -#define NETIF_BE_STATUS_INTERFACE_EXISTS    2
   3.433 -#define NETIF_BE_STATUS_INTERFACE_NOT_FOUND 3
   3.434 -#define NETIF_BE_STATUS_INTERFACE_CONNECTED 4
   3.435 -#define NETIF_BE_STATUS_OUT_OF_MEMORY       5
   3.436 -#define NETIF_BE_STATUS_MAPPING_ERROR       6
   3.437 -
   3.438 -/* This macro can be used to create an array of descriptive error strings. */
   3.439 -#define NETIF_BE_STATUS_ERRORS {    \
   3.440 -    "Okay",                         \
   3.441 -    "Non-specific error",           \
   3.442 -    "Interface already exists",     \
   3.443 -    "Interface not found",          \
   3.444 -    "Interface is still connected", \
   3.445 -    "Out of memory",                \
   3.446 -    "Could not map domain memory" }
   3.447 -
   3.448 -/*
   3.449 - * CMSG_NETIF_BE_CREATE:
   3.450 - *  When the driver sends a successful response then the interface is fully
   3.451 - *  created. The controller will send a DOWN notification to the front-end
   3.452 - *  driver.
   3.453 - */
   3.454 -typedef struct { 
   3.455 -    /* IN */
   3.456 -    domid_t    domid;         /*  0: Domain attached to new interface.   */
   3.457 -    u32        netif_handle;  /*  4: Domain-specific interface handle.   */
   3.458 -    u8         mac[6];        /*  8 */
   3.459 -    u16        __pad;         /* 14 */
   3.460 -    /* OUT */
   3.461 -    u32        status;        /* 16 */
   3.462 -} PACKED netif_be_create_t; /* 20 bytes */
   3.463 -
   3.464 -/*
   3.465 - * CMSG_NETIF_BE_DESTROY:
   3.466 - *  When the driver sends a successful response then the interface is fully
   3.467 - *  torn down. The controller will send a DESTROYED notification to the
   3.468 - *  front-end driver.
   3.469 - */
   3.470 -typedef struct { 
   3.471 -    /* IN */
   3.472 -    domid_t    domid;         /*  0: Identify interface to be destroyed. */
   3.473 -    u32        netif_handle;  /*  4: ...ditto...                         */
   3.474 -    /* OUT */
   3.475 -    u32   status;             /*  8 */
   3.476 -} PACKED netif_be_destroy_t; /* 12 bytes */
   3.477 -
   3.478 -/*
   3.479 - * CMSG_NETIF_BE_CONNECT:
   3.480 - *  When the driver sends a successful response then the interface is fully
   3.481 - *  connected. The controller will send a CONNECTED notification to the
   3.482 - *  front-end driver.
   3.483 - */
   3.484 -typedef struct { 
   3.485 -    /* IN */
   3.486 -    domid_t    domid;          /*  0: Domain attached to new interface.   */
   3.487 -    u32        netif_handle;   /*  4: Domain-specific interface handle.   */
   3.488 -    memory_t   tx_shmem_frame; /*  8: Page cont. tx shared comms window.  */
   3.489 -    MEMORY_PADDING;
   3.490 -    memory_t   rx_shmem_frame; /* 16: Page cont. rx shared comms window.  */
   3.491 -    MEMORY_PADDING;
   3.492 -    u16        evtchn;         /* 24: Event channel for notifications.    */
   3.493 -    u16        __pad;          /* 26 */
   3.494 -    /* OUT */
   3.495 -    u32        status;         /* 28 */
   3.496 -} PACKED netif_be_connect_t; /* 32 bytes */
   3.497 -
   3.498 -/*
   3.499 - * CMSG_NETIF_BE_DISCONNECT:
   3.500 - *  When the driver sends a successful response then the interface is fully
   3.501 - *  disconnected. The controller will send a DOWN notification to the front-end
   3.502 - *  driver.
   3.503 - */
   3.504 -typedef struct { 
   3.505 -    /* IN */
   3.506 -    domid_t    domid;         /*  0: Domain attached to new interface.   */
   3.507 -    u32        netif_handle;  /*  4: Domain-specific interface handle.   */
   3.508 -    /* OUT */
   3.509 -    u32        status;        /*  8 */
   3.510 -} PACKED netif_be_disconnect_t; /* 12 bytes */
   3.511 -
   3.512 -/*
   3.513 - * CMSG_NETIF_BE_DRIVER_STATUS_CHANGED:
   3.514 - *  Notify the domain controller that the back-end driver is DOWN or UP.
   3.515 - *  If the driver goes DOWN while interfaces are still UP, the domain
   3.516 - *  will automatically send DOWN notifications.
   3.517 - */
   3.518 -typedef struct {
   3.519 -    u32        status;        /*  0: NETIF_DRIVER_STATUS_??? */
   3.520 -} PACKED netif_be_driver_status_changed_t; /* 4 bytes */
   3.521 -
   3.522 -
   3.523 -/******************************************************************************
   3.524 - * SHUTDOWN DEFINITIONS
   3.525 - */
   3.526 -
   3.527 -/*
   3.528 - * Subtypes for shutdown messages.
   3.529 - */
   3.530 -#define CMSG_SHUTDOWN_POWEROFF  0   /* Clean shutdown (SHUTDOWN_poweroff).   */
   3.531 -#define CMSG_SHUTDOWN_REBOOT    1   /* Clean shutdown (SHUTDOWN_reboot).     */
   3.532 -#define CMSG_SHUTDOWN_SUSPEND   2   /* Create suspend info, then             */
   3.533 -                                    /* SHUTDOWN_suspend.                     */
   3.534 -
   3.535 -#endif /* __DOMAIN_CONTROLLER_H__ */
     4.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_32.h	Thu Jul 29 14:51:29 2004 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,138 +0,0 @@
     4.4 -/******************************************************************************
     4.5 - * arch-i386/hypervisor-if.h
     4.6 - * 
     4.7 - * Guest OS interface to x86 32-bit Xen.
     4.8 - */
     4.9 -
    4.10 -#ifndef __HYPERVISOR_IF_I386_H__
    4.11 -#define __HYPERVISOR_IF_I386_H__
    4.12 -
    4.13 -/*
    4.14 - * Pointers and other address fields inside interface structures are padded to
    4.15 - * 64 bits. This means that field alignments aren't different between 32- and
    4.16 - * 64-bit architectures. 
    4.17 - */
    4.18 -/* NB. Multi-level macro ensures __LINE__ is expanded before concatenation. */
    4.19 -#define __MEMORY_PADDING(_X) u32 __pad_ ## _X
    4.20 -#define _MEMORY_PADDING(_X)  __MEMORY_PADDING(_X)
    4.21 -#define MEMORY_PADDING       _MEMORY_PADDING(__LINE__)
    4.22 -
    4.23 -/*
    4.24 - * SEGMENT DESCRIPTOR TABLES
    4.25 - */
    4.26 -/*
    4.27 - * A number of GDT entries are reserved by Xen. These are not situated at the
    4.28 - * start of the GDT because some stupid OSes export hard-coded selector values
    4.29 - * in their ABI. These hard-coded values are always near the start of the GDT,
    4.30 - * so Xen places itself out of the way.
    4.31 - * 
    4.32 - * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
    4.33 - * and LAST_RESERVED_GDT_ENTRY are reserved).
    4.34 - */
    4.35 -#define NR_RESERVED_GDT_ENTRIES    40
    4.36 -#define FIRST_RESERVED_GDT_ENTRY   256
    4.37 -#define LAST_RESERVED_GDT_ENTRY    \
    4.38 -  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
    4.39 -
    4.40 -
    4.41 -/*
    4.42 - * These flat segments are in the Xen-private section of every GDT. Since these
    4.43 - * are also present in the initial GDT, many OSes will be able to avoid
    4.44 - * installing their own GDT.
    4.45 - */
    4.46 -#define FLAT_RING1_CS 0x0819    /* GDT index 259 */
    4.47 -#define FLAT_RING1_DS 0x0821    /* GDT index 260 */
    4.48 -#define FLAT_RING3_CS 0x082b    /* GDT index 261 */
    4.49 -#define FLAT_RING3_DS 0x0833    /* GDT index 262 */
    4.50 -
    4.51 -#define FLAT_GUESTOS_CS FLAT_RING1_CS
    4.52 -#define FLAT_GUESTOS_DS FLAT_RING1_DS
    4.53 -#define FLAT_USER_CS    FLAT_RING3_CS
    4.54 -#define FLAT_USER_DS    FLAT_RING3_DS
    4.55 -
    4.56 -/* And the trap vector is... */
    4.57 -#define TRAP_INSTR "int $0x82"
    4.58 -
    4.59 -
    4.60 -/*
    4.61 - * Virtual addresses beyond this are not modifiable by guest OSes. The 
    4.62 - * machine->physical mapping table starts at this address, read-only.
    4.63 - */
    4.64 -#define HYPERVISOR_VIRT_START (0xFC000000UL)
    4.65 -#ifndef machine_to_phys_mapping
    4.66 -#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
    4.67 -#endif
    4.68 -
    4.69 -#ifndef __ASSEMBLY__
    4.70 -
    4.71 -/* NB. Both the following are 32 bits each. */
    4.72 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    4.73 -typedef unsigned long cpureg_t;   /* Full-sized register.                    */
    4.74 -
    4.75 -/*
    4.76 - * Send an array of these to HYPERVISOR_set_trap_table()
    4.77 - */
    4.78 -#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
    4.79 -#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
    4.80 -#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
    4.81 -#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
    4.82 -typedef struct {
    4.83 -    u8       vector;  /* 0: exception vector                              */
    4.84 -    u8       flags;   /* 1: 0-3: privilege level; 4: clear event enable?  */
    4.85 -    u16      cs;      /* 2: code selector                                 */
    4.86 -    memory_t address; /* 4: code address                                  */
    4.87 -} PACKED trap_info_t; /* 8 bytes */
    4.88 -
    4.89 -typedef struct
    4.90 -{
    4.91 -    unsigned long ebx;
    4.92 -    unsigned long ecx;
    4.93 -    unsigned long edx;
    4.94 -    unsigned long esi;
    4.95 -    unsigned long edi;
    4.96 -    unsigned long ebp;
    4.97 -    unsigned long eax;
    4.98 -    unsigned long ds;
    4.99 -    unsigned long es;
   4.100 -    unsigned long fs;
   4.101 -    unsigned long gs;
   4.102 -    unsigned long _unused;
   4.103 -    unsigned long eip;
   4.104 -    unsigned long cs;
   4.105 -    unsigned long eflags;
   4.106 -    unsigned long esp;
   4.107 -    unsigned long ss;
   4.108 -} PACKED execution_context_t;
   4.109 -
   4.110 -typedef struct {
   4.111 -    u32  tsc_bits;      /* 0: 32 bits read from the CPU's TSC. */
   4.112 -    u32  tsc_bitshift;  /* 4: 'tsc_bits' uses N:N+31 of TSC.   */
   4.113 -} PACKED tsc_timestamp_t; /* 8 bytes */
   4.114 -
   4.115 -/*
   4.116 - * The following is all CPU context. Note that the i387_ctxt block is filled 
   4.117 - * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
   4.118 - */
   4.119 -typedef struct {
   4.120 -#define ECF_I387_VALID (1<<0)
   4.121 -    unsigned long flags;
   4.122 -    execution_context_t cpu_ctxt;           /* User-level CPU registers     */
   4.123 -    char          fpu_ctxt[256];            /* User-level FPU registers     */
   4.124 -    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
   4.125 -    unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
   4.126 -    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
   4.127 -    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
   4.128 -    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
   4.129 -    unsigned long pt_base;                  /* CR3 (pagetable base)         */
   4.130 -    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
   4.131 -    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
   4.132 -    unsigned long event_callback_eip;
   4.133 -    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
   4.134 -    unsigned long failsafe_callback_eip;
   4.135 -} PACKED full_execution_context_t;
   4.136 -
   4.137 -#define ARCH_HAS_FAST_TRAP
   4.138 -
   4.139 -#endif
   4.140 -
   4.141 -#endif
     5.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_64.h	Thu Jul 29 14:51:29 2004 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,135 +0,0 @@
     5.4 -/******************************************************************************
     5.5 - * arch-x86_64/hypervisor-if.h
     5.6 - * 
     5.7 - * Guest OS interface to AMD x86-64 bit Xen.
     5.8 - */
     5.9 -
    5.10 -#ifndef __HYPERVISOR_IF_X86_64_H__
    5.11 -#define __HYPERVISOR_IF_X86_64_H__
    5.12 -
    5.13 -/* Pointers are naturally 64 bits in this architecture; no padding needed. */
    5.14 -#define _MEMORY_PADDING(_X)
    5.15 -#define MEMORY_PADDING 
    5.16 -
    5.17 -/*
    5.18 - * SEGMENT DESCRIPTOR TABLES
    5.19 - */
    5.20 -/*
    5.21 - * A number of GDT entries are reserved by Xen. These are not situated at the
    5.22 - * start of the GDT because some stupid OSes export hard-coded selector values
    5.23 - * in their ABI. These hard-coded values are always near the start of the GDT,
    5.24 - * so Xen places itself out of the way.
    5.25 - * 
    5.26 - * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
    5.27 - * and LAST_RESERVED_GDT_ENTRY are reserved).
    5.28 - */
    5.29 -#define NR_RESERVED_GDT_ENTRIES    40 
    5.30 -#define FIRST_RESERVED_GDT_ENTRY   256
    5.31 -#define LAST_RESERVED_GDT_ENTRY    \
    5.32 -  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
    5.33 -
    5.34 -/*
    5.35 - * 64-bit segment selectors
    5.36 - * These flat segments are in the Xen-private section of every GDT. Since these
    5.37 - * are also present in the initial GDT, many OSes will be able to avoid
    5.38 - * installing their own GDT.
    5.39 - */
    5.40 -
    5.41 -#define FLAT_RING3_CS32 0x0823  /* GDT index 260 */
    5.42 -#define FLAT_RING3_CS64 0x082b  /* GDT index 261 */
    5.43 -#define FLAT_RING3_DS   0x0833  /* GDT index 262 */
    5.44 -
    5.45 -#define FLAT_GUESTOS_DS   FLAT_RING3_DS
    5.46 -#define FLAT_GUESTOS_CS   FLAT_RING3_CS64
    5.47 -#define FLAT_GUESTOS_CS32 FLAT_RING3_CS32
    5.48 -
    5.49 -#define FLAT_USER_DS      FLAT_RING3_DS
    5.50 -#define FLAT_USER_CS      FLAT_RING3_CS64
    5.51 -#define FLAT_USER_CS32    FLAT_RING3_CS32
    5.52 -
    5.53 -/* And the trap vector is... */
    5.54 -#define TRAP_INSTR "syscall"
    5.55 -
    5.56 -/* The machine->physical mapping table starts at this address, read-only. */
    5.57 -#ifndef machine_to_phys_mapping
    5.58 -#define machine_to_phys_mapping ((unsigned long *)0xffff810000000000ULL)
    5.59 -#endif
    5.60 -
    5.61 -#ifndef __ASSEMBLY__
    5.62 -
    5.63 -/* NB. Both the following are 64 bits each. */
    5.64 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    5.65 -typedef unsigned long cpureg_t;   /* Full-sized register.                    */
    5.66 -
    5.67 -/*
    5.68 - * Send an array of these to HYPERVISOR_set_trap_table()
    5.69 - */
    5.70 -#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
    5.71 -#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
    5.72 -#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
    5.73 -#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
    5.74 -typedef struct {
    5.75 -    u8       vector;  /* 0: exception vector                              */
    5.76 -    u8       flags;   /* 1: 0-3: privilege level; 4: clear event enable?  */
    5.77 -    u16      cs;      /* 2: code selector                                 */
    5.78 -    u32      __pad;   /* 4 */
    5.79 -    memory_t address; /* 8: code address                                  */
    5.80 -} PACKED trap_info_t; /* 16 bytes */
    5.81 -
    5.82 -typedef struct
    5.83 -{
    5.84 -    unsigned long r15;
    5.85 -    unsigned long r14;
    5.86 -    unsigned long r13;
    5.87 -    unsigned long r12;
    5.88 -    unsigned long rbp;
    5.89 -    unsigned long rbx;
    5.90 -    unsigned long r11;
    5.91 -    unsigned long r10;
    5.92 -    unsigned long r9;
    5.93 -    unsigned long r8;
    5.94 -    unsigned long rax;
    5.95 -    unsigned long rcx;
    5.96 -    unsigned long rdx;
    5.97 -    unsigned long rsi;
    5.98 -    unsigned long rdi;
    5.99 -    unsigned long rip;
   5.100 -    unsigned long cs;
   5.101 -    unsigned long eflags;
   5.102 -    unsigned long rsp;
   5.103 -    unsigned long ss;
   5.104 -} PACKED execution_context_t;
   5.105 -
   5.106 -/*
   5.107 - * NB. This may become a 64-bit count with no shift. If this happens then the 
   5.108 - * structure size will still be 8 bytes, so no other alignments will change.
   5.109 - */
   5.110 -typedef struct {
   5.111 -    u32  tsc_bits;      /* 0: 32 bits read from the CPU's TSC. */
   5.112 -    u32  tsc_bitshift;  /* 4: 'tsc_bits' uses N:N+31 of TSC.   */
   5.113 -} PACKED tsc_timestamp_t; /* 8 bytes */
   5.114 -
   5.115 -/*
   5.116 - * The following is all CPU context. Note that the i387_ctxt block is filled 
   5.117 - * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
   5.118 - */
   5.119 -typedef struct {
   5.120 -#define ECF_I387_VALID (1<<0)
   5.121 -    unsigned long flags;
   5.122 -    execution_context_t cpu_ctxt;           /* User-level CPU registers     */
   5.123 -    char          fpu_ctxt[512];            /* User-level FPU registers     */
   5.124 -    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
   5.125 -    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
   5.126 -    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
   5.127 -    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
   5.128 -    unsigned long pt_base;                  /* CR3 (pagetable base)         */
   5.129 -    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
   5.130 -    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
   5.131 -    unsigned long event_callback_eip;
   5.132 -    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
   5.133 -    unsigned long failsafe_callback_eip;
   5.134 -} PACKED full_execution_context_t;
   5.135 -
   5.136 -#endif /* !__ASSEMBLY__ */
   5.137 -
   5.138 -#endif /* __HYPERVISOR_IF_H__ */
     6.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/dom0_ops.h	Thu Jul 29 14:51:29 2004 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,356 +0,0 @@
     6.4 -/******************************************************************************
     6.5 - * dom0_ops.h
     6.6 - * 
     6.7 - * Process command requests from domain-0 guest OS.
     6.8 - * 
     6.9 - * Copyright (c) 2002-2003, B Dragovic
    6.10 - * Copyright (c) 2002-2004, K Fraser
    6.11 - */
    6.12 -
    6.13 -
    6.14 -#ifndef __DOM0_OPS_H__
    6.15 -#define __DOM0_OPS_H__
    6.16 -
    6.17 -#include "hypervisor-if.h"
    6.18 -#include "sched_ctl.h"
    6.19 -
    6.20 -/*
    6.21 - * Make sure you increment the interface version whenever you modify this file!
    6.22 - * This makes sure that old versions of dom0 tools will stop working in a
    6.23 - * well-defined way (rather than crashing the machine, for instance).
    6.24 - */
    6.25 -#define DOM0_INTERFACE_VERSION   0xAAAA0010
    6.26 -
    6.27 -#define MAX_DOMAIN_NAME    16
    6.28 -
    6.29 -/************************************************************************/
    6.30 -
    6.31 -#define DOM0_GETMEMLIST        2
    6.32 -typedef struct {
    6.33 -    /* IN variables. */
    6.34 -    domid_t       domain;             /*  0 */
    6.35 -    u32           __pad;
    6.36 -    memory_t      max_pfns;           /*  8 */
    6.37 -    MEMORY_PADDING;
    6.38 -    void         *buffer;             /* 16 */
    6.39 -    MEMORY_PADDING;
    6.40 -    /* OUT variables. */
    6.41 -    memory_t      num_pfns;           /* 24 */
    6.42 -    MEMORY_PADDING;
    6.43 -} PACKED dom0_getmemlist_t; /* 32 bytes */
    6.44 -
    6.45 -#define DOM0_SCHEDCTL          6
    6.46 - /* struct sched_ctl_cmd is from sched-ctl.h   */
    6.47 -typedef struct sched_ctl_cmd dom0_schedctl_t;
    6.48 -
    6.49 -#define DOM0_ADJUSTDOM         7
    6.50 -/* struct sched_adjdom_cmd is from sched-ctl.h */
    6.51 -typedef struct sched_adjdom_cmd dom0_adjustdom_t;
    6.52 -
    6.53 -#define DOM0_CREATEDOMAIN      8
    6.54 -typedef struct {
    6.55 -    /* IN parameters. */
    6.56 -    memory_t     memory_kb;           /*  0 */
    6.57 -    MEMORY_PADDING;
    6.58 -    u8           name[MAX_DOMAIN_NAME]; /*  8 */
    6.59 -    u32          cpu;                 /* 24 */
    6.60 -    u32          __pad;               /* 28 */
    6.61 -    /* OUT parameters. */
    6.62 -    domid_t      domain;              /* 32 */
    6.63 -} PACKED dom0_createdomain_t; /* 36 bytes */
    6.64 -
    6.65 -#define DOM0_DESTROYDOMAIN     9
    6.66 -typedef struct {
    6.67 -    /* IN variables. */
    6.68 -    domid_t      domain;              /*  0 */
    6.69 -} PACKED dom0_destroydomain_t; /* 4 bytes */
    6.70 -
    6.71 -#define DOM0_PAUSEDOMAIN      10
    6.72 -typedef struct {
    6.73 -    /* IN parameters. */
    6.74 -    domid_t domain;                   /*  0 */
    6.75 -} PACKED dom0_pausedomain_t; /* 4 bytes */
    6.76 -
    6.77 -#define DOM0_UNPAUSEDOMAIN    11
    6.78 -typedef struct {
    6.79 -    /* IN parameters. */
    6.80 -    domid_t domain;                   /*  0 */
    6.81 -} PACKED dom0_unpausedomain_t; /* 4 bytes */
    6.82 -
    6.83 -#define DOM0_GETDOMAININFO    12
    6.84 -typedef struct {
    6.85 -    /* IN variables. */
    6.86 -    domid_t  domain;                  /*  0 */ /* NB. IN/OUT variable. */
    6.87 -    /* OUT variables. */
    6.88 -#define DOMFLAGS_DYING     (1<<0) /* Domain is scheduled to die.             */
    6.89 -#define DOMFLAGS_CRASHED   (1<<1) /* Crashed domain; frozen for postmortem.  */
    6.90 -#define DOMFLAGS_SHUTDOWN  (1<<2) /* The guest OS has shut itself down.      */
    6.91 -#define DOMFLAGS_PAUSED    (1<<3) /* Currently paused by control software.   */
    6.92 -#define DOMFLAGS_BLOCKED   (1<<4) /* Currently blocked pending an event.     */
    6.93 -#define DOMFLAGS_RUNNING   (1<<5) /* Domain is currently running.            */
    6.94 -#define DOMFLAGS_CPUMASK      255 /* CPU to which this domain is bound.      */
    6.95 -#define DOMFLAGS_CPUSHIFT       8
    6.96 -#define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
    6.97 -#define DOMFLAGS_SHUTDOWNSHIFT 16
    6.98 -    u32      flags;                   /*  4 */
    6.99 -    u8       name[MAX_DOMAIN_NAME];   /*  8 */
   6.100 -    full_execution_context_t *ctxt;   /* 24 */ /* NB. IN/OUT variable. */
   6.101 -    MEMORY_PADDING;
   6.102 -    memory_t tot_pages;               /* 32 */
   6.103 -    MEMORY_PADDING;
   6.104 -    memory_t max_pages;               /* 40 */
   6.105 -    MEMORY_PADDING;
   6.106 -    memory_t shared_info_frame;       /* 48: MFN of shared_info struct */
   6.107 -    MEMORY_PADDING;
   6.108 -    u64      cpu_time;                /* 56 */
   6.109 -} PACKED dom0_getdomaininfo_t; /* 64 bytes */
   6.110 -
   6.111 -#define DOM0_BUILDDOMAIN      13
   6.112 -typedef struct {
   6.113 -    /* IN variables. */
   6.114 -    domid_t                 domain;   /*  0 */
   6.115 -    u32                     __pad;    /*  4 */
   6.116 -    /* IN/OUT parameters */
   6.117 -    full_execution_context_t *ctxt;   /*  8 */
   6.118 -    MEMORY_PADDING;
   6.119 -} PACKED dom0_builddomain_t; /* 16 bytes */
   6.120 -
   6.121 -#define DOM0_IOPL             14
   6.122 -typedef struct {
   6.123 -    domid_t domain;                   /*  0 */
   6.124 -    u32     iopl;                     /*  4 */
   6.125 -} PACKED dom0_iopl_t; /* 8 bytes */
   6.126 -
   6.127 -#define DOM0_MSR              15
   6.128 -typedef struct {
   6.129 -    /* IN variables. */
   6.130 -    u32 write;                        /*  0 */
   6.131 -    u32 cpu_mask;                     /*  4 */
   6.132 -    u32 msr;                          /*  8 */
   6.133 -    u32 in1;                          /* 12 */
   6.134 -    u32 in2;                          /* 16 */
   6.135 -    /* OUT variables. */
   6.136 -    u32 out1;                         /* 20 */
   6.137 -    u32 out2;                         /* 24 */
   6.138 -} PACKED dom0_msr_t; /* 28 bytes */
   6.139 -
   6.140 -#define DOM0_DEBUG            16
   6.141 -typedef struct {
   6.142 -    /* IN variables. */
   6.143 -    domid_t domain;                   /*  0 */
   6.144 -    u8  opcode;                       /*  4 */
   6.145 -    u8  __pad0, __pad1, __pad2;
   6.146 -    u32 in1;                          /*  8 */
   6.147 -    u32 in2;                          /* 12 */
   6.148 -    u32 in3;                          /* 16 */
   6.149 -    u32 in4;                          /* 20 */
   6.150 -    /* OUT variables. */
   6.151 -    u32 status;                       /* 24 */
   6.152 -    u32 out1;                         /* 28 */
   6.153 -    u32 out2;                         /* 32 */
   6.154 -} PACKED dom0_debug_t; /* 36 bytes */
   6.155 -
   6.156 -/*
   6.157 - * Set clock such that it would read <secs,usecs> after 00:00:00 UTC,
   6.158 - * 1 January, 1970 if the current system time was <system_time>.
   6.159 - */
   6.160 -#define DOM0_SETTIME          17
   6.161 -typedef struct {
   6.162 -    /* IN variables. */
   6.163 -    u32 secs;                         /*  0 */
   6.164 -    u32 usecs;                        /*  4 */
   6.165 -    u64 system_time;                  /*  8 */
   6.166 -} PACKED dom0_settime_t; /* 16 bytes */
   6.167 -
   6.168 -#define DOM0_GETPAGEFRAMEINFO 18
   6.169 -#define NOTAB 0         /* normal page */
   6.170 -#define L1TAB (1<<28)
   6.171 -#define L2TAB (2<<28)
   6.172 -#define L3TAB (3<<28)
   6.173 -#define L4TAB (4<<28)
   6.174 -#define XTAB  (0xf<<28) /* invalid page */
   6.175 -#define LTAB_MASK XTAB
   6.176 -typedef struct {
   6.177 -    /* IN variables. */
   6.178 -    memory_t pfn;          /*  0: Machine page frame number to query.       */
   6.179 -    MEMORY_PADDING;
   6.180 -    domid_t domain;        /*  8: To which domain does the frame belong?    */
   6.181 -    /* OUT variables. */
   6.182 -    /* Is the page PINNED to a type? */
   6.183 -    u32 type;              /* 12: see above type defs */
   6.184 -} PACKED dom0_getpageframeinfo_t; /* 16 bytes */
   6.185 -
   6.186 -/*
   6.187 - * Read console content from Xen buffer ring.
   6.188 - */
   6.189 -#define DOM0_READCONSOLE      19
   6.190 -typedef struct {
   6.191 -    memory_t str;                     /*  0 */
   6.192 -    MEMORY_PADDING;
   6.193 -    u32      count;                   /*  8 */
   6.194 -    u32      cmd;                     /* 12 */
   6.195 -} PACKED dom0_readconsole_t; /* 16 bytes */
   6.196 -
   6.197 -/* 
   6.198 - * Pin Domain to a particular CPU  (use -1 to unpin)
   6.199 - */
   6.200 -#define DOM0_PINCPUDOMAIN     20
   6.201 -typedef struct {
   6.202 -    /* IN variables. */
   6.203 -    domid_t      domain;              /*  0 */
   6.204 -    s32          cpu;                 /*  4: -1 implies unpin */
   6.205 -} PACKED dom0_pincpudomain_t; /* 8 bytes */
   6.206 -
   6.207 -/* Get trace buffers physical base pointer */
   6.208 -#define DOM0_GETTBUFS         21
   6.209 -typedef struct {
   6.210 -    /* OUT variables */
   6.211 -    memory_t phys_addr;   /*  0: location of the trace buffers       */
   6.212 -    MEMORY_PADDING;
   6.213 -    u32      size;        /*  8: size of each trace buffer, in bytes */
   6.214 -} PACKED dom0_gettbufs_t; /* 12 bytes */
   6.215 -
   6.216 -/*
   6.217 - * Get physical information about the host machine
   6.218 - */
   6.219 -#define DOM0_PHYSINFO         22
   6.220 -typedef struct {
   6.221 -    u32      ht_per_core;             /*  0 */
   6.222 -    u32      cores;                   /*  4 */
   6.223 -    u32      cpu_khz;                 /*  8 */
   6.224 -    u32      __pad;                   /* 12 */
   6.225 -    memory_t total_pages;             /* 16 */
   6.226 -    MEMORY_PADDING;
   6.227 -    memory_t free_pages;              /* 24 */
   6.228 -    MEMORY_PADDING;
   6.229 -} PACKED dom0_physinfo_t; /* 32 bytes */
   6.230 -
   6.231 -/* 
   6.232 - * Allow a domain access to a physical PCI device
   6.233 - */
   6.234 -#define DOM0_PCIDEV_ACCESS    23
   6.235 -typedef struct {
   6.236 -    /* IN variables. */
   6.237 -    domid_t      domain;              /*  0 */
   6.238 -    u32          bus;                 /*  4 */
   6.239 -    u32          dev;                 /*  8 */
   6.240 -    u32          func;                /* 12 */
   6.241 -    u32          enable;              /* 16 */
   6.242 -} PACKED dom0_pcidev_access_t; /* 20 bytes */
   6.243 -
   6.244 -/*
   6.245 - * Get the ID of the current scheduler.
   6.246 - */
   6.247 -#define DOM0_SCHED_ID        24
   6.248 -typedef struct {
   6.249 -    /* OUT variable */
   6.250 -    u32 sched_id;                     /*  0 */
   6.251 -} PACKED dom0_sched_id_t; /* 4 bytes */
   6.252 -
   6.253 -/* 
   6.254 - * Control shadow pagetables operation
   6.255 - */
   6.256 -#define DOM0_SHADOW_CONTROL  25
   6.257 -
   6.258 -#define DOM0_SHADOW_CONTROL_OP_OFF         0
   6.259 -#define DOM0_SHADOW_CONTROL_OP_ENABLE_TEST 1
   6.260 -#define DOM0_SHADOW_CONTROL_OP_ENABLE_LOGDIRTY 2
   6.261 -#define DOM0_SHADOW_CONTROL_OP_ENABLE_TRANSLATE 3
   6.262 -#define DOM0_SHADOW_CONTROL_OP_FLUSH       10     /* table ops */
   6.263 -#define DOM0_SHADOW_CONTROL_OP_CLEAN       11
   6.264 -#define DOM0_SHADOW_CONTROL_OP_PEEK        12
   6.265 -#define DOM0_SHADOW_CONTROL_OP_CLEAN2      13
   6.266 -
   6.267 -typedef struct dom0_shadow_control
   6.268 -{
   6.269 -    u32 fault_count;
   6.270 -    u32 dirty_count;
   6.271 -    u32 dirty_net_count;     
   6.272 -    u32 dirty_block_count;     
   6.273 -} dom0_shadow_control_stats_t;
   6.274 -
   6.275 -typedef struct {
   6.276 -    /* IN variables. */
   6.277 -    domid_t        domain;            /*  0 */
   6.278 -    u32            op;                /*  4 */
   6.279 -    unsigned long *dirty_bitmap;      /*  8: pointer to locked buffer */
   6.280 -    MEMORY_PADDING;
   6.281 -    /* IN/OUT variables. */
   6.282 -    memory_t       pages;  /* 16: size of buffer, updated with actual size */
   6.283 -    MEMORY_PADDING;
   6.284 -    /* OUT variables. */
   6.285 -    dom0_shadow_control_stats_t stats;
   6.286 -} PACKED dom0_shadow_control_t;
   6.287 -
   6.288 -
   6.289 -#define DOM0_SETDOMAINNAME     26
   6.290 -typedef struct {
   6.291 -    /* IN variables. */
   6.292 -    domid_t  domain;                  /*  0 */
   6.293 -    u8       name[MAX_DOMAIN_NAME];   /*  4 */
   6.294 -} PACKED dom0_setdomainname_t; /* 20 bytes */
   6.295 -
   6.296 -#define DOM0_SETDOMAININITIALMEM   27
   6.297 -typedef struct {
   6.298 -    /* IN variables. */
   6.299 -    domid_t     domain;               /*  0 */
   6.300 -    u32         __pad;
   6.301 -    memory_t    initial_memkb;        /*  8 */
   6.302 -    MEMORY_PADDING;
   6.303 -} PACKED dom0_setdomaininitialmem_t; /* 16 bytes */
   6.304 -
   6.305 -#define DOM0_SETDOMAINMAXMEM   28
   6.306 -typedef struct {
   6.307 -    /* IN variables. */
   6.308 -    domid_t     domain;               /*  0 */
   6.309 -    u32         __pad;
   6.310 -    memory_t    max_memkb;            /*  8 */
   6.311 -    MEMORY_PADDING;
   6.312 -} PACKED dom0_setdomainmaxmem_t; /* 16 bytes */
   6.313 -
   6.314 -#define DOM0_GETPAGEFRAMEINFO2 29   /* batched interface */
   6.315 -typedef struct {
   6.316 -    /* IN variables. */
   6.317 -    domid_t  domain;                  /*  0 */
   6.318 -    u32         __pad;
   6.319 -    memory_t num;                     /*  8 */
   6.320 -    MEMORY_PADDING;
   6.321 -    /* IN/OUT variables. */
   6.322 -    unsigned long *array;             /* 16 */
   6.323 -    MEMORY_PADDING;
   6.324 -} PACKED dom0_getpageframeinfo2_t; /* 24 bytes */
   6.325 -
   6.326 -typedef struct {
   6.327 -    u32 cmd;                          /* 0 */
   6.328 -    u32 interface_version;            /* 4 */ /* DOM0_INTERFACE_VERSION */
   6.329 -    union {                           /* 8 */
   6.330 -	u32                      dummy[18]; /* 72 bytes */
   6.331 -        dom0_createdomain_t      createdomain;
   6.332 -        dom0_pausedomain_t       pausedomain;
   6.333 -        dom0_unpausedomain_t     unpausedomain;
   6.334 -        dom0_destroydomain_t     destroydomain;
   6.335 -        dom0_getmemlist_t        getmemlist;
   6.336 -        dom0_schedctl_t          schedctl;
   6.337 -        dom0_adjustdom_t         adjustdom;
   6.338 -        dom0_builddomain_t       builddomain;
   6.339 -        dom0_getdomaininfo_t     getdomaininfo;
   6.340 -        dom0_getpageframeinfo_t  getpageframeinfo;
   6.341 -        dom0_iopl_t              iopl;
   6.342 -	dom0_msr_t               msr;
   6.343 -	dom0_debug_t             debug;
   6.344 -	dom0_settime_t           settime;
   6.345 -	dom0_readconsole_t	 readconsole;
   6.346 -	dom0_pincpudomain_t      pincpudomain;
   6.347 -        dom0_gettbufs_t          gettbufs;
   6.348 -        dom0_physinfo_t          physinfo;
   6.349 -        dom0_pcidev_access_t     pcidev_access;
   6.350 -        dom0_sched_id_t          sched_id;
   6.351 -	dom0_shadow_control_t    shadow_control;
   6.352 -	dom0_setdomainname_t     setdomainname;
   6.353 -	dom0_setdomaininitialmem_t setdomaininitialmem;
   6.354 -	dom0_setdomainmaxmem_t   setdomainmaxmem;
   6.355 -	dom0_getpageframeinfo2_t getpageframeinfo2;
   6.356 -    } PACKED u;
   6.357 -} PACKED dom0_op_t; /* 80 bytes */
   6.358 -
   6.359 -#endif /* __DOM0_OPS_H__ */
     7.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/event_channel.h	Thu Jul 29 14:51:29 2004 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,127 +0,0 @@
     7.4 -/******************************************************************************
     7.5 - * event_channel.h
     7.6 - * 
     7.7 - * Event channels between domains.
     7.8 - * 
     7.9 - * Copyright (c) 2003-2004, K A Fraser.
    7.10 - */
    7.11 -
    7.12 -#ifndef __HYPERVISOR_IFS__EVENT_CHANNEL_H__
    7.13 -#define __HYPERVISOR_IFS__EVENT_CHANNEL_H__
    7.14 -
    7.15 -/*
    7.16 - * EVTCHNOP_bind_interdomain: Open an event channel between <dom1> and <dom2>.
    7.17 - * NOTES:
    7.18 - *  1. <dom1> and/or <dom2> may be specified as DOMID_SELF.
    7.19 - *  2. Only a sufficiently-privileged domain may create an event channel.
    7.20 - *  3. <port1> and <port2> are only supplied if the op succeeds.
    7.21 - */
    7.22 -#define EVTCHNOP_bind_interdomain 0
    7.23 -typedef struct {
    7.24 -    /* IN parameters. */
    7.25 -    domid_t dom1, dom2;               /*  0,  4 */
    7.26 -    /* OUT parameters. */
    7.27 -    u32     port1, port2;             /*  8, 12 */
    7.28 -} PACKED evtchn_bind_interdomain_t; /* 16 bytes */
    7.29 -
    7.30 -/*
    7.31 - * EVTCHNOP_bind_virq: Bind a local event channel to IRQ <irq>.
    7.32 - * NOTES:
    7.33 - *  1. A virtual IRQ may be bound to at most one event channel per domain.
    7.34 - */
    7.35 -#define EVTCHNOP_bind_virq        1
    7.36 -typedef struct {
    7.37 -    /* IN parameters. */
    7.38 -    u32 virq;                         /*  0 */
    7.39 -    /* OUT parameters. */
    7.40 -    u32 port;                         /*  4 */
    7.41 -} PACKED evtchn_bind_virq_t; /* 8 bytes */
    7.42 -
    7.43 -/*
    7.44 - * EVTCHNOP_bind_pirq: Bind a local event channel to IRQ <irq>.
    7.45 - * NOTES:
    7.46 - *  1. A physical IRQ may be bound to at most one event channel per domain.
    7.47 - *  2. Only a sufficiently-privileged domain may bind to a physical IRQ.
    7.48 - */
    7.49 -#define EVTCHNOP_bind_pirq        2
    7.50 -typedef struct {
    7.51 -    /* IN parameters. */
    7.52 -    u32 pirq;                         /*  0 */
    7.53 -#define BIND_PIRQ__WILL_SHARE 1
    7.54 -    u32 flags; /* BIND_PIRQ__* */     /*  4 */
    7.55 -    /* OUT parameters. */
    7.56 -    u32 port;                         /*  8 */
    7.57 -} PACKED evtchn_bind_pirq_t; /* 12 bytes */
    7.58 -
    7.59 -/*
    7.60 - * EVTCHNOP_close: Close the communication channel which has an endpoint at
    7.61 - * <dom, port>.
    7.62 - * NOTES:
    7.63 - *  1. <dom> may be specified as DOMID_SELF.
    7.64 - *  2. Only a sufficiently-privileged domain may close an event channel
    7.65 - *     for which <dom> is not DOMID_SELF.
    7.66 - */
    7.67 -#define EVTCHNOP_close            3
    7.68 -typedef struct {
    7.69 -    /* IN parameters. */
    7.70 -    domid_t dom;                      /*  0 */
    7.71 -    u32     port;                     /*  4 */
    7.72 -    /* No OUT parameters. */
    7.73 -} PACKED evtchn_close_t; /* 8 bytes */
    7.74 -
    7.75 -/*
    7.76 - * EVTCHNOP_send: Send an event to the remote end of the channel whose local
    7.77 - * endpoint is <DOMID_SELF, local_port>.
    7.78 - */
    7.79 -#define EVTCHNOP_send             4
    7.80 -typedef struct {
    7.81 -    /* IN parameters. */
    7.82 -    u32     local_port;               /*  0 */
    7.83 -    /* No OUT parameters. */
    7.84 -} PACKED evtchn_send_t; /* 4 bytes */
    7.85 -
    7.86 -/*
    7.87 - * EVTCHNOP_status: Get the current status of the communication channel which
    7.88 - * has an endpoint at <dom, port>.
    7.89 - * NOTES:
    7.90 - *  1. <dom> may be specified as DOMID_SELF.
    7.91 - *  2. Only a sufficiently-privileged domain may obtain the status of an event
    7.92 - *     channel for which <dom> is not DOMID_SELF.
    7.93 - */
    7.94 -#define EVTCHNOP_status           5
    7.95 -typedef struct {
    7.96 -    /* IN parameters */
    7.97 -    domid_t dom;                      /*  0 */
    7.98 -    u32     port;                     /*  4 */
    7.99 -    /* OUT parameters */
   7.100 -#define EVTCHNSTAT_closed       0  /* Chennel is not in use.                 */
   7.101 -#define EVTCHNSTAT_unbound      1  /* Channel is not bound to a source.      */
   7.102 -#define EVTCHNSTAT_interdomain  2  /* Channel is connected to remote domain. */
   7.103 -#define EVTCHNSTAT_pirq         3  /* Channel is bound to a phys IRQ line.   */
   7.104 -#define EVTCHNSTAT_virq         4  /* Channel is bound to a virtual IRQ line */
   7.105 -    u32     status;                   /*  8 */
   7.106 -    union {                           /* 12 */
   7.107 -        struct {
   7.108 -            domid_t dom;                              /* 12 */
   7.109 -            u32     port;                             /* 16 */
   7.110 -        } PACKED interdomain; /* EVTCHNSTAT_interdomain */
   7.111 -        u32 pirq;      /* EVTCHNSTAT_pirq        */   /* 12 */
   7.112 -        u32 virq;      /* EVTCHNSTAT_virq        */   /* 12 */
   7.113 -    } PACKED u;
   7.114 -} PACKED evtchn_status_t; /* 20 bytes */
   7.115 -
   7.116 -typedef struct {
   7.117 -    u32 cmd; /* EVTCHNOP_* */         /*  0 */
   7.118 -    u32 __reserved;                   /*  4 */
   7.119 -    union {                           /*  8 */
   7.120 -        evtchn_bind_interdomain_t bind_interdomain;
   7.121 -        evtchn_bind_virq_t        bind_virq;
   7.122 -        evtchn_bind_pirq_t        bind_pirq;
   7.123 -        evtchn_close_t            close;
   7.124 -        evtchn_send_t             send;
   7.125 -        evtchn_status_t           status;
   7.126 -        u8                        __dummy[24];
   7.127 -    } PACKED u;
   7.128 -} PACKED evtchn_op_t; /* 32 bytes */
   7.129 -
   7.130 -#endif /* __HYPERVISOR_IFS__EVENT_CHANNEL_H__ */
     8.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/hypervisor-if.h	Thu Jul 29 14:51:29 2004 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,395 +0,0 @@
     8.4 -/******************************************************************************
     8.5 - * hypervisor-if.h
     8.6 - * 
     8.7 - * Guest OS interface to Xen.
     8.8 - */
     8.9 -
    8.10 -#ifndef __HYPERVISOR_IF_H__
    8.11 -#define __HYPERVISOR_IF_H__
    8.12 -
    8.13 -/* GCC-specific way to pack structure definitions (no implicit padding). */
    8.14 -#define PACKED __attribute__ ((packed))
    8.15 -
    8.16 -#if defined(__i386__)
    8.17 -#include "arch-x86_32.h"
    8.18 -#elif defined(__x86_64__)
    8.19 -#include "arch-x86_64.h"
    8.20 -#else
    8.21 -#error "Unsupported architecture"
    8.22 -#endif
    8.23 -
    8.24 -/*
    8.25 - * HYPERVISOR "SYSTEM CALLS"
    8.26 - */
    8.27 -
    8.28 -/* EAX = vector; EBX, ECX, EDX, ESI, EDI = args 1, 2, 3, 4, 5. */
    8.29 -#define __HYPERVISOR_set_trap_table        0
    8.30 -#define __HYPERVISOR_mmu_update            1
    8.31 -#define __HYPERVISOR_set_gdt               2
    8.32 -#define __HYPERVISOR_stack_switch          3
    8.33 -#define __HYPERVISOR_set_callbacks         4
    8.34 -#define __HYPERVISOR_fpu_taskswitch        5
    8.35 -#define __HYPERVISOR_sched_op              6
    8.36 -#define __HYPERVISOR_dom0_op               7
    8.37 -#define __HYPERVISOR_set_debugreg          8
    8.38 -#define __HYPERVISOR_get_debugreg          9
    8.39 -#define __HYPERVISOR_update_descriptor    10
    8.40 -#define __HYPERVISOR_set_fast_trap        11
    8.41 -#define __HYPERVISOR_dom_mem_op           12
    8.42 -#define __HYPERVISOR_multicall            13
    8.43 -#define __HYPERVISOR_update_va_mapping    14
    8.44 -#define __HYPERVISOR_set_timer_op         15
    8.45 -#define __HYPERVISOR_event_channel_op     16
    8.46 -#define __HYPERVISOR_xen_version          17
    8.47 -#define __HYPERVISOR_console_io           18
    8.48 -#define __HYPERVISOR_physdev_op           19
    8.49 -#define __HYPERVISOR_update_va_mapping_otherdomain 20
    8.50 -
    8.51 -/*
    8.52 - * MULTICALLS
    8.53 - * 
    8.54 - * Multicalls are listed in an array, with each element being a fixed size 
    8.55 - * (BYTES_PER_MULTICALL_ENTRY). Each is of the form (op, arg1, ..., argN)
    8.56 - * where each element of the tuple is a machine word. 
    8.57 - */
    8.58 -#define ARGS_PER_MULTICALL_ENTRY 8
    8.59 -
    8.60 -
    8.61 -/* 
    8.62 - * VIRTUAL INTERRUPTS
    8.63 - * 
    8.64 - * Virtual interrupts that a guest OS may receive from the hypervisor.
    8.65 - */
    8.66 -#define VIRQ_MISDIRECT  0  /* Catch-all interrupt for unbound VIRQs.      */
    8.67 -#define VIRQ_TIMER      1  /* Timebase update, and/or requested timeout.  */
    8.68 -#define VIRQ_DEBUG      2  /* Request guest to dump debug info.           */
    8.69 -#define VIRQ_CONSOLE    3  /* (DOM0) bytes received on emergency console. */
    8.70 -#define VIRQ_DOM_EXC    4  /* (DOM0) Exceptional event for some domain.   */
    8.71 -#define NR_VIRQS        5
    8.72 -
    8.73 -/*
    8.74 - * MMU-UPDATE REQUESTS
    8.75 - * 
    8.76 - * HYPERVISOR_mmu_update() accepts a list of (ptr, val) pairs.
    8.77 - * ptr[1:0] specifies the appropriate MMU_* command.
    8.78 - * 
    8.79 - * GPS (General-Purpose Subject)
    8.80 - * -----------------------------
    8.81 - *  This domain that must own all non-page-table pages that are involved in
    8.82 - *  MMU updates. By default it is the domain that executes mmu_update(). If the
    8.83 - *  caller has sufficient privilege then it can be changed by executing
    8.84 - *  MMUEXT_SET_SUBJECTDOM.
    8.85 - * 
    8.86 - * PTS (Page-Table Subject)
    8.87 - * ------------------------
    8.88 - *  This domain must own all the page-table pages that are subject to MMU
    8.89 - *  updates. By default it is the domain that executes mmu_update(). If the
    8.90 - *  caller has sufficient privilege then it can be changed by executing
    8.91 - *  MMUEXT_SET_SUBJECTDOM with val[14] (SET_PAGETABLE_SUBJECTDOM) set.
    8.92 - * 
    8.93 - * ptr[1:0] == MMU_NORMAL_PT_UPDATE:
    8.94 - * Updates an entry in a page table.
    8.95 - * ptr[:2]  -- machine address of the page-table entry to modify [1]
    8.96 - * val      -- value to write [2]
    8.97 - * 
    8.98 - * ptr[1:0] == MMU_MACHPHYS_UPDATE:
    8.99 - * Updates an entry in the machine->pseudo-physical mapping table.
   8.100 - * ptr[:2]  -- machine address within the frame whose mapping to modify [3]
   8.101 - * val      -- value to write into the mapping entry
   8.102 - *  
   8.103 - * ptr[1:0] == MMU_EXTENDED_COMMAND:
   8.104 - * val[7:0] -- MMUEXT_* command
   8.105 - * 
   8.106 - *   val[7:0] == MMUEXT_(UN)PIN_*_TABLE:
   8.107 - *   ptr[:2]  -- machine address of frame to be (un)pinned as a p.t. page [1]
   8.108 - * 
   8.109 - *   val[7:0] == MMUEXT_NEW_BASEPTR:
   8.110 - *   ptr[:2]  -- machine address of new page-table base to install in MMU [1]
   8.111 - * 
   8.112 - *   val[7:0] == MMUEXT_TLB_FLUSH:
   8.113 - *   no additional arguments
   8.114 - * 
   8.115 - *   val[7:0] == MMUEXT_INVLPG:
   8.116 - *   ptr[:2]  -- linear address to be flushed from the TLB
   8.117 - * 
   8.118 - *   val[7:0] == MMUEXT_SET_LDT:
   8.119 - *   ptr[:2]  -- linear address of LDT base (NB. must be page-aligned)
   8.120 - *   val[:8]  -- number of entries in LDT
   8.121 - * 
   8.122 - *   val[7:0] == MMUEXT_SET_SUBJECTDOM:
   8.123 - *   val[14]  -- if TRUE then sets the PTS in addition to the GPS.
   8.124 - *   (ptr[31:15],val[31:15]) -- dom[31:0]
   8.125 - * 
   8.126 - *   val[7:0] == MMUEXT_REASSIGN_PAGE:
   8.127 - *   ptr[:2]  -- machine address within page to be reassigned to the GPS.
   8.128 - * 
   8.129 - *   val[7:0] == MMUEXT_RESET_SUBJECTDOM:
   8.130 - *   Resets both the GPS and the PTS to their defaults (i.e., calling domain).
   8.131 - * 
   8.132 - * Notes on constraints on the above arguments:
   8.133 - *  [1] The page frame containing the machine address must belong to the PTS.
   8.134 - *  [2] If the PTE is valid (i.e., bit 0 is set) then the specified page frame
   8.135 - *      must belong to: 
   8.136 - *       (a) the PTS (if the PTE is part of a non-L1 table); or
   8.137 - *       (b) the GPS (if the PTE is part of an L1 table).
   8.138 - *  [3] The page frame containing the machine address must belong to the GPS.
   8.139 - */
   8.140 -#define MMU_NORMAL_PT_UPDATE     0 /* checked '*ptr = val'. ptr is MA.       */
   8.141 -#define MMU_MACHPHYS_UPDATE      2 /* ptr = MA of frame to modify entry for  */
   8.142 -#define MMU_EXTENDED_COMMAND     3 /* least 8 bits of val demux further      */
   8.143 -#define MMUEXT_PIN_L1_TABLE      0 /* ptr = MA of frame to pin               */
   8.144 -#define MMUEXT_PIN_L2_TABLE      1 /* ptr = MA of frame to pin               */
   8.145 -#define MMUEXT_PIN_L3_TABLE      2 /* ptr = MA of frame to pin               */
   8.146 -#define MMUEXT_PIN_L4_TABLE      3 /* ptr = MA of frame to pin               */
   8.147 -#define MMUEXT_UNPIN_TABLE       4 /* ptr = MA of frame to unpin             */
   8.148 -#define MMUEXT_NEW_BASEPTR       5 /* ptr = MA of new pagetable base         */
   8.149 -#define MMUEXT_TLB_FLUSH         6 /* ptr = NULL                             */
   8.150 -#define MMUEXT_INVLPG            7 /* ptr = VA to invalidate                 */
   8.151 -#define MMUEXT_SET_LDT           8 /* ptr = VA of table; val = # entries     */
   8.152 -#define MMUEXT_SET_SUBJECTDOM    9 /* (ptr[31:15],val[31:15]) = dom[31:0]    */
   8.153 -#define SET_PAGETABLE_SUBJECTDOM (1<<14) /* OR into 'val' arg of SUBJECTDOM  */
   8.154 -#define MMUEXT_REASSIGN_PAGE    10
   8.155 -#define MMUEXT_RESET_SUBJECTDOM 11
   8.156 -#define MMUEXT_CMD_MASK        255
   8.157 -#define MMUEXT_CMD_SHIFT         8
   8.158 -
   8.159 -/* These are passed as 'flags' to update_va_mapping. They can be ORed. */
   8.160 -#define UVMF_FLUSH_TLB          1 /* Flush entire TLB. */
   8.161 -#define UVMF_INVLPG             2 /* Flush the VA mapping being updated. */
   8.162 -
   8.163 -
   8.164 -/*
   8.165 - * Commands to HYPERVISOR_sched_op().
   8.166 - */
   8.167 -#define SCHEDOP_yield           0   /* Give up the CPU voluntarily.       */
   8.168 -#define SCHEDOP_block           1   /* Block until an event is received.  */
   8.169 -#define SCHEDOP_shutdown        2   /* Stop executing this domain.        */
   8.170 -#define SCHEDOP_cmdmask       255   /* 8-bit command. */
   8.171 -#define SCHEDOP_reasonshift     8   /* 8-bit reason code. (SCHEDOP_shutdown) */
   8.172 -
   8.173 -/*
   8.174 - * Commands to HYPERVISOR_console_io().
   8.175 - */
   8.176 -#define CONSOLEIO_write         0
   8.177 -#define CONSOLEIO_read          1
   8.178 -
   8.179 -/*
   8.180 - * Commands to HYPERVISOR_dom_mem_op().
   8.181 - */
   8.182 -#define MEMOP_increase_reservation 0
   8.183 -#define MEMOP_decrease_reservation 1
   8.184 -
   8.185 -#ifndef __ASSEMBLY__
   8.186 -
   8.187 -typedef u32 domid_t;
   8.188 -/* DOMID_SELF is used in certain contexts to refer to oneself. */
   8.189 -#define DOMID_SELF (0x7FFFFFFEU)
   8.190 -
   8.191 -/*
   8.192 - * Send an array of these to HYPERVISOR_mmu_update().
   8.193 - * NB. The fields are natural pointer/address size for this architecture.
   8.194 - */
   8.195 -typedef struct
   8.196 -{
   8.197 -    memory_t ptr;    /* Machine address of PTE. */
   8.198 -    memory_t val;    /* New contents of PTE.    */
   8.199 -} PACKED mmu_update_t;
   8.200 -
   8.201 -/*
   8.202 - * Send an array of these to HYPERVISOR_multicall().
   8.203 - * NB. The fields are natural register size for this architecture.
   8.204 - */
   8.205 -typedef struct
   8.206 -{
   8.207 -    cpureg_t op;
   8.208 -    cpureg_t args[7];
   8.209 -} PACKED multicall_entry_t;
   8.210 -
   8.211 -/* Event channel endpoints per domain. */
   8.212 -#define NR_EVENT_CHANNELS 1024
   8.213 -
   8.214 -/* No support for multi-processor guests. */
   8.215 -#define MAX_VIRT_CPUS 1
   8.216 -
   8.217 -/*
   8.218 - * Xen/guestos shared data -- pointer provided in start_info.
   8.219 - * NB. We expect that this struct is smaller than a page.
   8.220 - */
   8.221 -typedef struct shared_info_st
   8.222 -{
   8.223 -    /*
   8.224 -     * Per-VCPU information goes here. This will be cleaned up more when Xen 
   8.225 -     * actually supports multi-VCPU guests.
   8.226 -     */
   8.227 -    struct {
   8.228 -        /*
   8.229 -         * 'evtchn_upcall_pending' is written non-zero by Xen to indicate
   8.230 -         * a pending notification for a particular VCPU. It is then cleared 
   8.231 -         * by the guest OS /before/ checking for pending work, thus avoiding
   8.232 -         * a set-and-check race. Note that the mask is only accessed by Xen
   8.233 -         * on the CPU that is currently hosting the VCPU. This means that the
   8.234 -         * pending and mask flags can be updated by the guest without special
   8.235 -         * synchronisation (i.e., no need for the x86 LOCK prefix).
   8.236 -         * This may seem suboptimal because if the pending flag is set by
   8.237 -         * a different CPU then an IPI may be scheduled even when the mask
   8.238 -         * is set. However, note:
   8.239 -         *  1. The task of 'interrupt holdoff' is covered by the per-event-
   8.240 -         *     channel mask bits. A 'noisy' event that is continually being
   8.241 -         *     triggered can be masked at source at this very precise
   8.242 -         *     granularity.
   8.243 -         *  2. The main purpose of the per-VCPU mask is therefore to restrict
   8.244 -         *     reentrant execution: whether for concurrency control, or to
   8.245 -         *     prevent unbounded stack usage. Whatever the purpose, we expect
   8.246 -         *     that the mask will be asserted only for short periods at a time,
   8.247 -         *     and so the likelihood of a 'spurious' IPI is suitably small.
   8.248 -         * The mask is read before making an event upcall to the guest: a
   8.249 -         * non-zero mask therefore guarantees that the VCPU will not receive
   8.250 -         * an upcall activation. The mask is cleared when the VCPU requests
   8.251 -         * to block: this avoids wakeup-waiting races.
   8.252 -         */
   8.253 -        u8 evtchn_upcall_pending;
   8.254 -        u8 evtchn_upcall_mask;
   8.255 -        u8 pad0, pad1;
   8.256 -    } PACKED vcpu_data[MAX_VIRT_CPUS];  /*   0 */
   8.257 -
   8.258 -    /*
   8.259 -     * A domain can have up to 1024 "event channels" on which it can send
   8.260 -     * and receive asynchronous event notifications. There are three classes
   8.261 -     * of event that are delivered by this mechanism:
   8.262 -     *  1. Bi-directional inter- and intra-domain connections. Domains must
   8.263 -     *     arrange out-of-band to set up a connection (usually the setup
   8.264 -     *     is initiated and organised by a privileged third party such as
   8.265 -     *     software running in domain 0).
   8.266 -     *  2. Physical interrupts. A domain with suitable hardware-access
   8.267 -     *     privileges can bind an event-channel port to a physical interrupt
   8.268 -     *     source.
   8.269 -     *  3. Virtual interrupts ('events'). A domain can bind an event-channel
   8.270 -     *     port to a virtual interrupt source, such as the virtual-timer
   8.271 -     *     device or the emergency console.
   8.272 -     * 
   8.273 -     * Event channels are addressed by a "port index" between 0 and 1023.
   8.274 -     * Each channel is associated with two bits of information:
   8.275 -     *  1. PENDING -- notifies the domain that there is a pending notification
   8.276 -     *     to be processed. This bit is cleared by the guest.
   8.277 -     *  2. MASK -- if this bit is clear then a 0->1 transition of PENDING
   8.278 -     *     will cause an asynchronous upcall to be scheduled. This bit is only
   8.279 -     *     updated by the guest. It is read-only within Xen. If a channel
   8.280 -     *     becomes pending while the channel is masked then the 'edge' is lost
   8.281 -     *     (i.e., when the channel is unmasked, the guest must manually handle
   8.282 -     *     pending notifications as no upcall will be scheduled by Xen).
   8.283 -     * 
   8.284 -     * To expedite scanning of pending notifications, any 0->1 pending
   8.285 -     * transition on an unmasked channel causes a corresponding bit in a
   8.286 -     * 32-bit selector to be set. Each bit in the selector covers a 32-bit
   8.287 -     * word in the PENDING bitfield array.
   8.288 -     */
   8.289 -    u32 evtchn_pending[32];             /*   4 */
   8.290 -    u32 evtchn_pending_sel;             /* 132 */
   8.291 -    u32 evtchn_mask[32];                /* 136 */
   8.292 -
   8.293 -    /*
   8.294 -     * Time: The following abstractions are exposed: System Time, Clock Time,
   8.295 -     * Domain Virtual Time. Domains can access Cycle counter time directly.
   8.296 -     */
   8.297 -    u64                cpu_freq;        /* 264: CPU frequency (Hz).          */
   8.298 -
   8.299 -    /*
   8.300 -     * The following values are updated periodically (and not necessarily
   8.301 -     * atomically!). The guest OS detects this because 'time_version1' is
   8.302 -     * incremented just before updating these values, and 'time_version2' is
   8.303 -     * incremented immediately after. See the Xen-specific Linux code for an
   8.304 -     * example of how to read these values safely (arch/xen/kernel/time.c).
   8.305 -     */
   8.306 -    u32                time_version1;   /* 272 */
   8.307 -    u32                time_version2;   /* 276 */
   8.308 -    tsc_timestamp_t    tsc_timestamp;   /* TSC at last update of time vals.  */
   8.309 -    u64                system_time;     /* Time, in nanosecs, since boot.    */
   8.310 -    u32                wc_sec;          /* Secs  00:00:00 UTC, Jan 1, 1970.  */
   8.311 -    u32                wc_usec;         /* Usecs 00:00:00 UTC, Jan 1, 1970.  */
   8.312 -    u64                domain_time;     /* Domain virtual time, in nanosecs. */
   8.313 -
   8.314 -    /*
   8.315 -     * Timeout values:
   8.316 -     * Allow a domain to specify a timeout value in system time and 
   8.317 -     * domain virtual time.
   8.318 -     */
   8.319 -    u64                wall_timeout;    /* 312 */
   8.320 -    u64                domain_timeout;  /* 320 */
   8.321 -
   8.322 -    execution_context_t execution_context; /* 328 */
   8.323 -
   8.324 -} PACKED shared_info_t;
   8.325 -
   8.326 -/*
   8.327 - * Start-of-day memory layout for the initial domain (DOM0):
   8.328 - *  1. The domain is started within contiguous virtual-memory region.
   8.329 - *  2. The contiguous region begins and ends on an aligned 4MB boundary.
   8.330 - *  3. The region start corresponds to the load address of the OS image.
   8.331 - *     If the load address is not 4MB aligned then the address is rounded down.
   8.332 - *  4. This the order of bootstrap elements in the initial virtual region:
   8.333 - *      a. relocated kernel image
   8.334 - *      b. initial ram disk              [mod_start, mod_len]
   8.335 - *      c. list of allocated page frames [mfn_list, nr_pages]
   8.336 - *      d. bootstrap page tables         [pt_base, CR3 (x86)]
   8.337 - *      e. start_info_t structure        [register ESI (x86)]
   8.338 - *      f. bootstrap stack               [register ESP (x86)]
   8.339 - *  5. Bootstrap elements are packed together, but each is 4kB-aligned.
   8.340 - *  6. The initial ram disk may be omitted.
   8.341 - *  7. The list of page frames forms a contiguous 'pseudo-physical' memory
   8.342 - *     layout for the domain. In particular, the bootstrap virtual-memory
   8.343 - *     region is a 1:1 mapping to the first section of the pseudo-physical map.
   8.344 - *  8. All bootstrap elements are mapped read-writeable for the guest OS. The
   8.345 - *     only exception is the bootstrap page table, which is mapped read-only.
   8.346 - *  9. There is guaranteed to be at least 512kB padding after the final
   8.347 - *     bootstrap element. If necessary, the bootstrap virtual region is
   8.348 - *     extended by an extra 4MB to ensure this.
   8.349 - */
   8.350 -
   8.351 -/*
   8.352 - * This is the basic bootstrap information structure as passed by Xen to the
   8.353 - * initial controller domain. We want this structure to be easily extended by
   8.354 - * more sophisticated domain builders and controllers, so we make the basic
   8.355 - * fields of this structure available via a BASIC_START_INFO macro.
   8.356 - * 
   8.357 - * Extended version of start_info_t should be defined as:
   8.358 - *  typedef struct {
   8.359 - *      BASIC_START_INFO;
   8.360 - *      <...extra fields...>
   8.361 - *  } extended_start_info_t;
   8.362 - */
   8.363 -#define MAX_CMDLINE 256
   8.364 -#define BASIC_START_INFO                                                      \
   8.365 -    /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.     */ \
   8.366 -    memory_t nr_pages;       /*  0: Total pages allocated to this domain. */  \
   8.367 -    _MEMORY_PADDING(A);                                                       \
   8.368 -    memory_t shared_info;    /*  8: MACHINE address of shared info struct.*/  \
   8.369 -    _MEMORY_PADDING(B);                                                       \
   8.370 -    u32      flags;          /* 16: SIF_xxx flags.                        */  \
   8.371 -    u32      __pad;                                                           \
   8.372 -    /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).      */ \
   8.373 -    memory_t pt_base;        /* 24: VIRTUAL address of page directory.    */  \
   8.374 -    _MEMORY_PADDING(C);                                                       \
   8.375 -    memory_t nr_pt_frames;   /* 32: Number of bootstrap p.t. frames.      */  \
   8.376 -    _MEMORY_PADDING(D);                                                       \
   8.377 -    memory_t mfn_list;       /* 40: VIRTUAL address of page-frame list.   */  \
   8.378 -    _MEMORY_PADDING(E);                                                       \
   8.379 -    memory_t mod_start;      /* 48: VIRTUAL address of pre-loaded module. */  \
   8.380 -    _MEMORY_PADDING(F);                                                       \
   8.381 -    memory_t mod_len;        /* 56: Size (bytes) of pre-loaded module.    */  \
   8.382 -    _MEMORY_PADDING(G);                                                       \
   8.383 -    u8 cmd_line[MAX_CMDLINE] /* 64 */
   8.384 -
   8.385 -typedef struct {
   8.386 -    BASIC_START_INFO;
   8.387 -} PACKED start_info_t; /* 320 bytes */
   8.388 -
   8.389 -/* These flags are passed in the 'flags' field of start_info_t. */
   8.390 -#define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */
   8.391 -#define SIF_INITDOMAIN    (1<<1)  /* Is this the initial control domain? */
   8.392 -
   8.393 -/* For use in guest OSes. */
   8.394 -extern shared_info_t *HYPERVISOR_shared_info;
   8.395 -
   8.396 -#endif /* !__ASSEMBLY__ */
   8.397 -
   8.398 -#endif /* __HYPERVISOR_IF_H__ */
     9.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/physdev.h	Thu Jul 29 14:51:29 2004 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,80 +0,0 @@
     9.4 -/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
     9.5 - ****************************************************************************
     9.6 - * (c) 2004 - Rolf Neugebauer - Intel Research Cambridge
     9.7 - * (c) 2004 - Keir Fraser - University of Cambridge
     9.8 - ****************************************************************************
     9.9 - * Description: Interface for domains to access physical devices on the PCI bus
    9.10 - */
    9.11 -
    9.12 -#ifndef __HYPERVISOR_IFS_PHYSDEV_H__
    9.13 -#define __HYPERVISOR_IFS_PHYSDEV_H__
    9.14 -
    9.15 -/* Commands to HYPERVISOR_physdev_op() */
    9.16 -#define PHYSDEVOP_PCI_CFGREG_READ       0
    9.17 -#define PHYSDEVOP_PCI_CFGREG_WRITE      1
    9.18 -#define PHYSDEVOP_PCI_INITIALISE_DEVICE 2
    9.19 -#define PHYSDEVOP_PCI_PROBE_ROOT_BUSES  3
    9.20 -#define PHYSDEVOP_IRQ_UNMASK_NOTIFY     4
    9.21 -#define PHYSDEVOP_IRQ_STATUS_QUERY      5
    9.22 -
    9.23 -/* Read from PCI configuration space. */
    9.24 -typedef struct {
    9.25 -    /* IN */
    9.26 -    u32 bus;                          /*  0 */
    9.27 -    u32 dev;                          /*  4 */
    9.28 -    u32 func;                         /*  8 */
    9.29 -    u32 reg;                          /* 12 */
    9.30 -    u32 len;                          /* 16 */
    9.31 -    /* OUT */
    9.32 -    u32 value;                        /* 20 */
    9.33 -} PACKED physdevop_pci_cfgreg_read_t; /* 24 bytes */
    9.34 -
    9.35 -/* Write to PCI configuration space. */
    9.36 -typedef struct {
    9.37 -    /* IN */
    9.38 -    u32 bus;                          /*  0 */
    9.39 -    u32 dev;                          /*  4 */
    9.40 -    u32 func;                         /*  8 */
    9.41 -    u32 reg;                          /* 12 */
    9.42 -    u32 len;                          /* 16 */
    9.43 -    u32 value;                        /* 20 */
    9.44 -} PACKED physdevop_pci_cfgreg_write_t; /* 24 bytes */
    9.45 -
    9.46 -/* Do final initialisation of a PCI device (e.g., last-moment IRQ routing). */
    9.47 -typedef struct {
    9.48 -    /* IN */
    9.49 -    u32 bus;                          /*  0 */
    9.50 -    u32 dev;                          /*  4 */
    9.51 -    u32 func;                         /*  8 */
    9.52 -} PACKED physdevop_pci_initialise_device_t; /* 12 bytes */
    9.53 -
    9.54 -/* Find the root buses for subsequent scanning. */
    9.55 -typedef struct {
    9.56 -    /* OUT */
    9.57 -    u32 busmask[256/32];              /*  0 */
    9.58 -} PACKED physdevop_pci_probe_root_buses_t; /* 32 bytes */
    9.59 -
    9.60 -typedef struct {
    9.61 -    /* IN */
    9.62 -    u32 irq;                          /*  0 */
    9.63 -    /* OUT */
    9.64 -/* Need to call PHYSDEVOP_IRQ_UNMASK_NOTIFY when the IRQ has been serviced? */
    9.65 -#define PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY (1<<0)
    9.66 -    u32 flags;                        /*  4 */
    9.67 -} PACKED physdevop_irq_status_query_t; /* 8 bytes */
    9.68 -
    9.69 -typedef struct _physdev_op_st 
    9.70 -{
    9.71 -    u32 cmd;                          /*  0 */
    9.72 -    u32 __pad;                        /*  4 */
    9.73 -    union {                           /*  8 */
    9.74 -        physdevop_pci_cfgreg_read_t       pci_cfgreg_read;
    9.75 -        physdevop_pci_cfgreg_write_t      pci_cfgreg_write;
    9.76 -        physdevop_pci_initialise_device_t pci_initialise_device;
    9.77 -        physdevop_pci_probe_root_buses_t  pci_probe_root_buses;
    9.78 -        physdevop_irq_status_query_t      irq_status_query;
    9.79 -        u8                                __dummy[32];
    9.80 -    } PACKED u;
    9.81 -} PACKED physdev_op_t; /* 40 bytes */
    9.82 -
    9.83 -#endif /* __HYPERVISOR_IFS_PHYSDEV_H__ */
    10.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/sched_ctl.h	Thu Jul 29 14:51:29 2004 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,83 +0,0 @@
    10.4 -/**
    10.5 - * Generic scheduler control interface.
    10.6 - *
    10.7 - * Mark Williamson, (C) 2004 Intel Research Cambridge
    10.8 - */
    10.9 -
   10.10 -#ifndef __SCHED_CTL_H__
   10.11 -#define __SCHED_CTL_H__
   10.12 -
   10.13 -/* Scheduler types */
   10.14 -#define SCHED_BVT      0
   10.15 -#define SCHED_FBVT     1
   10.16 -#define SCHED_ATROPOS  2
   10.17 -#define SCHED_RROBIN   3
   10.18 -
   10.19 -/* these describe the intended direction used for a scheduler control or domain
   10.20 - * command */
   10.21 -#define SCHED_INFO_PUT 0
   10.22 -#define SCHED_INFO_GET 1
   10.23 -
   10.24 -/*
   10.25 - * Generic scheduler control command - used to adjust system-wide scheduler
   10.26 - * parameters
   10.27 - */
   10.28 -struct sched_ctl_cmd
   10.29 -{
   10.30 -    u32 sched_id;                     /*  0 */
   10.31 -    u32 direction;                    /*  4 */
   10.32 -    union {                           /*  8 */
   10.33 -        struct bvt_ctl
   10.34 -        {
   10.35 -            /* IN variables. */
   10.36 -            u32 ctx_allow;            /*  8: context switch allowance */
   10.37 -        } PACKED bvt;
   10.38 -
   10.39 -        struct fbvt_ctl
   10.40 -        {
   10.41 -            /* IN variables. */
   10.42 -            u32 ctx_allow;            /*  8: context switch allowance */
   10.43 -        } PACKED fbvt;
   10.44 -
   10.45 -        struct rrobin_ctl
   10.46 -        {
   10.47 -            /* IN variables */
   10.48 -            u64 slice;                /*  8: round robin time slice */
   10.49 -        } PACKED rrobin;
   10.50 -    } PACKED u;
   10.51 -} PACKED; /* 16 bytes */
   10.52 -
   10.53 -struct sched_adjdom_cmd
   10.54 -{
   10.55 -    u32     sched_id;                 /*  0 */
   10.56 -    u32     direction;                /*  4 */
   10.57 -    domid_t domain;                   /*  8 */
   10.58 -    u32     __pad;
   10.59 -    union {                           /* 16 */
   10.60 -        struct bvt_adjdom
   10.61 -        {
   10.62 -            u32 mcu_adv;    /* 16: mcu advance: inverse of weight */
   10.63 -            u32 warp;       /* 20: time warp */
   10.64 -            u32 warpl;      /* 24: warp limit */
   10.65 -            u32 warpu;      /* 28: unwarp time requirement */
   10.66 -        } PACKED bvt;
   10.67 -
   10.68 -        struct fbvt_adjdom
   10.69 -        {
   10.70 -            u32 mcu_adv;    /* 16: mcu advance: inverse of weight */
   10.71 -            u32 warp;       /* 20: time warp */
   10.72 -            u32 warpl;      /* 24: warp limit */
   10.73 -            u32 warpu;      /* 28: unwarp time requirement */
   10.74 -        } PACKED fbvt;
   10.75 -
   10.76 -        struct atropos_adjdom
   10.77 -        {
   10.78 -            u64 nat_period; /* 16 */
   10.79 -            u64 nat_slice;  /* 24 */
   10.80 -            u64 latency;    /* 32 */
   10.81 -            u32 xtratime;   /* 36 */
   10.82 -        } PACKED atropos;
   10.83 -    } PACKED u;
   10.84 -} PACKED; /* 40 bytes */
   10.85 -
   10.86 -#endif /* __SCHED_CTL_H__ */
    11.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/trace.h	Thu Jul 29 14:51:29 2004 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,31 +0,0 @@
    11.4 -/******************************************************************************
    11.5 - * include/hypervisor-ifs/trace.h
    11.6 - */
    11.7 -
    11.8 -#ifndef __HYPERVISOR_IFS_TRACE_H__
    11.9 -#define __HYPERVISOR_IFS_TRACE_H__
   11.10 -
   11.11 -/* This structure represents a single trace buffer record. */
   11.12 -struct t_rec {
   11.13 -    u64 cycles;               /* 64 bit cycle counter timestamp */
   11.14 -    u32 event;                /* 32 bit event ID                */
   11.15 -    u32 d1, d2, d3, d4, d5;   /* event data items               */
   11.16 -};
   11.17 -
   11.18 -/*
   11.19 - * This structure contains the metadata for a single trace buffer.  The head
   11.20 - * field, indexes into an array of struct t_rec's.
   11.21 - */
   11.22 -struct t_buf {
   11.23 -    struct t_rec *data;     /* pointer to data area.  physical address
   11.24 -                             * for convenience in user space code            */
   11.25 -
   11.26 -    unsigned long size;      /* size of the data area, in t_recs             */
   11.27 -    unsigned long head;      /* array index of the most recent record        */
   11.28 -
   11.29 -    /* Kernel-private elements follow... */
   11.30 -    struct t_rec *head_ptr; /* pointer to the head record                    */
   11.31 -    struct t_rec *vdata;    /* virtual address pointer to data               */
   11.32 -};
   11.33 -
   11.34 -#endif /* __HYPERVISOR_IFS_TRACE_H__ */
    12.1 --- a/linux-2.6.7-xen-sparse/mkbuildtree	Thu Jul 29 14:51:29 2004 +0000
    12.2 +++ b/linux-2.6.7-xen-sparse/mkbuildtree	Thu Jul 29 15:31:01 2004 +0000
    12.3 @@ -101,3 +101,15 @@ for i in `find . -type l`; do rm -f $i; 
    12.4  # Create symlinks of files and directories which exist in the sparse source
    12.5  relative_lndir ${RS}
    12.6  rm -f mkbuildtree
    12.7 +
    12.8 +
    12.9 +# Create links to the shared definitions of the hypervisor interface
   12.10 +rm -rf ${AD}/include/asm-xen/hypervisor-ifs
   12.11 +mkdir  ${AD}/include/asm-xen/hypervisor-ifs
   12.12 +cd     ${AD}/include/asm-xen/hypervisor-ifs
   12.13 +relative_lndir ../../../${RS}/../xen/include/hypervisor-ifs
   12.14 +
   12.15 +# Create a link to the shared definitions for the control interface
   12.16 +cd ${AD}/include/asm-xen
   12.17 +ln -sf ../../${RS}/../tools/python/xen/lowlevel/xu/domain_controller.h
   12.18 +