iommu/vt-d: Fix status code for Allocate/Free PASID command
authorZenghui Yu <yuzenghui@huawei.com>
Sat, 27 Feb 2021 07:39:09 +0000 (15:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Mar 2021 10:11:15 +0000 (11:11 +0100)
commita7cefacccafa5d099e6ff3c9b31056f863a1f58f
treece4dfaac425ea4eb47065f69c3809162d02c14ad
parent5cc0813e7bb991781e6795d6faee5b30722047d5
iommu/vt-d: Fix status code for Allocate/Free PASID command

[ Upstream commit 444d66a23c1f1e4c4d12aed4812681d0ad835d60 ]

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: 24f27d32ab6b ("iommu/vt-d: Enlightened PASID allocation")
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210227073909.432-1-yuzenghui@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/intel/pasid.h