win-pvdrivers

diff common/include/public/dom0_ops.h @ 12:5712dede5a1b

add in xen public includes, so the extra step of copying them over is not needed
author Andy Grover <andy@groveronline.com>
date Wed Nov 28 14:44:10 2007 -0800 (2007-11-28)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/common/include/public/dom0_ops.h	Wed Nov 28 14:44:10 2007 -0800
     1.3 @@ -0,0 +1,120 @@
     1.4 +/******************************************************************************
     1.5 + * dom0_ops.h
     1.6 + * 
     1.7 + * Process command requests from domain-0 guest OS.
     1.8 + * 
     1.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    1.10 + * of this software and associated documentation files (the "Software"), to
    1.11 + * deal in the Software without restriction, including without limitation the
    1.12 + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    1.13 + * sell copies of the Software, and to permit persons to whom the Software is
    1.14 + * furnished to do so, subject to the following conditions:
    1.15 + *
    1.16 + * The above copyright notice and this permission notice shall be included in
    1.17 + * all copies or substantial portions of the Software.
    1.18 + *
    1.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    1.22 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    1.24 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    1.25 + * DEALINGS IN THE SOFTWARE.
    1.26 + *
    1.27 + * Copyright (c) 2002-2003, B Dragovic
    1.28 + * Copyright (c) 2002-2006, K Fraser
    1.29 + */
    1.30 +
    1.31 +#ifndef __XEN_PUBLIC_DOM0_OPS_H__
    1.32 +#define __XEN_PUBLIC_DOM0_OPS_H__
    1.33 +
    1.34 +#include "xen.h"
    1.35 +#include "platform.h"
    1.36 +
    1.37 +#if __XEN_INTERFACE_VERSION__ >= 0x00030204
    1.38 +#error "dom0_ops.h is a compatibility interface only"
    1.39 +#endif
    1.40 +
    1.41 +#define DOM0_INTERFACE_VERSION XENPF_INTERFACE_VERSION
    1.42 +
    1.43 +#define DOM0_SETTIME          XENPF_settime
    1.44 +#define dom0_settime          xenpf_settime
    1.45 +#define dom0_settime_t        xenpf_settime_t
    1.46 +
    1.47 +#define DOM0_ADD_MEMTYPE      XENPF_add_memtype
    1.48 +#define dom0_add_memtype      xenpf_add_memtype
    1.49 +#define dom0_add_memtype_t    xenpf_add_memtype_t
    1.50 +
    1.51 +#define DOM0_DEL_MEMTYPE      XENPF_del_memtype
    1.52 +#define dom0_del_memtype      xenpf_del_memtype
    1.53 +#define dom0_del_memtype_t    xenpf_del_memtype_t
    1.54 +
    1.55 +#define DOM0_READ_MEMTYPE     XENPF_read_memtype
    1.56 +#define dom0_read_memtype     xenpf_read_memtype
    1.57 +#define dom0_read_memtype_t   xenpf_read_memtype_t
    1.58 +
    1.59 +#define DOM0_MICROCODE        XENPF_microcode_update
    1.60 +#define dom0_microcode        xenpf_microcode_update
    1.61 +#define dom0_microcode_t      xenpf_microcode_update_t
    1.62 +
    1.63 +#define DOM0_PLATFORM_QUIRK   XENPF_platform_quirk
    1.64 +#define dom0_platform_quirk   xenpf_platform_quirk
    1.65 +#define dom0_platform_quirk_t xenpf_platform_quirk_t
    1.66 +
    1.67 +typedef uint64_t cpumap_t;
    1.68 +
    1.69 +/* Unsupported legacy operation -- defined for API compatibility. */
    1.70 +#define DOM0_MSR                 15
    1.71 +struct dom0_msr {
    1.72 +    /* IN variables. */
    1.73 +    uint32_t write;
    1.74 +    cpumap_t cpu_mask;
    1.75 +    uint32_t msr;
    1.76 +    uint32_t in1;
    1.77 +    uint32_t in2;
    1.78 +    /* OUT variables. */
    1.79 +    uint32_t out1;
    1.80 +    uint32_t out2;
    1.81 +};
    1.82 +typedef struct dom0_msr dom0_msr_t;
    1.83 +DEFINE_XEN_GUEST_HANDLE(dom0_msr_t);
    1.84 +
    1.85 +/* Unsupported legacy operation -- defined for API compatibility. */
    1.86 +#define DOM0_PHYSICAL_MEMORY_MAP 40
    1.87 +struct dom0_memory_map_entry {
    1.88 +    uint64_t start, end;
    1.89 +    uint32_t flags; /* reserved */
    1.90 +    uint8_t  is_ram;
    1.91 +};
    1.92 +typedef struct dom0_memory_map_entry dom0_memory_map_entry_t;
    1.93 +DEFINE_XEN_GUEST_HANDLE(dom0_memory_map_entry_t);
    1.94 +
    1.95 +struct dom0_op {
    1.96 +    uint32_t cmd;
    1.97 +    uint32_t interface_version; /* DOM0_INTERFACE_VERSION */
    1.98 +    union {
    1.99 +        struct dom0_msr               msr;
   1.100 +        struct dom0_settime           settime;
   1.101 +        struct dom0_add_memtype       add_memtype;
   1.102 +        struct dom0_del_memtype       del_memtype;
   1.103 +        struct dom0_read_memtype      read_memtype;
   1.104 +        struct dom0_microcode         microcode;
   1.105 +        struct dom0_platform_quirk    platform_quirk;
   1.106 +        struct dom0_memory_map_entry  physical_memory_map;
   1.107 +        uint8_t                       pad[128];
   1.108 +    } u;
   1.109 +};
   1.110 +typedef struct dom0_op dom0_op_t;
   1.111 +DEFINE_XEN_GUEST_HANDLE(dom0_op_t);
   1.112 +
   1.113 +#endif /* __XEN_PUBLIC_DOM0_OPS_H__ */
   1.114 +
   1.115 +/*
   1.116 + * Local variables:
   1.117 + * mode: C
   1.118 + * c-set-style: "BSD"
   1.119 + * c-basic-offset: 4
   1.120 + * tab-width: 4
   1.121 + * indent-tabs-mode: nil
   1.122 + * End:
   1.123 + */