mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-30 11:17:42 +08:00
Merge branches 'fixes', 'arm/smmu/updates', 'intel/vt-d', 'amd/amd-vi' and 'core' into next
This commit is contained in:
@@ -465,16 +465,27 @@ struct iommu_hwpt_arm_smmuv3 {
|
||||
__aligned_le64 ste[2];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iommu_hwpt_amd_guest - AMD IOMMU guest I/O page table data
|
||||
* (IOMMU_HWPT_DATA_AMD_GUEST)
|
||||
* @dte: Guest Device Table Entry (DTE)
|
||||
*/
|
||||
struct iommu_hwpt_amd_guest {
|
||||
__aligned_u64 dte[4];
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iommu_hwpt_data_type - IOMMU HWPT Data Type
|
||||
* @IOMMU_HWPT_DATA_NONE: no data
|
||||
* @IOMMU_HWPT_DATA_VTD_S1: Intel VT-d stage-1 page table
|
||||
* @IOMMU_HWPT_DATA_ARM_SMMUV3: ARM SMMUv3 Context Descriptor Table
|
||||
* @IOMMU_HWPT_DATA_AMD_GUEST: AMD IOMMU guest page table
|
||||
*/
|
||||
enum iommu_hwpt_data_type {
|
||||
IOMMU_HWPT_DATA_NONE = 0,
|
||||
IOMMU_HWPT_DATA_VTD_S1 = 1,
|
||||
IOMMU_HWPT_DATA_ARM_SMMUV3 = 2,
|
||||
IOMMU_HWPT_DATA_AMD_GUEST = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -623,6 +634,32 @@ struct iommu_hw_info_tegra241_cmdqv {
|
||||
__u8 __reserved;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iommu_hw_info_amd - AMD IOMMU device info
|
||||
*
|
||||
* @efr : Value of AMD IOMMU Extended Feature Register (EFR)
|
||||
* @efr2: Value of AMD IOMMU Extended Feature 2 Register (EFR2)
|
||||
*
|
||||
* Please See description of these registers in the following sections of
|
||||
* the AMD I/O Virtualization Technology (IOMMU) Specification.
|
||||
* (https://docs.amd.com/v/u/en-US/48882_3.10_PUB)
|
||||
*
|
||||
* - MMIO Offset 0030h IOMMU Extended Feature Register
|
||||
* - MMIO Offset 01A0h IOMMU Extended Feature 2 Register
|
||||
*
|
||||
* Note: The EFR and EFR2 are raw values reported by hardware.
|
||||
* VMM is responsible to determine the appropriate flags to be exposed to
|
||||
* the VM since cetertain features are not currently supported by the kernel
|
||||
* for HW-vIOMMU.
|
||||
*
|
||||
* Current VMM-allowed list of feature flags are:
|
||||
* - EFR[GTSup, GASup, GioSup, PPRSup, EPHSup, GATS, GLX, PASmax]
|
||||
*/
|
||||
struct iommu_hw_info_amd {
|
||||
__aligned_u64 efr;
|
||||
__aligned_u64 efr2;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iommu_hw_info_type - IOMMU Hardware Info Types
|
||||
* @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not report hardware
|
||||
@@ -632,6 +669,7 @@ struct iommu_hw_info_tegra241_cmdqv {
|
||||
* @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type
|
||||
* @IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM
|
||||
* SMMUv3) info type
|
||||
* @IOMMU_HW_INFO_TYPE_AMD: AMD IOMMU info type
|
||||
*/
|
||||
enum iommu_hw_info_type {
|
||||
IOMMU_HW_INFO_TYPE_NONE = 0,
|
||||
@@ -639,6 +677,7 @@ enum iommu_hw_info_type {
|
||||
IOMMU_HW_INFO_TYPE_INTEL_VTD = 1,
|
||||
IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2,
|
||||
IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV = 3,
|
||||
IOMMU_HW_INFO_TYPE_AMD = 4,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -964,6 +964,10 @@ struct vfio_device_bind_iommufd {
|
||||
* hwpt corresponding to the given pt_id.
|
||||
*
|
||||
* Return: 0 on success, -errno on failure.
|
||||
*
|
||||
* When a device is resetting, -EBUSY will be returned to reject any concurrent
|
||||
* attachment to the resetting device itself or any sibling device in the IOMMU
|
||||
* group having the resetting device.
|
||||
*/
|
||||
struct vfio_device_attach_iommufd_pt {
|
||||
__u32 argsz;
|
||||
|
||||
Reference in New Issue
Block a user