162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */ 262306a36Sopenharmony_ci/****************************************************************************** 362306a36Sopenharmony_ci * features.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Feature flags, reported by XENVER_get_features. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Copyright (c) 2006, Keir Fraser <keir@xensource.com> 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#ifndef __XEN_PUBLIC_FEATURES_H__ 1162306a36Sopenharmony_ci#define __XEN_PUBLIC_FEATURES_H__ 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* 1462306a36Sopenharmony_ci * If set, the guest does not need to write-protect its pagetables, and can 1562306a36Sopenharmony_ci * update them via direct writes. 1662306a36Sopenharmony_ci */ 1762306a36Sopenharmony_ci#define XENFEAT_writable_page_tables 0 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * If set, the guest does not need to write-protect its segment descriptor 2162306a36Sopenharmony_ci * tables, and can update them via direct writes. 2262306a36Sopenharmony_ci */ 2362306a36Sopenharmony_ci#define XENFEAT_writable_descriptor_tables 1 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci/* 2662306a36Sopenharmony_ci * If set, translation between the guest's 'pseudo-physical' address space 2762306a36Sopenharmony_ci * and the host's machine address space are handled by the hypervisor. In this 2862306a36Sopenharmony_ci * mode the guest does not need to perform phys-to/from-machine translations 2962306a36Sopenharmony_ci * when performing page table operations. 3062306a36Sopenharmony_ci */ 3162306a36Sopenharmony_ci#define XENFEAT_auto_translated_physmap 2 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci/* If set, the guest is running in supervisor mode (e.g., x86 ring 0). */ 3462306a36Sopenharmony_ci#define XENFEAT_supervisor_mode_kernel 3 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci/* 3762306a36Sopenharmony_ci * If set, the guest does not need to allocate x86 PAE page directories 3862306a36Sopenharmony_ci * below 4GB. This flag is usually implied by auto_translated_physmap. 3962306a36Sopenharmony_ci */ 4062306a36Sopenharmony_ci#define XENFEAT_pae_pgdir_above_4gb 4 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci/* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */ 4362306a36Sopenharmony_ci#define XENFEAT_mmu_pt_update_preserve_ad 5 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci/* x86: Does this Xen host support the MMU_{CLEAR,COPY}_PAGE hypercall? */ 4662306a36Sopenharmony_ci#define XENFEAT_highmem_assist 6 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci/* 4962306a36Sopenharmony_ci * If set, GNTTABOP_map_grant_ref honors flags to be placed into guest kernel 5062306a36Sopenharmony_ci * available pte bits. 5162306a36Sopenharmony_ci */ 5262306a36Sopenharmony_ci#define XENFEAT_gnttab_map_avail_bits 7 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci/* x86: Does this Xen host support the HVM callback vector type? */ 5562306a36Sopenharmony_ci#define XENFEAT_hvm_callback_vector 8 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci/* x86: pvclock algorithm is safe to use on HVM */ 5862306a36Sopenharmony_ci#define XENFEAT_hvm_safe_pvclock 9 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci/* x86: pirq can be used by HVM guests */ 6162306a36Sopenharmony_ci#define XENFEAT_hvm_pirqs 10 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci/* operation as Dom0 is supported */ 6462306a36Sopenharmony_ci#define XENFEAT_dom0 11 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci/* Xen also maps grant references at pfn = mfn. 6762306a36Sopenharmony_ci * This feature flag is deprecated and should not be used. 6862306a36Sopenharmony_ci#define XENFEAT_grant_map_identity 12 6962306a36Sopenharmony_ci */ 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci/* Guest can use XENMEMF_vnode to specify virtual node for memory op. */ 7262306a36Sopenharmony_ci#define XENFEAT_memory_op_vnode_supported 13 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci/* arm: Hypervisor supports ARM SMC calling convention. */ 7562306a36Sopenharmony_ci#define XENFEAT_ARM_SMCCC_supported 14 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci/* 7862306a36Sopenharmony_ci * x86/PVH: If set, ACPI RSDP can be placed at any address. Otherwise RSDP 7962306a36Sopenharmony_ci * must be located in lower 1MB, as required by ACPI Specification for IA-PC 8062306a36Sopenharmony_ci * systems. 8162306a36Sopenharmony_ci * This feature flag is only consulted if XEN_ELFNOTE_GUEST_OS contains 8262306a36Sopenharmony_ci * the "linux" string. 8362306a36Sopenharmony_ci */ 8462306a36Sopenharmony_ci#define XENFEAT_linux_rsdp_unrestricted 15 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci/* 8762306a36Sopenharmony_ci * A direct-mapped (or 1:1 mapped) domain is a domain for which its 8862306a36Sopenharmony_ci * local pages have gfn == mfn. If a domain is direct-mapped, 8962306a36Sopenharmony_ci * XENFEAT_direct_mapped is set; otherwise XENFEAT_not_direct_mapped 9062306a36Sopenharmony_ci * is set. 9162306a36Sopenharmony_ci * 9262306a36Sopenharmony_ci * If neither flag is set (e.g. older Xen releases) the assumptions are: 9362306a36Sopenharmony_ci * - not auto_translated domains (x86 only) are always direct-mapped 9462306a36Sopenharmony_ci * - on x86, auto_translated domains are not direct-mapped 9562306a36Sopenharmony_ci * - on ARM, Dom0 is direct-mapped, DomUs are not 9662306a36Sopenharmony_ci */ 9762306a36Sopenharmony_ci#define XENFEAT_not_direct_mapped 16 9862306a36Sopenharmony_ci#define XENFEAT_direct_mapped 17 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci#define XENFEAT_NR_SUBMAPS 1 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci#endif /* __XEN_PUBLIC_FEATURES_H__ */ 103