blob: 88f36c6595f09ae9812039aefa0405ff333e2f57 (
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
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* asm-x86/pv/grant_table.h
*
* Grant table interfaces for PV guests
*
* Copyright (C) 2017 Wei Liu <wei.liu2@citrix.com>
*/
#ifndef __X86_PV_GRANT_TABLE_H__
#define __X86_PV_GRANT_TABLE_H__
#ifdef CONFIG_PV
int create_grant_pv_mapping(uint64_t addr, mfn_t frame,
unsigned int flags, unsigned int cache_flags);
int replace_grant_pv_mapping(uint64_t addr, mfn_t frame,
uint64_t new_addr, unsigned int flags);
#else
#include <public/grant_table.h>
static inline int create_grant_pv_mapping(uint64_t addr, mfn_t frame,
unsigned int flags,
unsigned int cache_flags)
{
return GNTST_general_error;
}
static inline int replace_grant_pv_mapping(uint64_t addr, mfn_t frame,
uint64_t new_addr, unsigned int flags)
{
return GNTST_general_error;
}
#endif
#endif /* __X86_PV_GRANT_TABLE_H__ */
/*
* Local variables:
* mode: C
* c-file-style: "BSD"
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: nil
* End:
*/
|