[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30c18a6d-fd0f-6e63-c231-d6f068410342@linux.intel.com>
Date: Mon, 1 Mar 2021 08:44:39 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Zenghui Yu <yuzenghui@...wei.com>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Cc: baolu.lu@...ux.intel.com, dwmw2@...radead.org, joro@...tes.org,
will@...nel.org, jacob.jun.pan@...ux.intel.com,
eric.auger@...hat.com, yi.l.liu@...el.com, kevin.tian@...el.com,
wanghaibin.wang@...wei.com
Subject: Re: [PATCH] iommu/vt-d: Fix status code for Allocate/Free PASID
command
On 2/27/21 3:39 PM, Zenghui Yu wrote:
> 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@...wei.com>
> ---
> drivers/iommu/intel/pasid.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/intel/pasid.h b/drivers/iommu/intel/pasid.h
> index 97dfcffbf495..444c0bec221a 100644
> --- a/drivers/iommu/intel/pasid.h
> +++ b/drivers/iommu/intel/pasid.h
> @@ -30,8 +30,8 @@
> #define VCMD_VRSP_IP 0x1
> #define VCMD_VRSP_SC(e) (((e) >> 1) & 0x3)
> #define VCMD_VRSP_SC_SUCCESS 0
> -#define VCMD_VRSP_SC_NO_PASID_AVAIL 1
> -#define VCMD_VRSP_SC_INVALID_PASID 1
> +#define VCMD_VRSP_SC_NO_PASID_AVAIL 2
> +#define VCMD_VRSP_SC_INVALID_PASID 2
> #define VCMD_VRSP_RESULT_PASID(e) (((e) >> 8) & 0xfffff)
> #define VCMD_CMD_OPERAND(e) ((e) << 8)
> /*
>
Thanks a lot for catching this.
Acked-by: Lu Baolu <baolu.lu@...ux.intel.com>
Best regards,
baolu
Powered by blists - more mailing lists