win-pvdrivers

changeset 192:268fe1eb3ae2 0.8.0.0

Final updates for the next release.
Fixed a few compile problems for ia64.
author James Harper <james.harper@bendigoit.com.au>
date Thu Feb 21 20:48:46 2008 +1100 (2008-02-21)
parents 8609c27c4893
children b77e8188c90c
files common.inc common/include/public/arch-ia64.h xenenum/xenenum.c xenpci/xenpci.c xenscsi/xenscsi.c
line diff
     1.1 --- a/common.inc	Wed Feb 20 17:14:14 2008 +1100
     1.2 +++ b/common.inc	Thu Feb 21 20:48:46 2008 +1100
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.7.0.98
     1.5 +VERSION=0.8.0.0
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7  KMDF_VERSION=1
     1.8  !IF $(_NT_TOOLS_VERSION) > 0x700
     2.1 --- a/common/include/public/arch-ia64.h	Wed Feb 20 17:14:14 2008 +1100
     2.2 +++ b/common/include/public/arch-ia64.h	Thu Feb 21 20:48:46 2008 +1100
     2.3 @@ -1,522 +1,525 @@
     2.4 -/******************************************************************************
     2.5 - * arch-ia64/hypervisor-if.h
     2.6 - * 
     2.7 - * Guest OS interface to IA64 Xen.
     2.8 - *
     2.9 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    2.10 - * of this software and associated documentation files (the "Software"), to
    2.11 - * deal in the Software without restriction, including without limitation the
    2.12 - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    2.13 - * sell copies of the Software, and to permit persons to whom the Software is
    2.14 - * furnished to do so, subject to the following conditions:
    2.15 - *
    2.16 - * The above copyright notice and this permission notice shall be included in
    2.17 - * all copies or substantial portions of the Software.
    2.18 - *
    2.19 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    2.20 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    2.21 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    2.22 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    2.23 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    2.24 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    2.25 - * DEALINGS IN THE SOFTWARE.
    2.26 - *
    2.27 - */
    2.28 -
    2.29 -#ifndef __HYPERVISOR_IF_IA64_H__
    2.30 -#define __HYPERVISOR_IF_IA64_H__
    2.31 -
    2.32 -/* Structural guest handles introduced in 0x00030201. */
    2.33 -#if __XEN_INTERFACE_VERSION__ >= 0x00030201
    2.34 -#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
    2.35 -    typedef struct { type *p; } __guest_handle_ ## name
    2.36 -#else
    2.37 -#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
    2.38 -    typedef type * __guest_handle_ ## name
    2.39 -#endif
    2.40 -
    2.41 -#define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
    2.42 -#define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
    2.43 -#define XEN_GUEST_HANDLE_64(name)       XEN_GUEST_HANDLE(name)
    2.44 -#define uint64_aligned_t                uint64_t
    2.45 -#define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)
    2.46 -#ifdef __XEN_TOOLS__
    2.47 -#define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
    2.48 -#endif
    2.49 -
    2.50 -#ifndef __ASSEMBLY__
    2.51 -/* Guest handles for primitive C types. */
    2.52 -__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
    2.53 -__DEFINE_XEN_GUEST_HANDLE(uint,  unsigned int);
    2.54 -__DEFINE_XEN_GUEST_HANDLE(ulong, xen_ulong_t);
    2.55 -__DEFINE_XEN_GUEST_HANDLE(u64,   xen_ulong_t);
    2.56 -DEFINE_XEN_GUEST_HANDLE(char);
    2.57 -DEFINE_XEN_GUEST_HANDLE(int);
    2.58 -DEFINE_XEN_GUEST_HANDLE(long);
    2.59 -DEFINE_XEN_GUEST_HANDLE(void);
    2.60 -
    2.61 -typedef xen_ulong_t xen_pfn_t;
    2.62 -DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
    2.63 -#define PRI_xen_pfn "lx"
    2.64 -#endif
    2.65 -
    2.66 -/* Arch specific VIRQs definition */
    2.67 -#define VIRQ_ITC        VIRQ_ARCH_0 /* V. Virtual itc timer */
    2.68 -#define VIRQ_MCA_CMC    VIRQ_ARCH_1 /* MCA cmc interrupt */
    2.69 -#define VIRQ_MCA_CPE    VIRQ_ARCH_2 /* MCA cpe interrupt */
    2.70 -
    2.71 -/* Maximum number of virtual CPUs in multi-processor guests. */
    2.72 -/* WARNING: before changing this, check that shared_info fits on a page */
    2.73 -#define MAX_VIRT_CPUS 64
    2.74 -
    2.75 -#ifndef __ASSEMBLY__
    2.76 -
    2.77 -typedef xen_ulong_t xen_ulong_t;
    2.78 -
    2.79 -#define INVALID_MFN       (~0UL)
    2.80 -
    2.81 -#define MEM_G   (1UL << 30)
    2.82 -#define MEM_M   (1UL << 20)
    2.83 -#define MEM_K   (1UL << 10)
    2.84 -
    2.85 -#define MMIO_START       (3 * MEM_G)
    2.86 -#define MMIO_SIZE        (512 * MEM_M)
    2.87 -
    2.88 -#define VGA_IO_START     0xA0000UL
    2.89 -#define VGA_IO_SIZE      0x20000
    2.90 -
    2.91 -#define LEGACY_IO_START  (MMIO_START + MMIO_SIZE)
    2.92 -#define LEGACY_IO_SIZE   (64*MEM_M)
    2.93 -
    2.94 -#define IO_PAGE_START (LEGACY_IO_START + LEGACY_IO_SIZE)
    2.95 -#define IO_PAGE_SIZE  PAGE_SIZE
    2.96 -
    2.97 -#define STORE_PAGE_START (IO_PAGE_START + IO_PAGE_SIZE)
    2.98 -#define STORE_PAGE_SIZE  PAGE_SIZE
    2.99 -
   2.100 -#define BUFFER_IO_PAGE_START (STORE_PAGE_START+STORE_PAGE_SIZE)
   2.101 -#define BUFFER_IO_PAGE_SIZE PAGE_SIZE
   2.102 -
   2.103 -#define BUFFER_PIO_PAGE_START (BUFFER_IO_PAGE_START+BUFFER_IO_PAGE_SIZE)
   2.104 -#define BUFFER_PIO_PAGE_SIZE PAGE_SIZE
   2.105 -
   2.106 -#define IO_SAPIC_START   0xfec00000UL
   2.107 -#define IO_SAPIC_SIZE    0x100000
   2.108 -
   2.109 -#define PIB_START 0xfee00000UL
   2.110 -#define PIB_SIZE 0x200000
   2.111 -
   2.112 -#define GFW_START        (4*MEM_G -16*MEM_M)
   2.113 -#define GFW_SIZE         (16*MEM_M)
   2.114 -
   2.115 -/* Nvram belongs to GFW memory space  */
   2.116 -#define NVRAM_SIZE       (MEM_K * 64)
   2.117 -#define NVRAM_START      (GFW_START + 10 * MEM_M)
   2.118 -
   2.119 -#define NVRAM_VALID_SIG 0x4650494e45584948 		// "HIXENIPF"
   2.120 -struct nvram_save_addr {
   2.121 -    xen_ulong_t addr;
   2.122 -    xen_ulong_t signature;
   2.123 -};
   2.124 -
   2.125 -struct pt_fpreg {
   2.126 -    union {
   2.127 -        xen_ulong_t bits[2];
   2.128 -        long double __dummy;    /* force 16-byte alignment */
   2.129 -    } u;
   2.130 -};
   2.131 -
   2.132 -struct cpu_user_regs {
   2.133 -    /* The following registers are saved by SAVE_MIN: */
   2.134 -    xen_ulong_t b6;  /* scratch */
   2.135 -    xen_ulong_t b7;  /* scratch */
   2.136 -
   2.137 -    xen_ulong_t ar_csd; /* used by cmp8xchg16 (scratch) */
   2.138 -    xen_ulong_t ar_ssd; /* reserved for future use (scratch) */
   2.139 -
   2.140 -    xen_ulong_t r8;  /* scratch (return value register 0) */
   2.141 -    xen_ulong_t r9;  /* scratch (return value register 1) */
   2.142 -    xen_ulong_t r10; /* scratch (return value register 2) */
   2.143 -    xen_ulong_t r11; /* scratch (return value register 3) */
   2.144 -
   2.145 -    xen_ulong_t cr_ipsr; /* interrupted task's psr */
   2.146 -    xen_ulong_t cr_iip;  /* interrupted task's instruction pointer */
   2.147 -    xen_ulong_t cr_ifs;  /* interrupted task's function state */
   2.148 -
   2.149 -    xen_ulong_t ar_unat; /* interrupted task's NaT register (preserved) */
   2.150 -    xen_ulong_t ar_pfs;  /* prev function state  */
   2.151 -    xen_ulong_t ar_rsc;  /* RSE configuration */
   2.152 -    /* The following two are valid only if cr_ipsr.cpl > 0: */
   2.153 -    xen_ulong_t ar_rnat;  /* RSE NaT */
   2.154 -    xen_ulong_t ar_bspstore; /* RSE bspstore */
   2.155 -
   2.156 -    xen_ulong_t pr;  /* 64 predicate registers (1 bit each) */
   2.157 -    xen_ulong_t b0;  /* return pointer (bp) */
   2.158 -    xen_ulong_t loadrs;  /* size of dirty partition << 16 */
   2.159 -
   2.160 -    xen_ulong_t r1;  /* the gp pointer */
   2.161 -    xen_ulong_t r12; /* interrupted task's memory stack pointer */
   2.162 -    xen_ulong_t r13; /* thread pointer */
   2.163 -
   2.164 -    xen_ulong_t ar_fpsr;  /* floating point status (preserved) */
   2.165 -    xen_ulong_t r15;  /* scratch */
   2.166 -
   2.167 - /* The remaining registers are NOT saved for system calls.  */
   2.168 -
   2.169 -    xen_ulong_t r14;  /* scratch */
   2.170 -    xen_ulong_t r2;  /* scratch */
   2.171 -    xen_ulong_t r3;  /* scratch */
   2.172 -    xen_ulong_t r16;  /* scratch */
   2.173 -    xen_ulong_t r17;  /* scratch */
   2.174 -    xen_ulong_t r18;  /* scratch */
   2.175 -    xen_ulong_t r19;  /* scratch */
   2.176 -    xen_ulong_t r20;  /* scratch */
   2.177 -    xen_ulong_t r21;  /* scratch */
   2.178 -    xen_ulong_t r22;  /* scratch */
   2.179 -    xen_ulong_t r23;  /* scratch */
   2.180 -    xen_ulong_t r24;  /* scratch */
   2.181 -    xen_ulong_t r25;  /* scratch */
   2.182 -    xen_ulong_t r26;  /* scratch */
   2.183 -    xen_ulong_t r27;  /* scratch */
   2.184 -    xen_ulong_t r28;  /* scratch */
   2.185 -    xen_ulong_t r29;  /* scratch */
   2.186 -    xen_ulong_t r30;  /* scratch */
   2.187 -    xen_ulong_t r31;  /* scratch */
   2.188 -    xen_ulong_t ar_ccv;  /* compare/exchange value (scratch) */
   2.189 -
   2.190 -    /*
   2.191 -     * Floating point registers that the kernel considers scratch:
   2.192 -     */
   2.193 -    struct pt_fpreg f6;  /* scratch */
   2.194 -    struct pt_fpreg f7;  /* scratch */
   2.195 -    struct pt_fpreg f8;  /* scratch */
   2.196 -    struct pt_fpreg f9;  /* scratch */
   2.197 -    struct pt_fpreg f10;  /* scratch */
   2.198 -    struct pt_fpreg f11;  /* scratch */
   2.199 -    xen_ulong_t r4;  /* preserved */
   2.200 -    xen_ulong_t r5;  /* preserved */
   2.201 -    xen_ulong_t r6;  /* preserved */
   2.202 -    xen_ulong_t r7;  /* preserved */
   2.203 -    xen_ulong_t eml_unat;    /* used for emulating instruction */
   2.204 -    xen_ulong_t pad0;     /* alignment pad */
   2.205 -
   2.206 -};
   2.207 -typedef struct cpu_user_regs cpu_user_regs_t;
   2.208 -
   2.209 -union vac {
   2.210 -    xen_ulong_t value;
   2.211 -    struct {
   2.212 -        int a_int:1;
   2.213 -        int a_from_int_cr:1;
   2.214 -        int a_to_int_cr:1;
   2.215 -        int a_from_psr:1;
   2.216 -        int a_from_cpuid:1;
   2.217 -        int a_cover:1;
   2.218 -        int a_bsw:1;
   2.219 -        long reserved:57;
   2.220 -    };
   2.221 -};
   2.222 -typedef union vac vac_t;
   2.223 -
   2.224 -union vdc {
   2.225 -    xen_ulong_t value;
   2.226 -    struct {
   2.227 -        int d_vmsw:1;
   2.228 -        int d_extint:1;
   2.229 -        int d_ibr_dbr:1;
   2.230 -        int d_pmc:1;
   2.231 -        int d_to_pmd:1;
   2.232 -        int d_itm:1;
   2.233 -        long reserved:58;
   2.234 -    };
   2.235 -};
   2.236 -typedef union vdc vdc_t;
   2.237 -
   2.238 -struct mapped_regs {
   2.239 -    union vac   vac;
   2.240 -    union vdc   vdc;
   2.241 -    xen_ulong_t  virt_env_vaddr;
   2.242 -    xen_ulong_t  reserved1[29];
   2.243 -    xen_ulong_t  vhpi;
   2.244 -    xen_ulong_t  reserved2[95];
   2.245 -    union {
   2.246 -        xen_ulong_t  vgr[16];
   2.247 -        xen_ulong_t bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
   2.248 -    };
   2.249 -    union {
   2.250 -        xen_ulong_t  vbgr[16];
   2.251 -        xen_ulong_t bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
   2.252 -    };
   2.253 -    xen_ulong_t  vnat;
   2.254 -    xen_ulong_t  vbnat;
   2.255 -    xen_ulong_t  vcpuid[5];
   2.256 -    xen_ulong_t  reserved3[11];
   2.257 -    xen_ulong_t  vpsr;
   2.258 -    xen_ulong_t  vpr;
   2.259 -    xen_ulong_t  reserved4[76];
   2.260 -    union {
   2.261 -        xen_ulong_t  vcr[128];
   2.262 -        struct {
   2.263 -            xen_ulong_t dcr;  // CR0
   2.264 -            xen_ulong_t itm;
   2.265 -            xen_ulong_t iva;
   2.266 -            xen_ulong_t rsv1[5];
   2.267 -            xen_ulong_t pta;  // CR8
   2.268 -            xen_ulong_t rsv2[7];
   2.269 -            xen_ulong_t ipsr;  // CR16
   2.270 -            xen_ulong_t isr;
   2.271 -            xen_ulong_t rsv3;
   2.272 -            xen_ulong_t iip;
   2.273 -            xen_ulong_t ifa;
   2.274 -            xen_ulong_t itir;
   2.275 -            xen_ulong_t iipa;
   2.276 -            xen_ulong_t ifs;
   2.277 -            xen_ulong_t iim;  // CR24
   2.278 -            xen_ulong_t iha;
   2.279 -            xen_ulong_t rsv4[38];
   2.280 -            xen_ulong_t lid;  // CR64
   2.281 -            xen_ulong_t ivr;
   2.282 -            xen_ulong_t tpr;
   2.283 -            xen_ulong_t eoi;
   2.284 -            xen_ulong_t irr[4];
   2.285 -            xen_ulong_t itv;  // CR72
   2.286 -            xen_ulong_t pmv;
   2.287 -            xen_ulong_t cmcv;
   2.288 -            xen_ulong_t rsv5[5];
   2.289 -            xen_ulong_t lrr0;  // CR80
   2.290 -            xen_ulong_t lrr1;
   2.291 -            xen_ulong_t rsv6[46];
   2.292 -        };
   2.293 -    };
   2.294 -    union {
   2.295 -        xen_ulong_t  reserved5[128];
   2.296 -        struct {
   2.297 -            xen_ulong_t precover_ifs;
   2.298 -            xen_ulong_t unat;  // not sure if this is needed until NaT arch is done
   2.299 -            int interrupt_collection_enabled; // virtual psr.ic
   2.300 -            /* virtual interrupt deliverable flag is evtchn_upcall_mask in
   2.301 -             * shared info area now. interrupt_mask_addr is the address
   2.302 -             * of evtchn_upcall_mask for current vcpu
   2.303 -             */
   2.304 -            unsigned char *interrupt_mask_addr;
   2.305 -            int pending_interruption;
   2.306 -            unsigned char vpsr_pp;
   2.307 -            unsigned char vpsr_dfh;
   2.308 -            unsigned char hpsr_dfh;
   2.309 -            unsigned char hpsr_mfh;
   2.310 -            xen_ulong_t reserved5_1[4];
   2.311 -            int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual
   2.312 -            int banknum; // 0 or 1, which virtual register bank is active
   2.313 -            xen_ulong_t rrs[8]; // region registers
   2.314 -            xen_ulong_t krs[8]; // kernel registers
   2.315 -            xen_ulong_t pkrs[8]; // protection key registers
   2.316 -            xen_ulong_t tmp[8]; // temp registers (e.g. for hyperprivops)
   2.317 -        };
   2.318 -    };
   2.319 -};
   2.320 -typedef struct mapped_regs mapped_regs_t;
   2.321 -
   2.322 -struct vpd {
   2.323 -    struct mapped_regs vpd_low;
   2.324 -    xen_ulong_t  reserved6[3456];
   2.325 -    xen_ulong_t  vmm_avail[128];
   2.326 -    xen_ulong_t  reserved7[4096];
   2.327 -};
   2.328 -typedef struct vpd vpd_t;
   2.329 -
   2.330 -struct arch_vcpu_info {
   2.331 -};
   2.332 -typedef struct arch_vcpu_info arch_vcpu_info_t;
   2.333 -
   2.334 -struct arch_shared_info {
   2.335 -    /* PFN of the start_info page.  */
   2.336 -    xen_ulong_t start_info_pfn;
   2.337 -
   2.338 -    /* Interrupt vector for event channel.  */
   2.339 -    int evtchn_vector;
   2.340 -
   2.341 -    uint64_t pad[32];
   2.342 -};
   2.343 -typedef struct arch_shared_info arch_shared_info_t;
   2.344 -
   2.345 -typedef xen_ulong_t xen_callback_t;
   2.346 -
   2.347 -struct ia64_tr_entry {
   2.348 -    xen_ulong_t pte;
   2.349 -    xen_ulong_t itir;
   2.350 -    xen_ulong_t vadr;
   2.351 -    xen_ulong_t rid;
   2.352 -};
   2.353 -
   2.354 -struct vcpu_extra_regs {
   2.355 -    struct ia64_tr_entry itrs[8];
   2.356 -    struct ia64_tr_entry dtrs[8];
   2.357 -    xen_ulong_t iva;
   2.358 -    xen_ulong_t dcr;
   2.359 -    xen_ulong_t event_callback_ip;
   2.360 -};
   2.361 -
   2.362 -struct vcpu_guest_context {
   2.363 -#define VGCF_EXTRA_REGS (1<<1)	/* Get/Set extra regs.  */
   2.364 -    xen_ulong_t flags;       /* VGCF_* flags */
   2.365 -
   2.366 -    struct cpu_user_regs user_regs;
   2.367 -    struct vcpu_extra_regs extra_regs;
   2.368 -    xen_ulong_t privregs_pfn;
   2.369 -};
   2.370 -typedef struct vcpu_guest_context vcpu_guest_context_t;
   2.371 -DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
   2.372 -
   2.373 -/* dom0 vp op */
   2.374 -#define __HYPERVISOR_ia64_dom0vp_op     __HYPERVISOR_arch_0
   2.375 -/*  Map io space in machine address to dom0 physical address space.
   2.376 -    Currently physical assigned address equals to machine address.  */
   2.377 -#define IA64_DOM0VP_ioremap             0
   2.378 -
   2.379 -/* Convert a pseudo physical page frame number to the corresponding
   2.380 -   machine page frame number. If no page is assigned, INVALID_MFN or
   2.381 -   GPFN_INV_MASK is returned depending on domain's non-vti/vti mode.  */
   2.382 -#define IA64_DOM0VP_phystomach          1
   2.383 -
   2.384 -/* Convert a machine page frame number to the corresponding pseudo physical
   2.385 -   page frame number of the caller domain.  */
   2.386 -#define IA64_DOM0VP_machtophys          3
   2.387 -
   2.388 -/* Reserved for future use.  */
   2.389 -#define IA64_DOM0VP_iounmap             4
   2.390 -
   2.391 -/* Unmap and free pages contained in the specified pseudo physical region.  */
   2.392 -#define IA64_DOM0VP_zap_physmap         5
   2.393 -
   2.394 -/* Assign machine page frame to dom0's pseudo physical address space.  */
   2.395 -#define IA64_DOM0VP_add_physmap         6
   2.396 -
   2.397 -/* expose the p2m table into domain */
   2.398 -#define IA64_DOM0VP_expose_p2m          7
   2.399 -
   2.400 -/* xen perfmon */
   2.401 -#define IA64_DOM0VP_perfmon             8
   2.402 -
   2.403 -/* gmfn version of IA64_DOM0VP_add_physmap */
   2.404 -#define IA64_DOM0VP_add_physmap_with_gmfn       9
   2.405 -
   2.406 -/* Add an I/O port space range */
   2.407 -#define IA64_DOM0VP_add_io_space        11
   2.408 -
   2.409 -// flags for page assignement to pseudo physical address space
   2.410 -#define _ASSIGN_readonly                0
   2.411 -#define ASSIGN_readonly                 (1UL << _ASSIGN_readonly)
   2.412 -#define ASSIGN_writable                 (0UL << _ASSIGN_readonly) // dummy flag
   2.413 -/* Internal only: memory attribute must be WC/UC/UCE.  */
   2.414 -#define _ASSIGN_nocache                 1
   2.415 -#define ASSIGN_nocache                  (1UL << _ASSIGN_nocache)
   2.416 -// tlb tracking
   2.417 -#define _ASSIGN_tlb_track               2
   2.418 -#define ASSIGN_tlb_track                (1UL << _ASSIGN_tlb_track)
   2.419 -/* Internal only: associated with PGC_allocated bit */
   2.420 -#define _ASSIGN_pgc_allocated           3
   2.421 -#define ASSIGN_pgc_allocated            (1UL << _ASSIGN_pgc_allocated)
   2.422 -
   2.423 -/* This structure has the same layout of struct ia64_boot_param, defined in
   2.424 -   <asm/system.h>.  It is redefined here to ease use.  */
   2.425 -struct xen_ia64_boot_param {
   2.426 -	xen_ulong_t command_line;	/* physical address of cmd line args */
   2.427 -	xen_ulong_t efi_systab;	/* physical address of EFI system table */
   2.428 -	xen_ulong_t efi_memmap;	/* physical address of EFI memory map */
   2.429 -	xen_ulong_t efi_memmap_size;	/* size of EFI memory map */
   2.430 -	xen_ulong_t efi_memdesc_size;	/* size of an EFI memory map descriptor */
   2.431 -	unsigned int  efi_memdesc_version;	/* memory descriptor version */
   2.432 -	struct {
   2.433 -		unsigned short num_cols;	/* number of columns on console.  */
   2.434 -		unsigned short num_rows;	/* number of rows on console.  */
   2.435 -		unsigned short orig_x;	/* cursor's x position */
   2.436 -		unsigned short orig_y;	/* cursor's y position */
   2.437 -	} console_info;
   2.438 -	xen_ulong_t fpswa;		/* physical address of the fpswa interface */
   2.439 -	xen_ulong_t initrd_start;
   2.440 -	xen_ulong_t initrd_size;
   2.441 -	xen_ulong_t domain_start;	/* va where the boot time domain begins */
   2.442 -	xen_ulong_t domain_size;	/* how big is the boot domain */
   2.443 -};
   2.444 -
   2.445 -#endif /* !__ASSEMBLY__ */
   2.446 -
   2.447 -/* Size of the shared_info area (this is not related to page size).  */
   2.448 -#define XSI_SHIFT			14
   2.449 -#define XSI_SIZE			(1 << XSI_SHIFT)
   2.450 -/* Log size of mapped_regs area (64 KB - only 4KB is used).  */
   2.451 -#define XMAPPEDREGS_SHIFT		12
   2.452 -#define XMAPPEDREGS_SIZE		(1 << XMAPPEDREGS_SHIFT)
   2.453 -/* Offset of XASI (Xen arch shared info) wrt XSI_BASE.  */
   2.454 -#define XMAPPEDREGS_OFS			XSI_SIZE
   2.455 -
   2.456 -/* Hyperprivops.  */
   2.457 -#define HYPERPRIVOP_START		0x1
   2.458 -#define HYPERPRIVOP_RFI			(HYPERPRIVOP_START + 0x0)
   2.459 -#define HYPERPRIVOP_RSM_DT		(HYPERPRIVOP_START + 0x1)
   2.460 -#define HYPERPRIVOP_SSM_DT		(HYPERPRIVOP_START + 0x2)
   2.461 -#define HYPERPRIVOP_COVER		(HYPERPRIVOP_START + 0x3)
   2.462 -#define HYPERPRIVOP_ITC_D		(HYPERPRIVOP_START + 0x4)
   2.463 -#define HYPERPRIVOP_ITC_I		(HYPERPRIVOP_START + 0x5)
   2.464 -#define HYPERPRIVOP_SSM_I		(HYPERPRIVOP_START + 0x6)
   2.465 -#define HYPERPRIVOP_GET_IVR		(HYPERPRIVOP_START + 0x7)
   2.466 -#define HYPERPRIVOP_GET_TPR		(HYPERPRIVOP_START + 0x8)
   2.467 -#define HYPERPRIVOP_SET_TPR		(HYPERPRIVOP_START + 0x9)
   2.468 -#define HYPERPRIVOP_EOI			(HYPERPRIVOP_START + 0xa)
   2.469 -#define HYPERPRIVOP_SET_ITM		(HYPERPRIVOP_START + 0xb)
   2.470 -#define HYPERPRIVOP_THASH		(HYPERPRIVOP_START + 0xc)
   2.471 -#define HYPERPRIVOP_PTC_GA		(HYPERPRIVOP_START + 0xd)
   2.472 -#define HYPERPRIVOP_ITR_D		(HYPERPRIVOP_START + 0xe)
   2.473 -#define HYPERPRIVOP_GET_RR		(HYPERPRIVOP_START + 0xf)
   2.474 -#define HYPERPRIVOP_SET_RR		(HYPERPRIVOP_START + 0x10)
   2.475 -#define HYPERPRIVOP_SET_KR		(HYPERPRIVOP_START + 0x11)
   2.476 -#define HYPERPRIVOP_FC			(HYPERPRIVOP_START + 0x12)
   2.477 -#define HYPERPRIVOP_GET_CPUID		(HYPERPRIVOP_START + 0x13)
   2.478 -#define HYPERPRIVOP_GET_PMD		(HYPERPRIVOP_START + 0x14)
   2.479 -#define HYPERPRIVOP_GET_EFLAG		(HYPERPRIVOP_START + 0x15)
   2.480 -#define HYPERPRIVOP_SET_EFLAG		(HYPERPRIVOP_START + 0x16)
   2.481 -#define HYPERPRIVOP_RSM_BE		(HYPERPRIVOP_START + 0x17)
   2.482 -#define HYPERPRIVOP_GET_PSR		(HYPERPRIVOP_START + 0x18)
   2.483 -#define HYPERPRIVOP_MAX			(0x19)
   2.484 -
   2.485 -/* Fast and light hypercalls.  */
   2.486 -#define __HYPERVISOR_ia64_fast_eoi	__HYPERVISOR_arch_1
   2.487 -
   2.488 -/* Xencomm macros.  */
   2.489 -#define XENCOMM_INLINE_MASK 0xf800000000000000UL
   2.490 -#define XENCOMM_INLINE_FLAG 0x8000000000000000UL
   2.491 -
   2.492 -#define XENCOMM_IS_INLINE(addr) \
   2.493 -  (((xen_ulong_t)(addr) & XENCOMM_INLINE_MASK) == XENCOMM_INLINE_FLAG)
   2.494 -#define XENCOMM_INLINE_ADDR(addr) \
   2.495 -  ((xen_ulong_t)(addr) & ~XENCOMM_INLINE_MASK)
   2.496 -
   2.497 -/* xen perfmon */
   2.498 -#ifdef XEN
   2.499 -#ifndef __ASSEMBLY__
   2.500 -#ifndef _ASM_IA64_PERFMON_H
   2.501 -
   2.502 -#include <xen/list.h>   // asm/perfmon.h requires struct list_head
   2.503 -#include <asm/perfmon.h>
   2.504 -// for PFM_xxx and pfarg_features_t, pfarg_context_t, pfarg_reg_t, pfarg_load_t
   2.505 -
   2.506 -#endif /* _ASM_IA64_PERFMON_H */
   2.507 -
   2.508 -DEFINE_XEN_GUEST_HANDLE(pfarg_features_t);
   2.509 -DEFINE_XEN_GUEST_HANDLE(pfarg_context_t);
   2.510 -DEFINE_XEN_GUEST_HANDLE(pfarg_reg_t);
   2.511 -DEFINE_XEN_GUEST_HANDLE(pfarg_load_t);
   2.512 -#endif /* __ASSEMBLY__ */
   2.513 -#endif /* XEN */
   2.514 -
   2.515 -#endif /* __HYPERVISOR_IF_IA64_H__ */
   2.516 -
   2.517 -/*
   2.518 - * Local variables:
   2.519 - * mode: C
   2.520 - * c-set-style: "BSD"
   2.521 - * c-basic-offset: 4
   2.522 - * tab-width: 4
   2.523 - * indent-tabs-mode: nil
   2.524 - * End:
   2.525 - */
   2.526 +/******************************************************************************
   2.527 + * arch-ia64/hypervisor-if.h
   2.528 + * 
   2.529 + * Guest OS interface to IA64 Xen.
   2.530 + *
   2.531 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   2.532 + * of this software and associated documentation files (the "Software"), to
   2.533 + * deal in the Software without restriction, including without limitation the
   2.534 + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
   2.535 + * sell copies of the Software, and to permit persons to whom the Software is
   2.536 + * furnished to do so, subject to the following conditions:
   2.537 + *
   2.538 + * The above copyright notice and this permission notice shall be included in
   2.539 + * all copies or substantial portions of the Software.
   2.540 + *
   2.541 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   2.542 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   2.543 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   2.544 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   2.545 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   2.546 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   2.547 + * DEALINGS IN THE SOFTWARE.
   2.548 + *
   2.549 + */
   2.550 +
   2.551 +#ifndef __HYPERVISOR_IF_IA64_H__
   2.552 +#define __HYPERVISOR_IF_IA64_H__
   2.553 +
   2.554 +typedef unsigned long long xen_ulong_t;
   2.555 +typedef unsigned long long xen_long_t;
   2.556 +
   2.557 +/* Structural guest handles introduced in 0x00030201. */
   2.558 +#if __XEN_INTERFACE_VERSION__ >= 0x00030201
   2.559 +#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
   2.560 +    typedef struct { type *p; } __guest_handle_ ## name
   2.561 +#else
   2.562 +#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
   2.563 +    typedef type * __guest_handle_ ## name
   2.564 +#endif
   2.565 +
   2.566 +#define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
   2.567 +#define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
   2.568 +#define XEN_GUEST_HANDLE_64(name)       XEN_GUEST_HANDLE(name)
   2.569 +#define uint64_aligned_t                uint64_t
   2.570 +#define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)
   2.571 +#ifdef __XEN_TOOLS__
   2.572 +#define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
   2.573 +#endif
   2.574 +
   2.575 +#ifndef __ASSEMBLY__
   2.576 +/* Guest handles for primitive C types. */
   2.577 +__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
   2.578 +__DEFINE_XEN_GUEST_HANDLE(uint,  unsigned int);
   2.579 +__DEFINE_XEN_GUEST_HANDLE(ulong, xen_ulong_t);
   2.580 +__DEFINE_XEN_GUEST_HANDLE(u64,   xen_ulong_t);
   2.581 +DEFINE_XEN_GUEST_HANDLE(char);
   2.582 +DEFINE_XEN_GUEST_HANDLE(int);
   2.583 +DEFINE_XEN_GUEST_HANDLE(xen_ulong_t);
   2.584 +DEFINE_XEN_GUEST_HANDLE(void);
   2.585 +
   2.586 +typedef xen_ulong_t xen_pfn_t;
   2.587 +DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
   2.588 +#define PRI_xen_pfn "lx"
   2.589 +#endif
   2.590 +
   2.591 +/* Arch specific VIRQs definition */
   2.592 +#define VIRQ_ITC        VIRQ_ARCH_0 /* V. Virtual itc timer */
   2.593 +#define VIRQ_MCA_CMC    VIRQ_ARCH_1 /* MCA cmc interrupt */
   2.594 +#define VIRQ_MCA_CPE    VIRQ_ARCH_2 /* MCA cpe interrupt */
   2.595 +
   2.596 +/* Maximum number of virtual CPUs in multi-processor guests. */
   2.597 +/* WARNING: before changing this, check that shared_info fits on a page */
   2.598 +#define MAX_VIRT_CPUS 64
   2.599 +
   2.600 +#ifndef __ASSEMBLY__
   2.601 +
   2.602 +#define INVALID_MFN       (~0UL)
   2.603 +
   2.604 +#define MEM_G   (1UL << 30)
   2.605 +#define MEM_M   (1UL << 20)
   2.606 +#define MEM_K   (1UL << 10)
   2.607 +
   2.608 +#define MMIO_START       (3 * MEM_G)
   2.609 +#define MMIO_SIZE        (512 * MEM_M)
   2.610 +
   2.611 +#define VGA_IO_START     0xA0000UL
   2.612 +#define VGA_IO_SIZE      0x20000
   2.613 +
   2.614 +#define LEGACY_IO_START  (MMIO_START + MMIO_SIZE)
   2.615 +#define LEGACY_IO_SIZE   (64*MEM_M)
   2.616 +
   2.617 +#define IO_PAGE_START (LEGACY_IO_START + LEGACY_IO_SIZE)
   2.618 +#define IO_PAGE_SIZE  PAGE_SIZE
   2.619 +
   2.620 +#define STORE_PAGE_START (IO_PAGE_START + IO_PAGE_SIZE)
   2.621 +#define STORE_PAGE_SIZE  PAGE_SIZE
   2.622 +
   2.623 +#define BUFFER_IO_PAGE_START (STORE_PAGE_START+STORE_PAGE_SIZE)
   2.624 +#define BUFFER_IO_PAGE_SIZE PAGE_SIZE
   2.625 +
   2.626 +#define BUFFER_PIO_PAGE_START (BUFFER_IO_PAGE_START+BUFFER_IO_PAGE_SIZE)
   2.627 +#define BUFFER_PIO_PAGE_SIZE PAGE_SIZE
   2.628 +
   2.629 +#define IO_SAPIC_START   0xfec00000UL
   2.630 +#define IO_SAPIC_SIZE    0x100000
   2.631 +
   2.632 +#define PIB_START 0xfee00000UL
   2.633 +#define PIB_SIZE 0x200000
   2.634 +
   2.635 +#define GFW_START        (4*MEM_G -16*MEM_M)
   2.636 +#define GFW_SIZE         (16*MEM_M)
   2.637 +
   2.638 +/* Nvram belongs to GFW memory space  */
   2.639 +#define NVRAM_SIZE       (MEM_K * 64)
   2.640 +#define NVRAM_START      (GFW_START + 10 * MEM_M)
   2.641 +
   2.642 +#define NVRAM_VALID_SIG 0x4650494e45584948 		// "HIXENIPF"
   2.643 +struct nvram_save_addr {
   2.644 +    xen_ulong_t addr;
   2.645 +    xen_ulong_t signature;
   2.646 +};
   2.647 +
   2.648 +struct pt_fpreg {
   2.649 +    union {
   2.650 +        xen_ulong_t bits[2];
   2.651 +        long double __dummy;    /* force 16-byte alignment */
   2.652 +    } u;
   2.653 +};
   2.654 +
   2.655 +struct cpu_user_regs {
   2.656 +    /* The following registers are saved by SAVE_MIN: */
   2.657 +    xen_ulong_t b6;  /* scratch */
   2.658 +    xen_ulong_t b7;  /* scratch */
   2.659 +
   2.660 +    xen_ulong_t ar_csd; /* used by cmp8xchg16 (scratch) */
   2.661 +    xen_ulong_t ar_ssd; /* reserved for future use (scratch) */
   2.662 +
   2.663 +    xen_ulong_t r8;  /* scratch (return value register 0) */
   2.664 +    xen_ulong_t r9;  /* scratch (return value register 1) */
   2.665 +    xen_ulong_t r10; /* scratch (return value register 2) */
   2.666 +    xen_ulong_t r11; /* scratch (return value register 3) */
   2.667 +
   2.668 +    xen_ulong_t cr_ipsr; /* interrupted task's psr */
   2.669 +    xen_ulong_t cr_iip;  /* interrupted task's instruction pointer */
   2.670 +    xen_ulong_t cr_ifs;  /* interrupted task's function state */
   2.671 +
   2.672 +    xen_ulong_t ar_unat; /* interrupted task's NaT register (preserved) */
   2.673 +    xen_ulong_t ar_pfs;  /* prev function state  */
   2.674 +    xen_ulong_t ar_rsc;  /* RSE configuration */
   2.675 +    /* The following two are valid only if cr_ipsr.cpl > 0: */
   2.676 +    xen_ulong_t ar_rnat;  /* RSE NaT */
   2.677 +    xen_ulong_t ar_bspstore; /* RSE bspstore */
   2.678 +
   2.679 +    xen_ulong_t pr;  /* 64 predicate registers (1 bit each) */
   2.680 +    xen_ulong_t b0;  /* return pointer (bp) */
   2.681 +    xen_ulong_t loadrs;  /* size of dirty partition << 16 */
   2.682 +
   2.683 +    xen_ulong_t r1;  /* the gp pointer */
   2.684 +    xen_ulong_t r12; /* interrupted task's memory stack pointer */
   2.685 +    xen_ulong_t r13; /* thread pointer */
   2.686 +
   2.687 +    xen_ulong_t ar_fpsr;  /* floating point status (preserved) */
   2.688 +    xen_ulong_t r15;  /* scratch */
   2.689 +
   2.690 + /* The remaining registers are NOT saved for system calls.  */
   2.691 +
   2.692 +    xen_ulong_t r14;  /* scratch */
   2.693 +    xen_ulong_t r2;  /* scratch */
   2.694 +    xen_ulong_t r3;  /* scratch */
   2.695 +    xen_ulong_t r16;  /* scratch */
   2.696 +    xen_ulong_t r17;  /* scratch */
   2.697 +    xen_ulong_t r18;  /* scratch */
   2.698 +    xen_ulong_t r19;  /* scratch */
   2.699 +    xen_ulong_t r20;  /* scratch */
   2.700 +    xen_ulong_t r21;  /* scratch */
   2.701 +    xen_ulong_t r22;  /* scratch */
   2.702 +    xen_ulong_t r23;  /* scratch */
   2.703 +    xen_ulong_t r24;  /* scratch */
   2.704 +    xen_ulong_t r25;  /* scratch */
   2.705 +    xen_ulong_t r26;  /* scratch */
   2.706 +    xen_ulong_t r27;  /* scratch */
   2.707 +    xen_ulong_t r28;  /* scratch */
   2.708 +    xen_ulong_t r29;  /* scratch */
   2.709 +    xen_ulong_t r30;  /* scratch */
   2.710 +    xen_ulong_t r31;  /* scratch */
   2.711 +    xen_ulong_t ar_ccv;  /* compare/exchange value (scratch) */
   2.712 +
   2.713 +    /*
   2.714 +     * Floating point registers that the kernel considers scratch:
   2.715 +     */
   2.716 +    struct pt_fpreg f6;  /* scratch */
   2.717 +    struct pt_fpreg f7;  /* scratch */
   2.718 +    struct pt_fpreg f8;  /* scratch */
   2.719 +    struct pt_fpreg f9;  /* scratch */
   2.720 +    struct pt_fpreg f10;  /* scratch */
   2.721 +    struct pt_fpreg f11;  /* scratch */
   2.722 +    xen_ulong_t r4;  /* preserved */
   2.723 +    xen_ulong_t r5;  /* preserved */
   2.724 +    xen_ulong_t r6;  /* preserved */
   2.725 +    xen_ulong_t r7;  /* preserved */
   2.726 +    xen_ulong_t eml_unat;    /* used for emulating instruction */
   2.727 +    xen_ulong_t pad0;     /* alignment pad */
   2.728 +
   2.729 +};
   2.730 +typedef struct cpu_user_regs cpu_user_regs_t;
   2.731 +
   2.732 +union vac {
   2.733 +    xen_ulong_t value;
   2.734 +    struct {
   2.735 +        int a_int:1;
   2.736 +        int a_from_int_cr:1;
   2.737 +        int a_to_int_cr:1;
   2.738 +        int a_from_psr:1;
   2.739 +        int a_from_cpuid:1;
   2.740 +        int a_cover:1;
   2.741 +        int a_bsw:1;
   2.742 +        xen_long_t reserved:57;
   2.743 +    };
   2.744 +};
   2.745 +typedef union vac vac_t;
   2.746 +
   2.747 +union vdc {
   2.748 +    xen_ulong_t value;
   2.749 +    struct {
   2.750 +        int d_vmsw:1;
   2.751 +        int d_extint:1;
   2.752 +        int d_ibr_dbr:1;
   2.753 +        int d_pmc:1;
   2.754 +        int d_to_pmd:1;
   2.755 +        int d_itm:1;
   2.756 +        xen_long_t reserved:58;
   2.757 +    };
   2.758 +};
   2.759 +typedef union vdc vdc_t;
   2.760 +
   2.761 +struct mapped_regs {
   2.762 +    union vac   vac;
   2.763 +    union vdc   vdc;
   2.764 +    xen_ulong_t  virt_env_vaddr;
   2.765 +    xen_ulong_t  reserved1[29];
   2.766 +    xen_ulong_t  vhpi;
   2.767 +    xen_ulong_t  reserved2[95];
   2.768 +    union {
   2.769 +        xen_ulong_t  vgr[16];
   2.770 +        xen_ulong_t bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
   2.771 +    };
   2.772 +    union {
   2.773 +        xen_ulong_t  vbgr[16];
   2.774 +        xen_ulong_t bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
   2.775 +    };
   2.776 +    xen_ulong_t  vnat;
   2.777 +    xen_ulong_t  vbnat;
   2.778 +    xen_ulong_t  vcpuid[5];
   2.779 +    xen_ulong_t  reserved3[11];
   2.780 +    xen_ulong_t  vpsr;
   2.781 +    xen_ulong_t  vpr;
   2.782 +    xen_ulong_t  reserved4[76];
   2.783 +    union {
   2.784 +        xen_ulong_t  vcr[128];
   2.785 +        struct {
   2.786 +            xen_ulong_t dcr;  // CR0
   2.787 +            xen_ulong_t itm;
   2.788 +            xen_ulong_t iva;
   2.789 +            xen_ulong_t rsv1[5];
   2.790 +            xen_ulong_t pta;  // CR8
   2.791 +            xen_ulong_t rsv2[7];
   2.792 +            xen_ulong_t ipsr;  // CR16
   2.793 +            xen_ulong_t isr;
   2.794 +            xen_ulong_t rsv3;
   2.795 +            xen_ulong_t iip;
   2.796 +            xen_ulong_t ifa;
   2.797 +            xen_ulong_t itir;
   2.798 +            xen_ulong_t iipa;
   2.799 +            xen_ulong_t ifs;
   2.800 +            xen_ulong_t iim;  // CR24
   2.801 +            xen_ulong_t iha;
   2.802 +            xen_ulong_t rsv4[38];
   2.803 +            xen_ulong_t lid;  // CR64
   2.804 +            xen_ulong_t ivr;
   2.805 +            xen_ulong_t tpr;
   2.806 +            xen_ulong_t eoi;
   2.807 +            xen_ulong_t irr[4];
   2.808 +            xen_ulong_t itv;  // CR72
   2.809 +            xen_ulong_t pmv;
   2.810 +            xen_ulong_t cmcv;
   2.811 +            xen_ulong_t rsv5[5];
   2.812 +            xen_ulong_t lrr0;  // CR80
   2.813 +            xen_ulong_t lrr1;
   2.814 +            xen_ulong_t rsv6[46];
   2.815 +        };
   2.816 +    };
   2.817 +    union {
   2.818 +        xen_ulong_t  reserved5[128];
   2.819 +        struct {
   2.820 +            xen_ulong_t precover_ifs;
   2.821 +            xen_ulong_t unat;  // not sure if this is needed until NaT arch is done
   2.822 +            int interrupt_collection_enabled; // virtual psr.ic
   2.823 +            /* virtual interrupt deliverable flag is evtchn_upcall_mask in
   2.824 +             * shared info area now. interrupt_mask_addr is the address
   2.825 +             * of evtchn_upcall_mask for current vcpu
   2.826 +             */
   2.827 +            unsigned char *interrupt_mask_addr;
   2.828 +            int pending_interruption;
   2.829 +            unsigned char vpsr_pp;
   2.830 +            unsigned char vpsr_dfh;
   2.831 +            unsigned char hpsr_dfh;
   2.832 +            unsigned char hpsr_mfh;
   2.833 +            xen_ulong_t reserved5_1[4];
   2.834 +            int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual
   2.835 +            int banknum; // 0 or 1, which virtual register bank is active
   2.836 +            xen_ulong_t rrs[8]; // region registers
   2.837 +            xen_ulong_t krs[8]; // kernel registers
   2.838 +            xen_ulong_t pkrs[8]; // protection key registers
   2.839 +            xen_ulong_t tmp[8]; // temp registers (e.g. for hyperprivops)
   2.840 +        };
   2.841 +    };
   2.842 +};
   2.843 +typedef struct mapped_regs mapped_regs_t;
   2.844 +
   2.845 +struct vpd {
   2.846 +    struct mapped_regs vpd_low;
   2.847 +    xen_ulong_t  reserved6[3456];
   2.848 +    xen_ulong_t  vmm_avail[128];
   2.849 +    xen_ulong_t  reserved7[4096];
   2.850 +};
   2.851 +typedef struct vpd vpd_t;
   2.852 +
   2.853 +#if 0
   2.854 +struct arch_vcpu_info {
   2.855 +};
   2.856 +typedef struct arch_vcpu_info arch_vcpu_info_t;
   2.857 +#endif
   2.858 +
   2.859 +struct arch_shared_info {
   2.860 +    /* PFN of the start_info page.  */
   2.861 +    xen_ulong_t start_info_pfn;
   2.862 +
   2.863 +    /* Interrupt vector for event channel.  */
   2.864 +    int evtchn_vector;
   2.865 +
   2.866 +    uint64_t pad[32];
   2.867 +};
   2.868 +typedef struct arch_shared_info arch_shared_info_t;
   2.869 +
   2.870 +typedef xen_ulong_t xen_callback_t;
   2.871 +
   2.872 +struct ia64_tr_entry {
   2.873 +    xen_ulong_t pte;
   2.874 +    xen_ulong_t itir;
   2.875 +    xen_ulong_t vadr;
   2.876 +    xen_ulong_t rid;
   2.877 +};
   2.878 +
   2.879 +struct vcpu_extra_regs {
   2.880 +    struct ia64_tr_entry itrs[8];
   2.881 +    struct ia64_tr_entry dtrs[8];
   2.882 +    xen_ulong_t iva;
   2.883 +    xen_ulong_t dcr;
   2.884 +    xen_ulong_t event_callback_ip;
   2.885 +};
   2.886 +
   2.887 +struct vcpu_guest_context {
   2.888 +#define VGCF_EXTRA_REGS (1<<1)	/* Get/Set extra regs.  */
   2.889 +    xen_ulong_t flags;       /* VGCF_* flags */
   2.890 +
   2.891 +    struct cpu_user_regs user_regs;
   2.892 +    struct vcpu_extra_regs extra_regs;
   2.893 +    xen_ulong_t privregs_pfn;
   2.894 +};
   2.895 +typedef struct vcpu_guest_context vcpu_guest_context_t;
   2.896 +DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
   2.897 +
   2.898 +/* dom0 vp op */
   2.899 +#define __HYPERVISOR_ia64_dom0vp_op     __HYPERVISOR_arch_0
   2.900 +/*  Map io space in machine address to dom0 physical address space.
   2.901 +    Currently physical assigned address equals to machine address.  */
   2.902 +#define IA64_DOM0VP_ioremap             0
   2.903 +
   2.904 +/* Convert a pseudo physical page frame number to the corresponding
   2.905 +   machine page frame number. If no page is assigned, INVALID_MFN or
   2.906 +   GPFN_INV_MASK is returned depending on domain's non-vti/vti mode.  */
   2.907 +#define IA64_DOM0VP_phystomach          1
   2.908 +
   2.909 +/* Convert a machine page frame number to the corresponding pseudo physical
   2.910 +   page frame number of the caller domain.  */
   2.911 +#define IA64_DOM0VP_machtophys          3
   2.912 +
   2.913 +/* Reserved for future use.  */
   2.914 +#define IA64_DOM0VP_iounmap             4
   2.915 +
   2.916 +/* Unmap and free pages contained in the specified pseudo physical region.  */
   2.917 +#define IA64_DOM0VP_zap_physmap         5
   2.918 +
   2.919 +/* Assign machine page frame to dom0's pseudo physical address space.  */
   2.920 +#define IA64_DOM0VP_add_physmap         6
   2.921 +
   2.922 +/* expose the p2m table into domain */
   2.923 +#define IA64_DOM0VP_expose_p2m          7
   2.924 +
   2.925 +/* xen perfmon */
   2.926 +#define IA64_DOM0VP_perfmon             8
   2.927 +
   2.928 +/* gmfn version of IA64_DOM0VP_add_physmap */
   2.929 +#define IA64_DOM0VP_add_physmap_with_gmfn       9
   2.930 +
   2.931 +/* Add an I/O port space range */
   2.932 +#define IA64_DOM0VP_add_io_space        11
   2.933 +
   2.934 +// flags for page assignement to pseudo physical address space
   2.935 +#define _ASSIGN_readonly                0
   2.936 +#define ASSIGN_readonly                 (1UL << _ASSIGN_readonly)
   2.937 +#define ASSIGN_writable                 (0UL << _ASSIGN_readonly) // dummy flag
   2.938 +/* Internal only: memory attribute must be WC/UC/UCE.  */
   2.939 +#define _ASSIGN_nocache                 1
   2.940 +#define ASSIGN_nocache                  (1UL << _ASSIGN_nocache)
   2.941 +// tlb tracking
   2.942 +#define _ASSIGN_tlb_track               2
   2.943 +#define ASSIGN_tlb_track                (1UL << _ASSIGN_tlb_track)
   2.944 +/* Internal only: associated with PGC_allocated bit */
   2.945 +#define _ASSIGN_pgc_allocated           3
   2.946 +#define ASSIGN_pgc_allocated            (1UL << _ASSIGN_pgc_allocated)
   2.947 +
   2.948 +/* This structure has the same layout of struct ia64_boot_param, defined in
   2.949 +   <asm/system.h>.  It is redefined here to ease use.  */
   2.950 +struct xen_ia64_boot_param {
   2.951 +	xen_ulong_t command_line;	/* physical address of cmd line args */
   2.952 +	xen_ulong_t efi_systab;	/* physical address of EFI system table */
   2.953 +	xen_ulong_t efi_memmap;	/* physical address of EFI memory map */
   2.954 +	xen_ulong_t efi_memmap_size;	/* size of EFI memory map */
   2.955 +	xen_ulong_t efi_memdesc_size;	/* size of an EFI memory map descriptor */
   2.956 +	unsigned int  efi_memdesc_version;	/* memory descriptor version */
   2.957 +	struct {
   2.958 +		unsigned short num_cols;	/* number of columns on console.  */
   2.959 +		unsigned short num_rows;	/* number of rows on console.  */
   2.960 +		unsigned short orig_x;	/* cursor's x position */
   2.961 +		unsigned short orig_y;	/* cursor's y position */
   2.962 +	} console_info;
   2.963 +	xen_ulong_t fpswa;		/* physical address of the fpswa interface */
   2.964 +	xen_ulong_t initrd_start;
   2.965 +	xen_ulong_t initrd_size;
   2.966 +	xen_ulong_t domain_start;	/* va where the boot time domain begins */
   2.967 +	xen_ulong_t domain_size;	/* how big is the boot domain */
   2.968 +};
   2.969 +
   2.970 +#endif /* !__ASSEMBLY__ */
   2.971 +
   2.972 +/* Size of the shared_info area (this is not related to page size).  */
   2.973 +#define XSI_SHIFT			14
   2.974 +#define XSI_SIZE			(1 << XSI_SHIFT)
   2.975 +/* Log size of mapped_regs area (64 KB - only 4KB is used).  */
   2.976 +#define XMAPPEDREGS_SHIFT		12
   2.977 +#define XMAPPEDREGS_SIZE		(1 << XMAPPEDREGS_SHIFT)
   2.978 +/* Offset of XASI (Xen arch shared info) wrt XSI_BASE.  */
   2.979 +#define XMAPPEDREGS_OFS			XSI_SIZE
   2.980 +
   2.981 +/* Hyperprivops.  */
   2.982 +#define HYPERPRIVOP_START		0x1
   2.983 +#define HYPERPRIVOP_RFI			(HYPERPRIVOP_START + 0x0)
   2.984 +#define HYPERPRIVOP_RSM_DT		(HYPERPRIVOP_START + 0x1)
   2.985 +#define HYPERPRIVOP_SSM_DT		(HYPERPRIVOP_START + 0x2)
   2.986 +#define HYPERPRIVOP_COVER		(HYPERPRIVOP_START + 0x3)
   2.987 +#define HYPERPRIVOP_ITC_D		(HYPERPRIVOP_START + 0x4)
   2.988 +#define HYPERPRIVOP_ITC_I		(HYPERPRIVOP_START + 0x5)
   2.989 +#define HYPERPRIVOP_SSM_I		(HYPERPRIVOP_START + 0x6)
   2.990 +#define HYPERPRIVOP_GET_IVR		(HYPERPRIVOP_START + 0x7)
   2.991 +#define HYPERPRIVOP_GET_TPR		(HYPERPRIVOP_START + 0x8)
   2.992 +#define HYPERPRIVOP_SET_TPR		(HYPERPRIVOP_START + 0x9)
   2.993 +#define HYPERPRIVOP_EOI			(HYPERPRIVOP_START + 0xa)
   2.994 +#define HYPERPRIVOP_SET_ITM		(HYPERPRIVOP_START + 0xb)
   2.995 +#define HYPERPRIVOP_THASH		(HYPERPRIVOP_START + 0xc)
   2.996 +#define HYPERPRIVOP_PTC_GA		(HYPERPRIVOP_START + 0xd)
   2.997 +#define HYPERPRIVOP_ITR_D		(HYPERPRIVOP_START + 0xe)
   2.998 +#define HYPERPRIVOP_GET_RR		(HYPERPRIVOP_START + 0xf)
   2.999 +#define HYPERPRIVOP_SET_RR		(HYPERPRIVOP_START + 0x10)
  2.1000 +#define HYPERPRIVOP_SET_KR		(HYPERPRIVOP_START + 0x11)
  2.1001 +#define HYPERPRIVOP_FC			(HYPERPRIVOP_START + 0x12)
  2.1002 +#define HYPERPRIVOP_GET_CPUID		(HYPERPRIVOP_START + 0x13)
  2.1003 +#define HYPERPRIVOP_GET_PMD		(HYPERPRIVOP_START + 0x14)
  2.1004 +#define HYPERPRIVOP_GET_EFLAG		(HYPERPRIVOP_START + 0x15)
  2.1005 +#define HYPERPRIVOP_SET_EFLAG		(HYPERPRIVOP_START + 0x16)
  2.1006 +#define HYPERPRIVOP_RSM_BE		(HYPERPRIVOP_START + 0x17)
  2.1007 +#define HYPERPRIVOP_GET_PSR		(HYPERPRIVOP_START + 0x18)
  2.1008 +#define HYPERPRIVOP_MAX			(0x19)
  2.1009 +
  2.1010 +/* Fast and light hypercalls.  */
  2.1011 +#define __HYPERVISOR_ia64_fast_eoi	__HYPERVISOR_arch_1
  2.1012 +
  2.1013 +/* Xencomm macros.  */
  2.1014 +#define XENCOMM_INLINE_MASK 0xf800000000000000UL
  2.1015 +#define XENCOMM_INLINE_FLAG 0x8000000000000000UL
  2.1016 +
  2.1017 +#define XENCOMM_IS_INLINE(addr) \
  2.1018 +  (((xen_ulong_t)(addr) & XENCOMM_INLINE_MASK) == XENCOMM_INLINE_FLAG)
  2.1019 +#define XENCOMM_INLINE_ADDR(addr) \
  2.1020 +  ((xen_ulong_t)(addr) & ~XENCOMM_INLINE_MASK)
  2.1021 +
  2.1022 +/* xen perfmon */
  2.1023 +#ifdef XEN
  2.1024 +#ifndef __ASSEMBLY__
  2.1025 +#ifndef _ASM_IA64_PERFMON_H
  2.1026 +
  2.1027 +#include <xen/list.h>   // asm/perfmon.h requires struct list_head
  2.1028 +#include <asm/perfmon.h>
  2.1029 +// for PFM_xxx and pfarg_features_t, pfarg_context_t, pfarg_reg_t, pfarg_load_t
  2.1030 +
  2.1031 +#endif /* _ASM_IA64_PERFMON_H */
  2.1032 +
  2.1033 +DEFINE_XEN_GUEST_HANDLE(pfarg_features_t);
  2.1034 +DEFINE_XEN_GUEST_HANDLE(pfarg_context_t);
  2.1035 +DEFINE_XEN_GUEST_HANDLE(pfarg_reg_t);
  2.1036 +DEFINE_XEN_GUEST_HANDLE(pfarg_load_t);
  2.1037 +#endif /* __ASSEMBLY__ */
  2.1038 +#endif /* XEN */
  2.1039 +
  2.1040 +#endif /* __HYPERVISOR_IF_IA64_H__ */
  2.1041 +
  2.1042 +/*
  2.1043 + * Local variables:
  2.1044 + * mode: C
  2.1045 + * c-set-style: "BSD"
  2.1046 + * c-basic-offset: 4
  2.1047 + * tab-width: 4
  2.1048 + * indent-tabs-mode: nil
  2.1049 + * End:
  2.1050 + */
  2.1051 \ No newline at end of file
     3.1 --- a/xenenum/xenenum.c	Wed Feb 20 17:14:14 2008 +1100
     3.2 +++ b/xenenum/xenenum.c	Thu Feb 21 20:48:46 2008 +1100
     3.3 @@ -119,8 +119,10 @@ XenEnum_AddDevice(WDFDRIVER Driver, PWDF
     3.4    }
     3.5  
     3.6    xedd = GetDeviceData(Device);
     3.7 -  
     3.8 +
     3.9 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
    3.10    KeInitializeGuardedMutex(&xedd->WatchHandlerMutex);
    3.11 +#endif
    3.12  
    3.13    xedd->Pdo = Pdo;
    3.14  
    3.15 @@ -308,13 +310,18 @@ XenEnum_WatchHandler(char *Path, PVOID D
    3.16    WDF_CHILD_LIST_ITERATOR ChildIterator;
    3.17    WDFDEVICE ChildDevice;
    3.18    PXENPCI_XEN_DEVICE_DATA ChildDeviceData;
    3.19 +// we only use this if we have guarded mutexes available
    3.20 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
    3.21    PXENENUM_DEVICE_DATA xedd = GetDeviceData(Device);
    3.22 +#endif
    3.23  
    3.24    UNREFERENCED_PARAMETER(Data);  
    3.25  
    3.26    KdPrint((__DRIVER_NAME " --> WatchHandler\n"));
    3.27  
    3.28 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
    3.29    KeAcquireGuardedMutex(&xedd->WatchHandlerMutex);
    3.30 +#endif
    3.31  
    3.32    KdPrint((__DRIVER_NAME "     Path = %s\n", Path));
    3.33  
    3.34 @@ -363,7 +370,9 @@ XenEnum_WatchHandler(char *Path, PVOID D
    3.35    }
    3.36    FreeSplitString(Bits, Count);
    3.37  
    3.38 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
    3.39    KeReleaseGuardedMutex(&xedd->WatchHandlerMutex);
    3.40 +#endif
    3.41  
    3.42    KdPrint((__DRIVER_NAME " <-- WatchHandler\n"));  
    3.43  
     4.1 --- a/xenpci/xenpci.c	Wed Feb 20 17:14:14 2008 +1100
     4.2 +++ b/xenpci/xenpci.c	Thu Feb 21 20:48:46 2008 +1100
     4.3 @@ -311,7 +311,9 @@ XenPCI_AddDevice(
     4.4      KdPrint((__DRIVER_NAME "     XenHide loaded and GPLPV specified\n", Status));
     4.5    }
     4.6  
     4.7 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
     4.8    KeInitializeGuardedMutex(&xpdd->WatchHandlerMutex);
     4.9 +#endif
    4.10    busInfo.BusTypeGuid = GUID_XENPCI_DEVCLASS;
    4.11    busInfo.LegacyBusType = Internal;
    4.12    busInfo.BusNumber = 0;
    4.13 @@ -788,11 +790,15 @@ XenPCI_XenBusWatchHandler(char *Path, PV
    4.14    WDFDEVICE ChildDevice;
    4.15    PXENPCI_XEN_DEVICE_DATA ChildDeviceData;
    4.16    XENPCI_IDENTIFICATION_DESCRIPTION description;
    4.17 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
    4.18    PXENPCI_DEVICE_DATA xpdd = GetDeviceData(Device);
    4.19 +#endif
    4.20  
    4.21    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    4.22  
    4.23 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
    4.24    KeAcquireGuardedMutex(&xpdd->WatchHandlerMutex);
    4.25 +#endif
    4.26  
    4.27    KdPrint((__DRIVER_NAME "     Path = %s\n", Path));
    4.28  
    4.29 @@ -833,8 +839,10 @@ XenPCI_XenBusWatchHandler(char *Path, PV
    4.30    }
    4.31    FreeSplitString(Bits, Count);
    4.32  
    4.33 +#if (NTDDI_VERSION >= NTDDI_WS03SP1)
    4.34    KeReleaseGuardedMutex(&xpdd->WatchHandlerMutex);
    4.35 -  
    4.36 +#endif
    4.37 +
    4.38    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    4.39  }
    4.40  
     5.1 --- a/xenscsi/xenscsi.c	Wed Feb 20 17:14:14 2008 +1100
     5.2 +++ b/xenscsi/xenscsi.c	Thu Feb 21 20:48:46 2008 +1100
     5.3 @@ -60,8 +60,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
     5.4    HwInitializationData.MapBuffers = TRUE;
     5.5    HwInitializationData.NeedPhysicalAddresses = FALSE;
     5.6    HwInitializationData.TaggedQueuing = TRUE;
     5.7 -  HwInitializationData.AutoRequestSense = FALSE;
     5.8 -  HwInitializationData.MultipleRequestPerLu = TRUE;
     5.9 +  HwInitializationData.AutoRequestSense = TRUE;
    5.10 +  HwInitializationData.MultipleRequestPerLu = FALSE;
    5.11    HwInitializationData.ReceiveEvent = FALSE;
    5.12    HwInitializationData.VendorIdLength = 0;
    5.13    HwInitializationData.VendorId = NULL;
    5.14 @@ -135,19 +135,25 @@ XenScsi_HwScsiInterruptTarget(PVOID Devi
    5.15      {
    5.16        rep = RING_GET_RESPONSE(&TargetData->Ring, i);
    5.17        Srb = TargetData->shadow[rep->rqid].Srb;
    5.18 +      Srb->ScsiStatus = rep->rslt;
    5.19        if (!rep->rslt)
    5.20          Srb->SrbStatus = SRB_STATUS_SUCCESS;
    5.21        else
    5.22        {
    5.23 -// copy sense info here
    5.24 -        KdPrint((__DRIVER_NAME "     Xen Operation returned error\n"));
    5.25 +        KdPrint((__DRIVER_NAME "     Xen Operation returned error (result = 0x%08x)\n", rep->rslt));
    5.26          Srb->SrbStatus = SRB_STATUS_ERROR;
    5.27 +        if (rep->sense_len > 0 && rep->sense_len <= Srb->SenseInfoBufferLength && !(Srb->SrbFlags & SRB_FLAGS_DISABLE_AUTOSENSE) && Srb->SenseInfoBuffer != NULL)
    5.28 +        {
    5.29 +          Srb->SrbStatus |= SRB_STATUS_AUTOSENSE_VALID;
    5.30 +          memcpy(Srb->SenseInfoBuffer, rep->sense_buffer, rep->sense_len);
    5.31 +        }
    5.32        }
    5.33        if (Srb->SrbFlags & SRB_FLAGS_DATA_IN)
    5.34          memcpy(Srb->DataBuffer, TargetData->shadow[rep->rqid].Buf, Srb->DataTransferLength);
    5.35  
    5.36        ScsiPortNotification(RequestComplete, DeviceData, Srb);
    5.37        ScsiPortNotification(NextLuRequest, DeviceData, Srb->PathId, Srb->TargetId, Srb->Lun);
    5.38 +//      ScsiPortNotification(NextRequest, DeviceData);
    5.39  
    5.40        ADD_ID_TO_FREELIST(TargetData, rep->rqid);
    5.41      }
    5.42 @@ -646,6 +652,7 @@ XenScsi_PutSrbOnRing(PXENSCSI_TARGET_DAT
    5.43    int i;
    5.44    vscsiif_shadow_t *shadow;
    5.45    uint16_t id;
    5.46 +  int remaining;
    5.47  
    5.48    //KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    5.49  
    5.50 @@ -665,29 +672,41 @@ XenScsi_PutSrbOnRing(PXENSCSI_TARGET_DAT
    5.51    shadow->Srb = Srb;
    5.52    shadow->req.rqid = id;
    5.53    shadow->req.cmd = VSCSIIF_CMND_SCSI;
    5.54 +  memset(shadow->req.cmnd, 0, VSCSIIF_MAX_COMMAND_SIZE);
    5.55    memcpy(shadow->req.cmnd, Srb->Cdb, 16);
    5.56    shadow->req.cmd_len = Srb->CdbLength;
    5.57    shadow->req.id = TargetData->id;
    5.58    shadow->req.lun = TargetData->lun;
    5.59    shadow->req.channel = TargetData->channel;
    5.60 -  if ((Srb->SrbFlags & SRB_FLAGS_DATA_IN) && (Srb->SrbFlags & SRB_FLAGS_DATA_OUT))
    5.61 +  if (Srb->DataTransferLength && (Srb->SrbFlags & SRB_FLAGS_DATA_IN) && (Srb->SrbFlags & SRB_FLAGS_DATA_OUT))
    5.62      shadow->req.sc_data_direction = DMA_BIDIRECTIONAL;
    5.63 -  else if (Srb->SrbFlags & SRB_FLAGS_DATA_IN)
    5.64 +  else if (Srb->DataTransferLength && (Srb->SrbFlags & SRB_FLAGS_DATA_IN))
    5.65      shadow->req.sc_data_direction = DMA_FROM_DEVICE;
    5.66 -  else if (Srb->SrbFlags & SRB_FLAGS_DATA_OUT)
    5.67 +  else if (Srb->DataTransferLength && (Srb->SrbFlags & SRB_FLAGS_DATA_OUT))
    5.68      shadow->req.sc_data_direction = DMA_TO_DEVICE;
    5.69    else
    5.70      shadow->req.sc_data_direction = DMA_NONE;
    5.71 -  shadow->req.use_sg = (UINT8)((Srb->DataTransferLength + PAGE_SIZE - 1) / PAGE_SIZE);
    5.72 +  shadow->req.use_sg = (UINT8)((Srb->DataTransferLength + PAGE_SIZE - 1) >> PAGE_SHIFT);
    5.73    shadow->req.request_bufflen = Srb->DataTransferLength;
    5.74  
    5.75 -  for (i = 0; i < shadow->req.use_sg; i++)
    5.76 +//  KdPrint((__DRIVER_NAME "     pages = %d\n", shadow->req.use_sg));
    5.77 +  remaining = Srb->DataTransferLength;
    5.78 +  shadow->req.seg[0].offset = 0;
    5.79 +  shadow->req.seg[0].length = 0;
    5.80 +  for (i = 0; remaining != 0; i++)
    5.81    {
    5.82 -    shadow->req.seg[i].offset = (uint16_t)i * PAGE_SIZE;
    5.83 -    if (i != shadow->req.use_sg - 1)
    5.84 +    shadow->req.seg[i].offset = 0; // this is the offset into the page
    5.85 +    if (remaining >= PAGE_SIZE)
    5.86 +    {
    5.87        shadow->req.seg[i].length = PAGE_SIZE;
    5.88 +      remaining -= PAGE_SIZE;
    5.89 +    }
    5.90      else
    5.91 -      shadow->req.seg[i].length = (uint16_t)(Srb->DataTransferLength & (PAGE_SIZE - 1));
    5.92 +    {
    5.93 +      shadow->req.seg[i].length = remaining;
    5.94 +      remaining = 0;
    5.95 +    }
    5.96 +//    KdPrint((__DRIVER_NAME "     sg %d: offset = %d, size = %d\n", i, shadow->req.seg[i].offset, shadow->req.seg[i].length));
    5.97    }
    5.98    if (Srb->SrbFlags & SRB_FLAGS_DATA_OUT)
    5.99      memcpy(TargetData->shadow[shadow->req.rqid].Buf, Srb->DataBuffer, Srb->DataTransferLength);
   5.100 @@ -704,8 +723,9 @@ XenScsi_HwScsiStartIo(PVOID DeviceExtens
   5.101    PXENSCSI_DEVICE_DATA DeviceData = (PXENSCSI_DEVICE_DATA)DeviceExtension;
   5.102    PXENSCSI_TARGET_DATA TargetData;
   5.103    int notify;
   5.104 +  int i;
   5.105  
   5.106 -  //KdPrint((__DRIVER_NAME " --> " __FUNCTION__ " PathId = %d, TargetId = %d, Lun = %d\n", Srb->PathId, Srb->TargetId, Srb->Lun));
   5.107 +//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ " PathId = %d, TargetId = %d, Lun = %d\n", Srb->PathId, Srb->TargetId, Srb->Lun));
   5.108  
   5.109    // If we haven't enumerated all the devices yet then just defer the request
   5.110    // A timer will issue a NextRequest to get things started again...
   5.111 @@ -740,6 +760,14 @@ XenScsi_HwScsiStartIo(PVOID DeviceExtens
   5.112    switch (Srb->Function)
   5.113    {
   5.114    case SRB_FUNCTION_EXECUTE_SCSI:
   5.115 +#if 0
   5.116 +    KdPrint((__DRIVER_NAME "     SRB_FUNCTION_EXECUTE_SCSI\n"));
   5.117 +    KdPrint((__DRIVER_NAME "      CdbLength = %d\n", Srb->CdbLength));
   5.118 +    for (i = 0; i < Srb->CdbLength; i++)
   5.119 +      KdPrint((__DRIVER_NAME "      %02x: %02x\n", i, Srb->Cdb[i]));
   5.120 +    KdPrint((__DRIVER_NAME "      SrbFlags = 0x%02x\n", Srb->SrbFlags));
   5.121 +    KdPrint((__DRIVER_NAME "      DataTransferLength = %d\n", Srb->DataTransferLength));
   5.122 +#endif
   5.123      XenScsi_PutSrbOnRing(TargetData, Srb);
   5.124      RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&TargetData->Ring, notify);
   5.125      if (notify)