win-pvdrivers

view xencache/xencache.h @ 1075:5e8aeb18279c

Add export methods to retrieve and set the hypercall stubs for the dump_xenpci driver
author James Harper <james.harper@bendigoit.com.au>
date Mon Dec 09 13:30:14 2013 +1100 (2013-12-09)
parents 2d5fbe07e866
children
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2013 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 #pragma warning(disable: 4127)
22 #pragma warning(disable : 4200) // zero-sized array
24 #if !defined(_XENCACHE_H_)
25 #define _XENCACHE_H_
27 #define __DRIVER_NAME "XenCache"
29 #define XENCACHE_POOL_TAG (ULONG)'XenC'
31 #include <fltkernel.h>
32 #define NTSTRSAFE_LIB
33 #include <ntstrsafe.h>
34 #include <xen_windows.h>
36 typedef struct _pagefile_context_t pagefile_context_t;
37 typedef struct _global_context_t global_context_t;
39 struct _global_context_t {
40 KSPIN_LOCK lock;
41 pagefile_context_t *pagefile_head;
42 ULONGLONG error_count;
43 };
45 struct _pagefile_context_t {
46 pagefile_context_t *next;
47 global_context_t *global;
48 PFILE_OBJECT file_object;
49 LONG pool_id;
51 ULONGLONG put_success_count;
52 ULONGLONG put_fail_count;
53 ULONGLONG get_success_count;
54 ULONGLONG get_fail_count;
55 ULONGLONG error_count;
56 };
58 #endif