win-pvdrivers

annotate 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
rev   line source
andy@12 1 /******************************************************************************
andy@12 2 * dom0_ops.h
andy@12 3 *
andy@12 4 * Process command requests from domain-0 guest OS.
andy@12 5 *
andy@12 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
andy@12 7 * of this software and associated documentation files (the "Software"), to
andy@12 8 * deal in the Software without restriction, including without limitation the
andy@12 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
andy@12 10 * sell copies of the Software, and to permit persons to whom the Software is
andy@12 11 * furnished to do so, subject to the following conditions:
andy@12 12 *
andy@12 13 * The above copyright notice and this permission notice shall be included in
andy@12 14 * all copies or substantial portions of the Software.
andy@12 15 *
andy@12 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
andy@12 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
andy@12 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
andy@12 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
andy@12 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
andy@12 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
andy@12 22 * DEALINGS IN THE SOFTWARE.
andy@12 23 *
andy@12 24 * Copyright (c) 2002-2003, B Dragovic
andy@12 25 * Copyright (c) 2002-2006, K Fraser
andy@12 26 */
andy@12 27
andy@12 28 #ifndef __XEN_PUBLIC_DOM0_OPS_H__
andy@12 29 #define __XEN_PUBLIC_DOM0_OPS_H__
andy@12 30
andy@12 31 #include "xen.h"
andy@12 32 #include "platform.h"
andy@12 33
andy@12 34 #if __XEN_INTERFACE_VERSION__ >= 0x00030204
andy@12 35 #error "dom0_ops.h is a compatibility interface only"
andy@12 36 #endif
andy@12 37
andy@12 38 #define DOM0_INTERFACE_VERSION XENPF_INTERFACE_VERSION
andy@12 39
andy@12 40 #define DOM0_SETTIME XENPF_settime
andy@12 41 #define dom0_settime xenpf_settime
andy@12 42 #define dom0_settime_t xenpf_settime_t
andy@12 43
andy@12 44 #define DOM0_ADD_MEMTYPE XENPF_add_memtype
andy@12 45 #define dom0_add_memtype xenpf_add_memtype
andy@12 46 #define dom0_add_memtype_t xenpf_add_memtype_t
andy@12 47
andy@12 48 #define DOM0_DEL_MEMTYPE XENPF_del_memtype
andy@12 49 #define dom0_del_memtype xenpf_del_memtype
andy@12 50 #define dom0_del_memtype_t xenpf_del_memtype_t
andy@12 51
andy@12 52 #define DOM0_READ_MEMTYPE XENPF_read_memtype
andy@12 53 #define dom0_read_memtype xenpf_read_memtype
andy@12 54 #define dom0_read_memtype_t xenpf_read_memtype_t
andy@12 55
andy@12 56 #define DOM0_MICROCODE XENPF_microcode_update
andy@12 57 #define dom0_microcode xenpf_microcode_update
andy@12 58 #define dom0_microcode_t xenpf_microcode_update_t
andy@12 59
andy@12 60 #define DOM0_PLATFORM_QUIRK XENPF_platform_quirk
andy@12 61 #define dom0_platform_quirk xenpf_platform_quirk
andy@12 62 #define dom0_platform_quirk_t xenpf_platform_quirk_t
andy@12 63
andy@12 64 typedef uint64_t cpumap_t;
andy@12 65
andy@12 66 /* Unsupported legacy operation -- defined for API compatibility. */
andy@12 67 #define DOM0_MSR 15
andy@12 68 struct dom0_msr {
andy@12 69 /* IN variables. */
andy@12 70 uint32_t write;
andy@12 71 cpumap_t cpu_mask;
andy@12 72 uint32_t msr;
andy@12 73 uint32_t in1;
andy@12 74 uint32_t in2;
andy@12 75 /* OUT variables. */
andy@12 76 uint32_t out1;
andy@12 77 uint32_t out2;
andy@12 78 };
andy@12 79 typedef struct dom0_msr dom0_msr_t;
andy@12 80 DEFINE_XEN_GUEST_HANDLE(dom0_msr_t);
andy@12 81
andy@12 82 /* Unsupported legacy operation -- defined for API compatibility. */
andy@12 83 #define DOM0_PHYSICAL_MEMORY_MAP 40
andy@12 84 struct dom0_memory_map_entry {
andy@12 85 uint64_t start, end;
andy@12 86 uint32_t flags; /* reserved */
andy@12 87 uint8_t is_ram;
andy@12 88 };
andy@12 89 typedef struct dom0_memory_map_entry dom0_memory_map_entry_t;
andy@12 90 DEFINE_XEN_GUEST_HANDLE(dom0_memory_map_entry_t);
andy@12 91
andy@12 92 struct dom0_op {
andy@12 93 uint32_t cmd;
andy@12 94 uint32_t interface_version; /* DOM0_INTERFACE_VERSION */
andy@12 95 union {
andy@12 96 struct dom0_msr msr;
andy@12 97 struct dom0_settime settime;
andy@12 98 struct dom0_add_memtype add_memtype;
andy@12 99 struct dom0_del_memtype del_memtype;
andy@12 100 struct dom0_read_memtype read_memtype;
andy@12 101 struct dom0_microcode microcode;
andy@12 102 struct dom0_platform_quirk platform_quirk;
andy@12 103 struct dom0_memory_map_entry physical_memory_map;
andy@12 104 uint8_t pad[128];
andy@12 105 } u;
andy@12 106 };
andy@12 107 typedef struct dom0_op dom0_op_t;
andy@12 108 DEFINE_XEN_GUEST_HANDLE(dom0_op_t);
andy@12 109
andy@12 110 #endif /* __XEN_PUBLIC_DOM0_OPS_H__ */
andy@12 111
andy@12 112 /*
andy@12 113 * Local variables:
andy@12 114 * mode: C
andy@12 115 * c-set-style: "BSD"
andy@12 116 * c-basic-offset: 4
andy@12 117 * tab-width: 4
andy@12 118 * indent-tabs-mode: nil
andy@12 119 * End:
andy@12 120 */