linux/arch/x86/kvm/vmx/capabilities.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __KVM_X86_VMX_CAPS_H
#define __KVM_X86_VMX_CAPS_H

#include <asm/vmx.h>

#include "../lapic.h"
#include "../x86.h"
#include "../pmu.h"
#include "../cpuid.h"

extern bool __read_mostly enable_vpid;
extern bool __read_mostly flexpriority_enabled;
extern bool __read_mostly enable_ept;
extern bool __read_mostly enable_unrestricted_guest;
extern bool __read_mostly enable_ept_ad_bits;
extern bool __read_mostly enable_pml;
extern bool __read_mostly enable_ipiv;
extern int __read_mostly pt_mode;

#define PT_MODE_SYSTEM
#define PT_MODE_HOST_GUEST

#define PMU_CAP_FW_WRITES
#define PMU_CAP_LBR_FMT

struct nested_vmx_msrs {};

struct vmcs_config {};
extern struct vmcs_config vmcs_config __ro_after_init;

struct vmx_capability {};
extern struct vmx_capability vmx_capability __ro_after_init;

static inline bool cpu_has_vmx_basic_inout(void)
{}

static inline bool cpu_has_virtual_nmis(void)
{}

static inline bool cpu_has_vmx_preemption_timer(void)
{}

static inline bool cpu_has_vmx_posted_intr(void)
{}

static inline bool cpu_has_load_ia32_efer(void)
{}

static inline bool cpu_has_load_perf_global_ctrl(void)
{}

static inline bool cpu_has_vmx_mpx(void)
{}

static inline bool cpu_has_vmx_tpr_shadow(void)
{}

static inline bool cpu_need_tpr_shadow(struct kvm_vcpu *vcpu)
{}

static inline bool cpu_has_vmx_msr_bitmap(void)
{}

static inline bool cpu_has_secondary_exec_ctrls(void)
{}

static inline bool cpu_has_tertiary_exec_ctrls(void)
{}

static inline bool cpu_has_vmx_virtualize_apic_accesses(void)
{}

static inline bool cpu_has_vmx_ept(void)
{}

static inline bool vmx_umip_emulated(void)
{}

static inline bool cpu_has_vmx_rdtscp(void)
{}

static inline bool cpu_has_vmx_virtualize_x2apic_mode(void)
{}

static inline bool cpu_has_vmx_vpid(void)
{}

static inline bool cpu_has_vmx_wbinvd_exit(void)
{}

static inline bool cpu_has_vmx_unrestricted_guest(void)
{}

static inline bool cpu_has_vmx_apic_register_virt(void)
{}

static inline bool cpu_has_vmx_virtual_intr_delivery(void)
{}

static inline bool cpu_has_vmx_ple(void)
{}

static inline bool cpu_has_vmx_rdrand(void)
{}

static inline bool cpu_has_vmx_invpcid(void)
{}

static inline bool cpu_has_vmx_vmfunc(void)
{}

static inline bool cpu_has_vmx_shadow_vmcs(void)
{}

static inline bool cpu_has_vmx_encls_vmexit(void)
{}

static inline bool cpu_has_vmx_rdseed(void)
{}

static inline bool cpu_has_vmx_pml(void)
{}

static inline bool cpu_has_vmx_xsaves(void)
{}

static inline bool cpu_has_vmx_waitpkg(void)
{}

static inline bool cpu_has_vmx_tsc_scaling(void)
{}

static inline bool cpu_has_vmx_bus_lock_detection(void)
{}

static inline bool cpu_has_vmx_apicv(void)
{}

static inline bool cpu_has_vmx_ipiv(void)
{}

static inline bool cpu_has_vmx_flexpriority(void)
{}

static inline bool cpu_has_vmx_ept_execute_only(void)
{}

static inline bool cpu_has_vmx_ept_4levels(void)
{}

static inline bool cpu_has_vmx_ept_5levels(void)
{}

static inline bool cpu_has_vmx_ept_mt_wb(void)
{}

static inline bool cpu_has_vmx_ept_2m_page(void)
{}

static inline bool cpu_has_vmx_ept_1g_page(void)
{}

static inline int ept_caps_to_lpage_level(u32 ept_caps)
{}

static inline bool cpu_has_vmx_ept_ad_bits(void)
{}

static inline bool cpu_has_vmx_invept_context(void)
{}

static inline bool cpu_has_vmx_invept_global(void)
{}

static inline bool cpu_has_vmx_invvpid(void)
{}

static inline bool cpu_has_vmx_invvpid_individual_addr(void)
{}

static inline bool cpu_has_vmx_invvpid_single(void)
{}

static inline bool cpu_has_vmx_invvpid_global(void)
{}

static inline bool cpu_has_vmx_intel_pt(void)
{}

/*
 * Processor Trace can operate in one of three modes:
 *  a. system-wide: trace both host/guest and output to host buffer
 *  b. host-only:   only trace host and output to host buffer
 *  c. host-guest:  trace host and guest simultaneously and output to their
 *                  respective buffer
 *
 * KVM currently only supports (a) and (c).
 */
static inline bool vmx_pt_mode_is_system(void)
{}
static inline bool vmx_pt_mode_is_host_guest(void)
{}

static inline bool vmx_pebs_supported(void)
{}

static inline bool cpu_has_notify_vmexit(void)
{}

#endif /* __KVM_X86_VMX_CAPS_H */