win-pvdrivers

view xenhide/xenhide.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 d47d595b0b19
children b7863ede7a37
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2007 James Harper
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
20 #if !defined(_XENHIDE_H_)
21 #define _XENHIDE_H_
23 #define __attribute__(arg) /* empty */
24 #define EISCONN 127
26 #include <ntddk.h>
27 #include <wdm.h>
28 #include <wdf.h>
29 #include <initguid.h>
30 #include <wdmguid.h>
31 #include <errno.h>
33 #define NTSTRSAFE_LIB
34 #include <ntstrsafe.h>
36 #include <xen_windows.h>
38 #include <memory.h>
39 #include <grant_table.h>
40 #include <event_channel.h>
41 #include <hvm/params.h>
42 #include <hvm/hvm_op.h>
44 //{C828ABE9-14CA-4445-BAA6-82C2376C6518}
45 //DEFINE_GUID( GUID_XENPCI_DEVCLASS, 0xC828ABE9, 0x14CA, 0x4445, 0xBA, 0xA6, 0x82, 0xC2, 0x37, 0x6C, 0x65, 0x18);
47 #define __DRIVER_NAME "XenHide"
48 #define XENHIDE_POOL_TAG (ULONG) 'XenH'
49 //#define XENHIDE_FDO_INSTANCE_SIGNATURE (ULONG) 'XENP'
51 #define NR_RESERVED_ENTRIES 8
52 #define NR_GRANT_FRAMES 4
53 #define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
55 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
57 extern char *hypercall_stubs;
59 typedef struct _XENHIDE_IDENTIFICATION_DESCRIPTION
60 {
61 WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Header;
62 UNICODE_STRING DeviceType;
63 // ULONG DeviceIndex;
64 char Path[128];
65 } XENHIDE_IDENTIFICATION_DESCRIPTION, *PXENHIDE_IDENTIFICATION_DESCRIPTION;
68 typedef struct {
69 WDFQUEUE IoDefaultQueue;
71 // Resources
72 //WDFINTERRUPT Interrupt;
73 //PULONG PhysAddress;
75 //ULONG platform_mmio_addr;
76 //ULONG platform_mmio_len;
77 //ULONG platform_mmio_alloc;
79 //ULONG shared_info_frame;
80 //char *hypercall_stubs;
82 //PULONG IoBaseAddress;
83 //ULONG IoRange;
85 // Grant Table stuff
87 //grant_entry_t *gnttab_table;
88 //grant_ref_t gnttab_list[NR_GRANT_ENTRIES];
90 } XENHIDE_DEVICE_DATA, *PXENHIDE_DEVICE_DATA;
92 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENHIDE_DEVICE_DATA, GetDeviceData);
94 typedef unsigned long xenbus_transaction_t;
95 typedef uint32_t XENSTORE_RING_IDX;
97 #define XBT_NIL ((xenbus_transaction_t)0)
99 #include <evtchn_public.h>
100 #include <xenbus_public.h>
101 #include <xen_public.h>
102 #include <gnttbl_public.h>
105 #endif