1843e1988Sjohnlev /******************************************************************************
2843e1988Sjohnlev  * features.h
3*55fea89dSDan Cross  *
4843e1988Sjohnlev  * Feature flags, reported by XENVER_get_features.
5*55fea89dSDan Cross  *
6843e1988Sjohnlev  * Permission is hereby granted, free of charge, to any person obtaining a copy
7843e1988Sjohnlev  * of this software and associated documentation files (the "Software"), to
8843e1988Sjohnlev  * deal in the Software without restriction, including without limitation the
9843e1988Sjohnlev  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10843e1988Sjohnlev  * sell copies of the Software, and to permit persons to whom the Software is
11843e1988Sjohnlev  * furnished to do so, subject to the following conditions:
12843e1988Sjohnlev  *
13843e1988Sjohnlev  * The above copyright notice and this permission notice shall be included in
14843e1988Sjohnlev  * all copies or substantial portions of the Software.
15843e1988Sjohnlev  *
16843e1988Sjohnlev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17843e1988Sjohnlev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18843e1988Sjohnlev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19843e1988Sjohnlev  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20843e1988Sjohnlev  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21843e1988Sjohnlev  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22843e1988Sjohnlev  * DEALINGS IN THE SOFTWARE.
23843e1988Sjohnlev  *
24843e1988Sjohnlev  * Copyright (c) 2006, Keir Fraser <keir@xensource.com>
25843e1988Sjohnlev  */
26843e1988Sjohnlev 
27843e1988Sjohnlev #ifndef __XEN_PUBLIC_FEATURES_H__
28843e1988Sjohnlev #define __XEN_PUBLIC_FEATURES_H__
29843e1988Sjohnlev 
30843e1988Sjohnlev /*
31843e1988Sjohnlev  * If set, the guest does not need to write-protect its pagetables, and can
32843e1988Sjohnlev  * update them via direct writes.
33843e1988Sjohnlev  */
34843e1988Sjohnlev #define XENFEAT_writable_page_tables       0
35843e1988Sjohnlev 
36843e1988Sjohnlev /*
37843e1988Sjohnlev  * If set, the guest does not need to write-protect its segment descriptor
38843e1988Sjohnlev  * tables, and can update them via direct writes.
39843e1988Sjohnlev  */
40843e1988Sjohnlev #define XENFEAT_writable_descriptor_tables 1
41843e1988Sjohnlev 
42843e1988Sjohnlev /*
43843e1988Sjohnlev  * If set, translation between the guest's 'pseudo-physical' address space
44843e1988Sjohnlev  * and the host's machine address space are handled by the hypervisor. In this
45843e1988Sjohnlev  * mode the guest does not need to perform phys-to/from-machine translations
46843e1988Sjohnlev  * when performing page table operations.
47843e1988Sjohnlev  */
48843e1988Sjohnlev #define XENFEAT_auto_translated_physmap    2
49843e1988Sjohnlev 
50843e1988Sjohnlev /* If set, the guest is running in supervisor mode (e.g., x86 ring 0). */
51843e1988Sjohnlev #define XENFEAT_supervisor_mode_kernel     3
52843e1988Sjohnlev 
53843e1988Sjohnlev /*
54843e1988Sjohnlev  * If set, the guest does not need to allocate x86 PAE page directories
55843e1988Sjohnlev  * below 4GB. This flag is usually implied by auto_translated_physmap.
56843e1988Sjohnlev  */
57843e1988Sjohnlev #define XENFEAT_pae_pgdir_above_4gb        4
58843e1988Sjohnlev 
59349b53ddSStuart Maybee /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
60349b53ddSStuart Maybee #define XENFEAT_mmu_pt_update_preserve_ad  5
61349b53ddSStuart Maybee 
62ad09f8b8SMark Johnson /* x86: Does this Xen host support the MMU_{CLEAR,COPY}_PAGE hypercall? */
63ad09f8b8SMark Johnson #define XENFEAT_highmem_assist             6
64ad09f8b8SMark Johnson 
65349b53ddSStuart Maybee /*
66349b53ddSStuart Maybee  * If set, GNTTABOP_map_grant_ref honors flags to be placed into guest kernel
67349b53ddSStuart Maybee  * available pte bits.
68349b53ddSStuart Maybee  */
69349b53ddSStuart Maybee #define XENFEAT_gnttab_map_avail_bits      7
70349b53ddSStuart Maybee 
71843e1988Sjohnlev #define XENFEAT_NR_SUBMAPS 1
72843e1988Sjohnlev 
73843e1988Sjohnlev #endif /* __XEN_PUBLIC_FEATURES_H__ */
74843e1988Sjohnlev 
75843e1988Sjohnlev /*
76843e1988Sjohnlev  * Local variables:
77843e1988Sjohnlev  * mode: C
78843e1988Sjohnlev  * c-set-style: "BSD"
79843e1988Sjohnlev  * c-basic-offset: 4
80843e1988Sjohnlev  * tab-width: 4
81843e1988Sjohnlev  * indent-tabs-mode: nil
82843e1988Sjohnlev  * End:
83843e1988Sjohnlev  */
84