Skip to contentSkip to conversation

dmaengine: idxd: Modify the dependence of attribute pasid_enabled

PATCH Applied [email protected] 2 participants 2 messages Jun 14, 2023 – Jul 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dmaengine: idxd: Modify the dependence of attribute pasid_enabled

From: Rex Zhang <[email protected]>

Kernel PASID and user PASID are separately enabled. User needs to know the user PASID enabling status to decide how to use IDXD device in user space. This is done via the attribute /sys/bus/dsa/devices/dsa0/pasid_enabled. It's unnecessary for user to know the kernel PASID enabling status because user won't use the kernel PASID. But instead of showing the user PASID enabling status, the attribute shows the kernel PASID enabling status. Fix the issue by showing the user PASID enabling status in the attribute.

Fixes 42a1b73852c4 ("dmaengine: idxd: Separate user and kernel pasid enabling")
---
 drivers/dma/idxd/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/idxd/sysfs.c +1 -1
index 293739ac5596..b6a0a12412af 100644
@@ -1480,7 +1480,7 @@ static ssize_t pasid_enabled_show(struct device *dev,
 {
 	struct idxd_device *idxd = confdev_to_idxd(dev);
 
-	return sysfs_emit(buf, "%u\n", device_pasid_enabled(idxd));
+	return sysfs_emit(buf, "%u\n", device_user_pasid_enabled(idxd));
 }
 static DEVICE_ATTR_RO(pasid_enabled);
 
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 9 lines · On Wed, 14 Jun 2023 14:27:06 +0800, [email protected] wrote:

Kernel PASID and user PASID are separately enabled. User needs to know the user PASID enabling status to decide how to use IDXD device in user space. This is done via the attribute /sys/bus/dsa/devices/dsa0/pasid_enabled. It's unnecessary for user to know the kernel PASID enabling status because user won't use the kernel PASID. But instead of showing the user PASID enabling status, the attribute shows the kernel PASID enabling status. Fix the issue by showing the user PASID enabling status in the attribute.

[...]

Applied, thanks!

[1/2] dmaengine: idxd: Modify the dependence of attribute pasid_enabled

      commit: 04589e93537d27cb846e4156e614e5c73601e8ab

Best regards,

Signature · 1 line
~Vinod