All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suravee Suthikulpanit <suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Jay Cornwall <jay.cornwall-5C7GfCeVMHo@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Naru, Kim" <Kim.Naru-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 1/1] iommu/amd: Fix PASID format in INVALIDATE_IOTLB_PAGES command
Date: Tue, 4 Mar 2014 11:06:34 -0600	[thread overview]
Message-ID: <5316081A.9020008@amd.com> (raw)
In-Reply-To: <5316051E.2030004-5C7GfCeVMHo@public.gmane.org>

On 3/4/2014 10:53 AM, Suravee Suthikulpanit wrote:
> On 3/4/2014 8:12 AM, Joerg Roedel wrote:
>> On Wed, Feb 26, 2014 at 03:49:31PM -0600,
>> suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org wrote:
>>> From: Jay Cornwall <jay.cornwall-5C7GfCeVMHo@public.gmane.org>
>>>
>>> This patch corrects the PASID format in the INVALIDATE_IOTLB_PAGES
>>> command, which was caused by incorrect information in
>>> the AMD IOMMU Architectural Specification v2.01 document.
>>>
>>>      Incorrect format:
>>>           cmd->data[0][16:23] = PASID[7:0]
>>>           cmd->data[1][16:27] = PASID[19:8]
>>>
>>>       Correct format:
>>>           cmd->data[0][16:23] = PASID[15:8]
>>>           cmd->data[1][16:23] = PASID[7:0]
>>>
>>> However, this does not affect the IOMMUv2 hardware implementation,
>>> and has been corrected since version 2.02 of the specification
>>> (available through AMD NDA).
>>>
>>> Signed-off-by: Jay Cornwall <jay.cornwall-5C7GfCeVMHo@public.gmane.org>
>>> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
>>
>> Applied, thanks.
>>
>> Does this mean that PASIDs are only 16 bits wide now from the former 20
>> bits?
>>
>>
>>
>
> Thank you Joerg. The specification also state that this command format
> does not support the maximum size of the PASID field. However, other
> commands seem to still support 20-bit PASID.
>
> Suravee

Actually, just thinking about this again, even though we don't have 
systems with 20-bit PASID yet (only up-to 16-bit), but for future proof, 
we should add another logic to make sure that this logic won't try to 
use the 20-bit PASID with this version of the command.  I'll send out 
another patch soon.

Suravee

WARNING: multiple messages have this Message-ID (diff)
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: <iommu@lists.linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jay Cornwall <jay.cornwall@amd.com>,
	"Naru, Kim" <Kim.Naru@amd.com>
Subject: Re: [PATCH 1/1] iommu/amd: Fix PASID format in INVALIDATE_IOTLB_PAGES command
Date: Tue, 4 Mar 2014 11:06:34 -0600	[thread overview]
Message-ID: <5316081A.9020008@amd.com> (raw)
In-Reply-To: <5316051E.2030004@amd.com>

On 3/4/2014 10:53 AM, Suravee Suthikulpanit wrote:
> On 3/4/2014 8:12 AM, Joerg Roedel wrote:
>> On Wed, Feb 26, 2014 at 03:49:31PM -0600,
>> suravee.suthikulpanit@amd.com wrote:
>>> From: Jay Cornwall <jay.cornwall@amd.com>
>>>
>>> This patch corrects the PASID format in the INVALIDATE_IOTLB_PAGES
>>> command, which was caused by incorrect information in
>>> the AMD IOMMU Architectural Specification v2.01 document.
>>>
>>>      Incorrect format:
>>>           cmd->data[0][16:23] = PASID[7:0]
>>>           cmd->data[1][16:27] = PASID[19:8]
>>>
>>>       Correct format:
>>>           cmd->data[0][16:23] = PASID[15:8]
>>>           cmd->data[1][16:23] = PASID[7:0]
>>>
>>> However, this does not affect the IOMMUv2 hardware implementation,
>>> and has been corrected since version 2.02 of the specification
>>> (available through AMD NDA).
>>>
>>> Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
>>> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>>
>> Applied, thanks.
>>
>> Does this mean that PASIDs are only 16 bits wide now from the former 20
>> bits?
>>
>>
>>
>
> Thank you Joerg. The specification also state that this command format
> does not support the maximum size of the PASID field. However, other
> commands seem to still support 20-bit PASID.
>
> Suravee

Actually, just thinking about this again, even though we don't have 
systems with 20-bit PASID yet (only up-to 16-bit), but for future proof, 
we should add another logic to make sure that this logic won't try to 
use the 20-bit PASID with this version of the command.  I'll send out 
another patch soon.

Suravee


  parent reply	other threads:[~2014-03-04 17:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 21:49 [PATCH 1/1] iommu/amd: Fix PASID format in INVALIDATE_IOTLB_PAGES command suravee.suthikulpanit
2014-02-26 21:49 ` suravee.suthikulpanit
     [not found] ` <1393451371-17894-1-git-send-email-suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
2014-03-04 14:12   ` Joerg Roedel
2014-03-04 14:12     ` Joerg Roedel
     [not found]     ` <20140304141251.GB2799-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-03-04 16:53       ` Suravee Suthikulpanit
2014-03-04 16:53         ` Suravee Suthikulpanit
     [not found]         ` <5316051E.2030004-5C7GfCeVMHo@public.gmane.org>
2014-03-04 17:06           ` Suravee Suthikulpanit [this message]
2014-03-04 17:06             ` Suravee Suthikulpanit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5316081A.9020008@amd.com \
    --to=suravee.suthikulpanit-5c7gfcevmho@public.gmane.org \
    --cc=Kim.Naru-5C7GfCeVMHo@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jay.cornwall-5C7GfCeVMHo@public.gmane.org \
    --cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.