Re: [PATCH 3/4] iommu/vt-d: Remove unused vcmd interfaces

From: Baolu Lu
Date: Wed Nov 15 2023 - 22:29:42 EST


On 11/16/23 11:21 AM, Tian, Kevin wrote:
From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Sent: Thursday, November 16, 2023 9:51 AM

Commit 99b5726b4423 ("iommu: Remove ioasid infrastructure") has
removed
ioasid allocation interfaces from the iommu subsystem. As a result, these
vcmd interfaces have become obsolete. Remove them to avoid dead code.

Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

it's a surprise to see some remaining vcmd bits not removed.

with a grep actually there are more (mostly in the header files):

drivers/iommu/intel/debugfs.c: IOMMU_REGSET_ENTRY(VCMD),
drivers/iommu/intel/pasid.h:#define VCMD_CMD_ALLOC 0x1
drivers/iommu/intel/pasid.h:#define VCMD_CMD_FREE 0x2
drivers/iommu/intel/pasid.h:#define VCMD_VRSP_IP 0x1
drivers/iommu/intel/pasid.h:#define VCMD_VRSP_SC(e) (((e) & 0xff) >> 1)
drivers/iommu/intel/pasid.h:#define VCMD_VRSP_SC_SUCCESS 0
drivers/iommu/intel/pasid.h:#define VCMD_VRSP_SC_NO_PASID_AVAIL 16
drivers/iommu/intel/pasid.h:#define VCMD_VRSP_SC_INVALID_PASID 16
drivers/iommu/intel/pasid.h:#define VCMD_VRSP_RESULT_PASID(e) (((e) >> 16) & 0xfffff)
drivers/iommu/intel/pasid.h:#define VCMD_CMD_OPERAND(e) ((e) << 16)
drivers/iommu/intel/iommu.h:#define DMAR_VCMD_REG 0xe00 /* Virtual command register */



Yeah! I will also remove these bits. Thanks!

Best regards,
baolu