History

iommu/vt-d: Implement hw_info for iommu capability query

Add intel_iommu_hw_info() to report cap_reg and ecap_reg information.

Yi Liu committed 3 years ago

Commit 55243391 parent af4fde92 files · +42 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/iommufd.h+23−0
@@ -372,13 +372,36 @@ struct iommu_hwpt_alloc { · 371 unmodified lines
372};372};
373#define IOMMU_HWPT_ALLOC _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_ALLOC)373#define IOMMU_HWPT_ALLOC _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_ALLOC)
374 374
375/**
376 * struct iommu_hw_info_vtd - Intel VT-d hardware information
377 *
378 * @flags: Must be 0
379 * @__reserved: Must be 0
380 *
381 * @cap_reg: Value of Intel VT-d capability register defined in VT-d spec
382 * section 11.4.2 Capability Register.
383 * @ecap_reg: Value of Intel VT-d capability register defined in VT-d spec
384 * section 11.4.3 Extended Capability Register.
385 *
386 * User needs to understand the Intel VT-d specification to decode the
387 * register value.
388 */
389struct iommu_hw_info_vtd {
390 __u32 flags;
391 __u32 __reserved;
392 __aligned_u64 cap_reg;
393 __aligned_u64 ecap_reg;
394};
395
375/**396/**
376 * enum iommu_hw_info_type - IOMMU Hardware Info Types397 * enum iommu_hw_info_type - IOMMU Hardware Info Types
377 * @IOMMU_HW_INFO_TYPE_NONE: Used by the drivers that do not report hardware398 * @IOMMU_HW_INFO_TYPE_NONE: Used by the drivers that do not report hardware
378 * info399 * info
400 * @IOMMU_HW_INFO_TYPE_INTEL_VTD: Intel VT-d iommu info type
379 */401 */
380enum iommu_hw_info_type {402enum iommu_hw_info_type {
381 IOMMU_HW_INFO_TYPE_NONE,403 IOMMU_HW_INFO_TYPE_NONE,
404 IOMMU_HW_INFO_TYPE_INTEL_VTD,
382};405};
383 406
384/**407/**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t