blob: 03d7af5f0f6f2ad9ccab9d95d0ea2a76fdce6db2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
/******************************************************************************
* domain_page.h
*
* Allow temporary mapping of domain page frames into Xen space.
*
* Copyright (c) 2003-2006, Keir Fraser <keir@xensource.com>
*/
#ifndef __XEN_DOMAIN_PAGE_H__
#define __XEN_DOMAIN_PAGE_H__
#include <xen/config.h>
#include <xen/mm.h>
#ifdef CONFIG_DOMAIN_PAGE
/*
* Map a given page frame, returning the mapped virtual address. The page is
* then accessible within the current VCPU until a corresponding unmap call.
*/
extern void *map_domain_page(unsigned long pfn);
/*
* Pass a VA within a page previously mapped in the context of the
* currently-executing VCPU via a call to map_domain_pages().
*/
extern void unmap_domain_page(void *va);
/*
* Similar to the above calls, except the mapping is accessible in all
* address spaces (not just within the VCPU that created the mapping). Global
* mappings can also be unmapped from any context.
*/
extern void *map_domain_page_global(unsigned long pfn);
extern void unmap_domain_page_global(void *va);
#define DMCACHE_ENTRY_VALID 1U
#define DMCACHE_ENTRY_HELD 2U
struct domain_mmap_cache {
unsigned long pfn;
void *va;
|