xref: /onnv-gate/usr/src/uts/common/xen/public/features.h (revision 11120:fe619717975a)
15084Sjohnlev /******************************************************************************
25084Sjohnlev  * features.h
35084Sjohnlev  *
45084Sjohnlev  * Feature flags, reported by XENVER_get_features.
55084Sjohnlev  *
65084Sjohnlev  * Permission is hereby granted, free of charge, to any person obtaining a copy
75084Sjohnlev  * of this software and associated documentation files (the "Software"), to
85084Sjohnlev  * deal in the Software without restriction, including without limitation the
95084Sjohnlev  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
105084Sjohnlev  * sell copies of the Software, and to permit persons to whom the Software is
115084Sjohnlev  * furnished to do so, subject to the following conditions:
125084Sjohnlev  *
135084Sjohnlev  * The above copyright notice and this permission notice shall be included in
145084Sjohnlev  * all copies or substantial portions of the Software.
155084Sjohnlev  *
165084Sjohnlev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
175084Sjohnlev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
185084Sjohnlev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
195084Sjohnlev  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
205084Sjohnlev  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
215084Sjohnlev  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
225084Sjohnlev  * DEALINGS IN THE SOFTWARE.
235084Sjohnlev  *
245084Sjohnlev  * Copyright (c) 2006, Keir Fraser <keir@xensource.com>
255084Sjohnlev  */
265084Sjohnlev 
275084Sjohnlev #ifndef __XEN_PUBLIC_FEATURES_H__
285084Sjohnlev #define __XEN_PUBLIC_FEATURES_H__
295084Sjohnlev 
305084Sjohnlev /*
315084Sjohnlev  * If set, the guest does not need to write-protect its pagetables, and can
325084Sjohnlev  * update them via direct writes.
335084Sjohnlev  */
345084Sjohnlev #define XENFEAT_writable_page_tables       0
355084Sjohnlev 
365084Sjohnlev /*
375084Sjohnlev  * If set, the guest does not need to write-protect its segment descriptor
385084Sjohnlev  * tables, and can update them via direct writes.
395084Sjohnlev  */
405084Sjohnlev #define XENFEAT_writable_descriptor_tables 1
415084Sjohnlev 
425084Sjohnlev /*
435084Sjohnlev  * If set, translation between the guest's 'pseudo-physical' address space
445084Sjohnlev  * and the host's machine address space are handled by the hypervisor. In this
455084Sjohnlev  * mode the guest does not need to perform phys-to/from-machine translations
465084Sjohnlev  * when performing page table operations.
475084Sjohnlev  */
485084Sjohnlev #define XENFEAT_auto_translated_physmap    2
495084Sjohnlev 
505084Sjohnlev /* If set, the guest is running in supervisor mode (e.g., x86 ring 0). */
515084Sjohnlev #define XENFEAT_supervisor_mode_kernel     3
525084Sjohnlev 
535084Sjohnlev /*
545084Sjohnlev  * If set, the guest does not need to allocate x86 PAE page directories
555084Sjohnlev  * below 4GB. This flag is usually implied by auto_translated_physmap.
565084Sjohnlev  */
575084Sjohnlev #define XENFEAT_pae_pgdir_above_4gb        4
585084Sjohnlev 
5910175SStuart.Maybee@Sun.COM /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
6010175SStuart.Maybee@Sun.COM #define XENFEAT_mmu_pt_update_preserve_ad  5
6110175SStuart.Maybee@Sun.COM 
62*11120SMark.Johnson@Sun.COM /* x86: Does this Xen host support the MMU_{CLEAR,COPY}_PAGE hypercall? */
63*11120SMark.Johnson@Sun.COM #define XENFEAT_highmem_assist             6
64*11120SMark.Johnson@Sun.COM 
6510175SStuart.Maybee@Sun.COM /*
6610175SStuart.Maybee@Sun.COM  * If set, GNTTABOP_map_grant_ref honors flags to be placed into guest kernel
6710175SStuart.Maybee@Sun.COM  * available pte bits.
6810175SStuart.Maybee@Sun.COM  */
6910175SStuart.Maybee@Sun.COM #define XENFEAT_gnttab_map_avail_bits      7
7010175SStuart.Maybee@Sun.COM 
715084Sjohnlev #define XENFEAT_NR_SUBMAPS 1
725084Sjohnlev 
735084Sjohnlev #endif /* __XEN_PUBLIC_FEATURES_H__ */
745084Sjohnlev 
755084Sjohnlev /*
765084Sjohnlev  * Local variables:
775084Sjohnlev  * mode: C
785084Sjohnlev  * c-set-style: "BSD"
795084Sjohnlev  * c-basic-offset: 4
805084Sjohnlev  * tab-width: 4
815084Sjohnlev  * indent-tabs-mode: nil
825084Sjohnlev  * End:
835084Sjohnlev  */
84