ANDROID: iommu/arm-smmu-v3-kvm: Add support for identifying SMMU masters from SIDs
We currently don't track what SMMU masters are attached to a particular
SMMU. This makes it impossible to find any meaningful data structures
given an SID.
An example of where such tracking would be beneficial is in the event
queue handler in case of a fault. The event record provides the SID
of the client that initiated the faulting transaction. That SID could
be used to identify device-specific data structures that could be used
to report the fault to the SMMU master's driver.
Therefore, add support for tracking what SMMU masters are attached to
an SMMU.
Additionally, update arm_smmu_print_evt_info() to take in a name as
a parameter instead of having the function deduce the client name on its
own. This is necessary as the smmu->streams field now has meaningful
values, but it is used for a red black tree of kvm_arm_smmu_master
structures, instead of arm_smmu_master structures. So, it would
not be safe to have arm_smmu_print_evt_info() manipulate those
structures.
This is based on the upstream implementation of SMMU master tracking of
the SMMUv3 driver in Linux kernel version 6.15-rc5.
Bug: 369229886
Bug: 437825935
Change-Id: I0a6505bde2f39a4a3e04a0491fd113366bd281bf
Signed-off-by:
Isaac J. Manjarres <isaacmanjarres@google.com>
Loading