Skip to content

Commit 444d66a

Browse files
Zenghui Yujoergroedel
authored andcommitted
iommu/vt-d: Fix status code for Allocate/Free PASID command
As per Intel vt-d spec, Rev 3.0 (section 10.4.45 "Virtual Command Response Register"), the status code of "No PASID available" error in response to the Allocate PASID command is 2, not 1. The same for "Invalid PASID" error in response to the Free PASID command. We will otherwise see confusing kernel log under the command failure from guest side. Fix it. Fixes: 24f27d3 ("iommu/vt-d: Enlightened PASID allocation") Signed-off-by: Zenghui Yu <[email protected]> Acked-by: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 82c3cef commit 444d66a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/intel/pasid.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#define VCMD_VRSP_IP 0x1
3131
#define VCMD_VRSP_SC(e) (((e) >> 1) & 0x3)
3232
#define VCMD_VRSP_SC_SUCCESS 0
33-
#define VCMD_VRSP_SC_NO_PASID_AVAIL 1
34-
#define VCMD_VRSP_SC_INVALID_PASID 1
33+
#define VCMD_VRSP_SC_NO_PASID_AVAIL 2
34+
#define VCMD_VRSP_SC_INVALID_PASID 2
3535
#define VCMD_VRSP_RESULT_PASID(e) (((e) >> 8) & 0xfffff)
3636
#define VCMD_CMD_OPERAND(e) ((e) << 8)
3737
/*

0 commit comments

Comments
 (0)