blob: 0c34570b6370e11abbff4381779818003e903e0d [file] [log] [blame]
sewardj35130ac2015-09-01 13:32:21 +00001/*
2 This file is part of Valgrind, a dynamic binary instrumentation
3 framework.
4
Elliott Hughesed398002017-06-21 14:41:24 -07005 Copyright (C) 2012-2017 Citrix
sewardj35130ac2015-09-01 13:32:21 +00006
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307, USA.
21
22 The GNU General Public License is contained in the file COPYING.
23*/
24
25/* Contributed by Andrew Cooper <andrew.cooper3@citrix.com>
26 and Ian Campbell <ian.campbell@citrix.com> */
27
bart51e61da2012-10-23 18:03:28 +000028#ifndef __VKI_XEN_HVM_H
29#define __VKI_XEN_HVM_H
30
31/* Get/set subcommands: extra argument == pointer to xen_hvm_param struct. */
32#define VKI_XEN_HVMOP_set_param 0
33#define VKI_XEN_HVMOP_get_param 1
34struct vki_xen_hvm_param {
35 vki_xen_domid_t domid; /* IN */
36 vki_uint32_t index; /* IN */
37 vki_uint64_t value; /* IN/OUT */
38};
39
bartf38a8f02015-06-28 16:44:21 +000040#define VKI_XEN_HVMOP_set_pci_intx_level 2
41struct vki_xen_hvm_set_pci_intx_level {
42 vki_xen_domid_t domid;
43 vki_uint8_t domain, bus, device, intx;
44 vki_uint8_t level;
45};
46typedef struct vki_xen_hvm_set_pci_intx_level vki_xen_hvm_set_pci_intx_level_t;
47
barta5f81a02014-05-01 08:04:42 +000048#define VKI_XEN_HVMOP_set_isa_irq_level 3
49struct vki_xen_hvm_set_isa_irq_level {
50 vki_xen_domid_t domid;
51 vki_uint8_t isa_irq;
52 vki_uint8_t level;
53};
54typedef struct vki_xen_hvm_set_isa_irq_level vki_xen_hvm_set_isa_irq_level_t;
55
bart2c280712014-05-01 08:05:06 +000056#define VKI_XEN_HVMOP_set_pci_link_route 4
57struct vki_xen_hvm_set_pci_link_route {
58 vki_xen_domid_t domid;
59 vki_uint8_t link;
60 vki_uint8_t isa_irq;
61};
62typedef struct vki_xen_hvm_set_pci_link_route vki_xen_hvm_set_pci_link_route_t;
63
bartd1388da2015-06-28 16:43:14 +000064#define VKI_XEN_HVMOP_track_dirty_vram 6
65struct vki_xen_hvm_track_dirty_vram {
66 vki_xen_domid_t domid; /* IN */
67 vki_xen_uint64_aligned_t first_pfn; /* IN */
68 vki_xen_uint64_aligned_t nr; /* IN */
69 VKI_XEN_GUEST_HANDLE_64(vki_uint8) dirty_bitmap; /* OUT */
70};
71typedef struct vki_xen_hvm_track_dirty_vram vki_xen_hvm_track_dirty_vram_t;
72
bart65056672014-05-01 08:05:24 +000073#define VKI_XEN_HVMOP_set_mem_type 8
74struct vki_xen_hvm_set_mem_type {
75 vki_xen_domid_t domid;
76 vki_uint16_t hvmmem_type;
77 vki_uint32_t nr;
sewardj9e4ec3a2014-09-04 10:59:50 +000078 vki_uint64_t first_pfn;
bart65056672014-05-01 08:05:24 +000079};
80typedef struct vki_xen_hvm_set_mem_type vki_xen_hvm_set_mem_type_t;
81
sewardj9e4ec3a2014-09-04 10:59:50 +000082#define VKI_XEN_HVMOP_set_mem_access 12
83struct vki_xen_hvm_set_mem_access {
84 vki_xen_domid_t domid;
85 vki_uint16_t hvmmem_access;
86 vki_uint32_t nr;
87 vki_uint64_t first_pfn;
88};
89typedef struct vki_xen_hvm_set_mem_access vki_xen_hvm_set_mem_access_t;
90
91#define VKI_XEN_HVMOP_get_mem_access 13
92struct vki_xen_hvm_get_mem_access {
93 vki_xen_domid_t domid;
94 vki_uint16_t hvmmem_access; /* OUT */
95 vki_uint64_t pfn;
96};
97typedef struct vki_xen_hvm_get_mem_access vki_xen_hvm_get_mem_access_t;
98
99#define VKI_XEN_HVMOP_inject_trap 14
100struct vki_xen_hvm_inject_trap {
101 vki_xen_domid_t domid;
102 vki_uint32_t vcpuid;
103 vki_uint32_t vector;
104 vki_uint32_t type;
105 vki_uint32_t error_code;
106 vki_uint32_t insn_len;
107 vki_uint64_t cr2;
108};
109typedef struct vki_xen_hvm_inject_trap vki_xen_hvm_inject_trap_t;
110
bart51e61da2012-10-23 18:03:28 +0000111#endif // __VKI_XEN_HVM_H
112
113/*--------------------------------------------------------------------*/
114/*--- end ---*/
115/*--------------------------------------------------------------------*/