Re: [PATCH v4 14/14] iommu/arm-smmu-v3: Report events that belong to devices attached to vIOMMU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/7/25 14:00, Nicolin Chen wrote:
On Tue, Jan 07, 2025 at 01:54:00PM +0800, Baolu Lu wrote:
On 1/7/25 12:36, Nicolin Chen wrote:
+static bool arm_vsmmu_supports_veventq(unsigned int type)
+{
+	return type == IOMMU_VIOMMU_TYPE_ARM_SMMUV3;
Do you need to check the hardware capabilities before reporting this? I
am not familiar with the ARM architecture, but typically it's better to
make it like this,

static bool arm_vsmmu_supports_veventq(struct iommufd_viommu *viommu,
                                        enum iommu_veventq_type type)
{
	if (type != IOMMU_VEVENTQ_TYPE_ARM_SMMUV3)
		return false;

	if (hardware_not_capable(viommu))
		return false;
I think the ARM version of viommu_alloc op has already implemented
enough capability checks and rejected any of hardware_not_capable.
So, viommu shouldn't be a thing that the driver could actually use
to call this helper 🙂

Okay, fair enough.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux