linux/drivers/iommu/intel/cap_audit.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * cap_audit.h - audit iommu capabilities header
 *
 * Copyright (C) 2021 Intel Corporation
 *
 * Author: Kyung Min Park <[email protected]>
 */

/*
 * Capability Register Mask
 */
#define CAP_FL5LP_MASK
#define CAP_PI_MASK
#define CAP_FL1GP_MASK
#define CAP_RD_MASK
#define CAP_WD_MASK
#define CAP_MAMV_MASK
#define CAP_NFR_MASK
#define CAP_PSI_MASK
#define CAP_SLLPS_MASK
#define CAP_FRO_MASK
#define CAP_ZLR_MASK
#define CAP_MGAW_MASK
#define CAP_SAGAW_MASK
#define CAP_CM_MASK
#define CAP_PHMR_MASK
#define CAP_PLMR_MASK
#define CAP_RWBF_MASK
#define CAP_AFL_MASK
#define CAP_NDOMS_MASK

/*
 * Extended Capability Register Mask
 */
#define ECAP_RPS_MASK
#define ECAP_SMPWC_MASK
#define ECAP_FLTS_MASK
#define ECAP_SLTS_MASK
#define ECAP_SLADS_MASK
#define ECAP_VCS_MASK
#define ECAP_SMTS_MASK
#define ECAP_PDS_MASK
#define ECAP_DIT_MASK
#define ECAP_PASID_MASK
#define ECAP_PSS_MASK
#define ECAP_EAFS_MASK
#define ECAP_NWFS_MASK
#define ECAP_SRS_MASK
#define ECAP_ERS_MASK
#define ECAP_PRS_MASK
#define ECAP_NEST_MASK
#define ECAP_MTS_MASK
#define ECAP_MHMV_MASK
#define ECAP_IRO_MASK
#define ECAP_SC_MASK
#define ECAP_PT_MASK
#define ECAP_EIM_MASK
#define ECAP_DT_MASK
#define ECAP_QI_MASK
#define ECAP_C_MASK

/*
 * u64 intel_iommu_cap_sanity, intel_iommu_ecap_sanity will be adjusted as each
 * IOMMU gets audited.
 */
#define DO_CHECK_FEATURE_MISMATCH(a, b, cap, feature, MASK)

#define CHECK_FEATURE_MISMATCH(a, b, cap, feature, MASK)

#define CHECK_FEATURE_MISMATCH_HOTPLUG(b, cap, feature, MASK)

#define MINIMAL_FEATURE_IOMMU(iommu, cap, MASK)

#define MINIMAL_FEATURE_HOTPLUG(iommu, cap, feature, MASK, mismatch)

enum cap_audit_type {};

bool intel_cap_smts_sanity(void);
bool intel_cap_pasid_sanity(void);
bool intel_cap_nest_sanity(void);
bool intel_cap_flts_sanity(void);
bool intel_cap_slts_sanity(void);

static inline bool scalable_mode_support(void)
{}

static inline bool pasid_mode_support(void)
{}

static inline bool nested_mode_support(void)
{}

int intel_cap_audit(enum cap_audit_type type, struct intel_iommu *iommu);