linux/arch/x86/include/uapi/asm/kvm_para.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI_ASM_X86_KVM_PARA_H
#define _UAPI_ASM_X86_KVM_PARA_H

#include <linux/types.h>

/* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx.  It
 * should be used to determine that a VM is running under KVM.
 */
#define KVM_CPUID_SIGNATURE
#define KVM_SIGNATURE

/* This CPUID returns two feature bitmaps in eax, edx. Before enabling
 * a particular paravirtualization, the appropriate feature bit should
 * be checked in eax. The performance hint feature bit should be checked
 * in edx.
 */
#define KVM_CPUID_FEATURES
#define KVM_FEATURE_CLOCKSOURCE
#define KVM_FEATURE_NOP_IO_DELAY
#define KVM_FEATURE_MMU_OP
/* This indicates that the new set of kvmclock msrs
 * are available. The use of 0x11 and 0x12 is deprecated
 */
#define KVM_FEATURE_CLOCKSOURCE2
#define KVM_FEATURE_ASYNC_PF
#define KVM_FEATURE_STEAL_TIME
#define KVM_FEATURE_PV_EOI
#define KVM_FEATURE_PV_UNHALT
#define KVM_FEATURE_PV_TLB_FLUSH
#define KVM_FEATURE_ASYNC_PF_VMEXIT
#define KVM_FEATURE_PV_SEND_IPI
#define KVM_FEATURE_POLL_CONTROL
#define KVM_FEATURE_PV_SCHED_YIELD
#define KVM_FEATURE_ASYNC_PF_INT
#define KVM_FEATURE_MSI_EXT_DEST_ID
#define KVM_FEATURE_HC_MAP_GPA_RANGE
#define KVM_FEATURE_MIGRATION_CONTROL

#define KVM_HINTS_REALTIME

/* The last 8 bits are used to indicate how to interpret the flags field
 * in pvclock structure. If no bits are set, all flags are ignored.
 */
#define KVM_FEATURE_CLOCKSOURCE_STABLE_BIT

#define MSR_KVM_WALL_CLOCK
#define MSR_KVM_SYSTEM_TIME

#define KVM_MSR_ENABLED
/* Custom MSRs falls in the range 0x4b564d00-0x4b564dff */
#define MSR_KVM_WALL_CLOCK_NEW
#define MSR_KVM_SYSTEM_TIME_NEW
#define MSR_KVM_ASYNC_PF_EN
#define MSR_KVM_STEAL_TIME
#define MSR_KVM_PV_EOI_EN
#define MSR_KVM_POLL_CONTROL
#define MSR_KVM_ASYNC_PF_INT
#define MSR_KVM_ASYNC_PF_ACK
#define MSR_KVM_MIGRATION_CONTROL

struct kvm_steal_time {};

#define KVM_VCPU_PREEMPTED
#define KVM_VCPU_FLUSH_TLB

#define KVM_CLOCK_PAIRING_WALLCLOCK
struct kvm_clock_pairing {};

#define KVM_STEAL_ALIGNMENT_BITS
#define KVM_STEAL_VALID_BITS
#define KVM_STEAL_RESERVED_MASK

#define KVM_MAX_MMU_OP_BATCH

#define KVM_ASYNC_PF_ENABLED
#define KVM_ASYNC_PF_SEND_ALWAYS
#define KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT
#define KVM_ASYNC_PF_DELIVERY_AS_INT

/* MSR_KVM_ASYNC_PF_INT */
#define KVM_ASYNC_PF_VEC_MASK

/* MSR_KVM_MIGRATION_CONTROL */
#define KVM_MIGRATION_READY

/* KVM_HC_MAP_GPA_RANGE */
#define KVM_MAP_GPA_RANGE_PAGE_SZ_4K
#define KVM_MAP_GPA_RANGE_PAGE_SZ_2M
#define KVM_MAP_GPA_RANGE_PAGE_SZ_1G
#define KVM_MAP_GPA_RANGE_ENC_STAT(n)
#define KVM_MAP_GPA_RANGE_ENCRYPTED
#define KVM_MAP_GPA_RANGE_DECRYPTED

/* Operations for KVM_HC_MMU_OP */
#define KVM_MMU_OP_WRITE_PTE
#define KVM_MMU_OP_FLUSH_TLB
#define KVM_MMU_OP_RELEASE_PT

/* Payload for KVM_HC_MMU_OP */
struct kvm_mmu_op_header {};

struct kvm_mmu_op_write_pte {};

struct kvm_mmu_op_flush_tlb {};

struct kvm_mmu_op_release_pt {};

#define KVM_PV_REASON_PAGE_NOT_PRESENT
#define KVM_PV_REASON_PAGE_READY

struct kvm_vcpu_pv_apf_data {};

#define KVM_PV_EOI_BIT
#define KVM_PV_EOI_MASK
#define KVM_PV_EOI_ENABLED
#define KVM_PV_EOI_DISABLED

#endif /* _UAPI_ASM_X86_KVM_PARA_H */