From: Auger Eric <eric.auger@redhat.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
Jean-Philippe Brucker <jean-philippe.brucker@arm.com>,
"eric.auger.pro@gmail.com" <eric.auger.pro@gmail.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"joro@8bytes.org" <joro@8bytes.org>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"jacob.jun.pan@linux.intel.com" <jacob.jun.pan@linux.intel.com>,
"yi.l.liu@linux.intel.com" <yi.l.liu@linux.intel.com>,
"will.deacon@arm.com" <will.deacon@arm.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>
Cc: "marc.zyngier@arm.com" <marc.zyngier@arm.com>
Subject: Re: [RFC 01/13] iommu: Introduce bind_guest_stage API
Date: Tue, 4 Sep 2018 10:41:28 +0200 [thread overview]
Message-ID: <8da25040-42fe-5ce8-2647-ee6b8d795bc9@redhat.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D1912EFCD8@SHSMSX101.ccr.corp.intel.com>
Hi Kevin,
On 09/04/2018 10:34 AM, Tian, Kevin wrote:
>> From: Auger Eric
>> Sent: Tuesday, September 4, 2018 4:11 PM
>>
>> Hi Kevin,
>> On 09/04/2018 09:57 AM, Tian, Kevin wrote:
>>>> From: Auger Eric
>>>> Sent: Friday, August 31, 2018 9:52 PM
>>>>
>>>> Hi Jean-Philippe,
>>>>
>>>> On 08/31/2018 03:11 PM, Jean-Philippe Brucker wrote:
>>>>> Hi Eric,
>>>>>
>>>>> On 23/08/18 16:25, Auger Eric wrote:
>>>>>>> +int iommu_bind_guest_stage(struct iommu_domain *domain,
>> struct
>>>> device *dev,
>>>>>>> + struct iommu_guest_stage_config *cfg)
>>>>>
>>>>> About the name change from iommu_bind_pasid_table: is the intent to
>>>>> reuse this API for SMMUv2, which supports nested but not PASID?
>> Seems
>>>>> like a good idea but "iommu_bind_table" may be better since "stage" is
>>>>> only used by Arm.
>>>>
>>>> At the moment I don't target SMUv2 but just SMMUv3. My focus was on
>>>> nested stage enablement without enabling the multi-CD feature (PASID),
>>>> whish is not supported by the QEMU vSMMUv3. Afterwards I realized
>> that
>>>> basically we are pointing to a CD or PASID table and that's about the
>>>> same. I don't have a strong opinion on the name,
>> iommu_bind_guest_table
>>>> or iommu_bind_pasid_table would be fine with me. Indeed "stage" is
>> ARM
>>>> vocable (level for Intel?)
>>>
>>> Intel uses first level/second level.
>>>
>>> iommu_bind_table is a bit confusing. what should people take table as?
>>> there is PASID table. there is also page table linked in each stage/level.
>> and
>>> maybe other tables in vendor-specific definition.
>>>
>>> to me iommu_bind_pasid_table is still clearer. anyway in other places
>>> we've used pasid explicitly in vfio/iommu APIs, then it should be general
>>> enough to represent various implementations.
>>
>> Fine for me.
>>
>> However I I would suggest to rename the original iommu_sva_invalidate
>> into something that is SVA unrelated. iommu_tlb_invalidate is not OK as
>> this API also is used to invalidate context caches - which are not
>> iotlbs -. What about iommu_cache_invalidate?
>>
>> At least we must clarify that this API can be used for something else
>> than SVA enablement.
>>
>
> Agree. using SVA is limiting.
>
> I also agree that iommu_cache_invalidate is better, though I don't think
> you want to pass guest context cache invalidation to host. that information
> is fully under host control. :-)
I think the confusion comes from the different terminology used in VTD
and ARM SMMU spec.
Your PASID table ~ ARM SMMU Context Descriptor (CD) table
Your Root Entry/Context Entry ~ ARM SMMU Stream Table Entry (STE)
So I meant guesr invalidates its Context Descriptor cache. He "owns"
those. Host owns the STE.
Thanks
Eric
>
> Thanks
> Kevin
>
WARNING: multiple messages have this Message-ID (diff)
From: Auger Eric <eric.auger@redhat.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
Jean-Philippe Brucker <jean-philippe.brucker@arm.com>,
"eric.auger.pro@gmail.com" <eric.auger.pro@gmail.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"joro@8bytes.org" <joro@8bytes.org>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"jacob.jun.pan@linux.intel.com" <jacob.jun.pan@linux.intel.com>,
"yi.l.liu@linux.intel.com" <yi.l.liu@linux.intel.com>,
"will.deacon@arm.com" <will.deacon@arm.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>
Cc: "marc.zyngier@arm.com" <marc.zyngier@arm.com>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"christoffer.dall@arm.com" <christoffer.dall@arm.com>
Subject: Re: [RFC 01/13] iommu: Introduce bind_guest_stage API
Date: Tue, 4 Sep 2018 10:41:28 +0200 [thread overview]
Message-ID: <8da25040-42fe-5ce8-2647-ee6b8d795bc9@redhat.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D1912EFCD8@SHSMSX101.ccr.corp.intel.com>
Hi Kevin,
On 09/04/2018 10:34 AM, Tian, Kevin wrote:
>> From: Auger Eric
>> Sent: Tuesday, September 4, 2018 4:11 PM
>>
>> Hi Kevin,
>> On 09/04/2018 09:57 AM, Tian, Kevin wrote:
>>>> From: Auger Eric
>>>> Sent: Friday, August 31, 2018 9:52 PM
>>>>
>>>> Hi Jean-Philippe,
>>>>
>>>> On 08/31/2018 03:11 PM, Jean-Philippe Brucker wrote:
>>>>> Hi Eric,
>>>>>
>>>>> On 23/08/18 16:25, Auger Eric wrote:
>>>>>>> +int iommu_bind_guest_stage(struct iommu_domain *domain,
>> struct
>>>> device *dev,
>>>>>>> + struct iommu_guest_stage_config *cfg)
>>>>>
>>>>> About the name change from iommu_bind_pasid_table: is the intent to
>>>>> reuse this API for SMMUv2, which supports nested but not PASID?
>> Seems
>>>>> like a good idea but "iommu_bind_table" may be better since "stage" is
>>>>> only used by Arm.
>>>>
>>>> At the moment I don't target SMUv2 but just SMMUv3. My focus was on
>>>> nested stage enablement without enabling the multi-CD feature (PASID),
>>>> whish is not supported by the QEMU vSMMUv3. Afterwards I realized
>> that
>>>> basically we are pointing to a CD or PASID table and that's about the
>>>> same. I don't have a strong opinion on the name,
>> iommu_bind_guest_table
>>>> or iommu_bind_pasid_table would be fine with me. Indeed "stage" is
>> ARM
>>>> vocable (level for Intel?)
>>>
>>> Intel uses first level/second level.
>>>
>>> iommu_bind_table is a bit confusing. what should people take table as?
>>> there is PASID table. there is also page table linked in each stage/level.
>> and
>>> maybe other tables in vendor-specific definition.
>>>
>>> to me iommu_bind_pasid_table is still clearer. anyway in other places
>>> we've used pasid explicitly in vfio/iommu APIs, then it should be general
>>> enough to represent various implementations.
>>
>> Fine for me.
>>
>> However I I would suggest to rename the original iommu_sva_invalidate
>> into something that is SVA unrelated. iommu_tlb_invalidate is not OK as
>> this API also is used to invalidate context caches - which are not
>> iotlbs -. What about iommu_cache_invalidate?
>>
>> At least we must clarify that this API can be used for something else
>> than SVA enablement.
>>
>
> Agree. using SVA is limiting.
>
> I also agree that iommu_cache_invalidate is better, though I don't think
> you want to pass guest context cache invalidation to host. that information
> is fully under host control. :-)
I think the confusion comes from the different terminology used in VTD
and ARM SMMU spec.
Your PASID table ~ ARM SMMU Context Descriptor (CD) table
Your Root Entry/Context Entry ~ ARM SMMU Stream Table Entry (STE)
So I meant guesr invalidates its Context Descriptor cache. He "owns"
those. Host owns the STE.
Thanks
Eric
>
> Thanks
> Kevin
>
next prev parent reply other threads:[~2018-09-04 8:41 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 12:17 [RFC 00/13] SMMUv3 Nested Stage Setup Eric Auger
2018-08-23 12:17 ` [RFC 01/13] iommu: Introduce bind_guest_stage API Eric Auger
2018-08-23 12:17 ` [RFC 02/13] iommu: Introduce tlb_invalidate API Eric Auger
2018-08-23 12:17 ` [RFC 03/13] iommu: Introduce bind_guest_msi Eric Auger
2018-08-23 12:17 ` [RFC 04/13] vfio: VFIO_IOMMU_BIND_GUEST_STAGE Eric Auger
2018-08-23 12:17 ` [RFC 05/13] vfio: VFIO_IOMMU_TLB_INVALIDATE Eric Auger
2018-08-23 12:17 ` [RFC 06/13] vfio: VFIO_IOMMU_BIND_MSI Eric Auger
2018-08-23 12:17 ` [RFC 07/13] vfio: Document nested stage control Eric Auger
2018-08-23 12:17 ` [RFC 08/13] iommu/arm-smmu-v3: Link domains and devices Eric Auger
2018-08-23 12:17 ` [RFC 09/13] iommu/smmuv3: Get prepared for nested stage support Eric Auger
2018-08-23 12:17 ` [RFC 10/13] iommu/smmuv3: Implement bind_guest_stage Eric Auger
2018-08-23 12:17 ` [RFC 11/13] iommu/smmuv3: Implement tlb_invalidate Eric Auger
2018-08-23 12:17 ` [RFC 12/13] dma-iommu: Implement NESTED_MSI cookie Eric Auger
[not found] ` <1535026656-8450-1-git-send-email-eric.auger-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-08-23 12:17 ` [RFC 01/13] iommu: Introduce bind_guest_stage API Eric Auger
2018-08-23 15:25 ` Auger Eric
2018-08-31 13:11 ` Jean-Philippe Brucker
[not found] ` <b7909f1b-57ce-f4db-d916-140a63283232-5wv7dgnIgG8@public.gmane.org>
2018-08-31 13:52 ` Auger Eric
2018-08-31 13:52 ` Auger Eric
2018-09-03 12:19 ` Jean-Philippe Brucker
[not found] ` <4309832b-27ed-597a-b5a1-f439fbea9843-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-09-04 7:57 ` Tian, Kevin
2018-09-04 7:57 ` Tian, Kevin
2018-09-04 8:10 ` Auger Eric
[not found] ` <220e4c2a-d31c-d8fb-2d77-d902d2f13bb2-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-09-04 8:34 ` Tian, Kevin
2018-09-04 8:34 ` Tian, Kevin
2018-09-04 8:41 ` Auger Eric [this message]
2018-09-04 8:41 ` Auger Eric
2018-09-04 8:43 ` Tian, Kevin
2018-09-04 9:53 ` Jean-Philippe Brucker
2018-09-05 0:36 ` Tian, Kevin
2018-09-05 0:36 ` Tian, Kevin
[not found] ` <A2975661238FB949B60364EF0F2C257439CCE9EE@SHSMSX104.ccr.corp.intel.com>
2018-08-24 13:20 ` Auger Eric
2018-08-24 13:20 ` Auger Eric
2018-08-23 12:17 ` [RFC 02/13] iommu: Introduce tlb_invalidate API Eric Auger
2018-08-31 13:17 ` Jean-Philippe Brucker
2018-08-31 13:17 ` Jean-Philippe Brucker
2018-08-31 14:07 ` Auger Eric
2018-09-03 12:28 ` Jean-Philippe Brucker
2018-09-03 12:41 ` Auger Eric
2018-09-03 13:41 ` Jean-Philippe Brucker
2018-08-23 12:17 ` [RFC 03/13] iommu: Introduce bind_guest_msi Eric Auger
2018-08-23 12:17 ` [RFC 04/13] vfio: VFIO_IOMMU_BIND_GUEST_STAGE Eric Auger
2018-08-23 12:17 ` [RFC 05/13] vfio: VFIO_IOMMU_TLB_INVALIDATE Eric Auger
2018-08-23 12:17 ` [RFC 06/13] vfio: VFIO_IOMMU_BIND_MSI Eric Auger
2018-08-23 12:17 ` [RFC 07/13] vfio: Document nested stage control Eric Auger
2018-08-23 12:17 ` [RFC 08/13] iommu/arm-smmu-v3: Link domains and devices Eric Auger
2018-08-23 12:17 ` [RFC 09/13] iommu/smmuv3: Get prepared for nested stage support Eric Auger
2018-08-31 13:20 ` Jean-Philippe Brucker
2018-08-31 13:20 ` Jean-Philippe Brucker
2018-08-31 14:11 ` Auger Eric
[not found] ` <012d4950-7a06-2d59-85a0-44d511ad893b-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-09-03 12:29 ` Jean-Philippe Brucker
2018-09-03 12:29 ` Jean-Philippe Brucker
2018-09-03 12:48 ` Auger Eric
2018-09-03 12:48 ` Auger Eric
2018-08-23 12:17 ` [RFC 10/13] iommu/smmuv3: Implement bind_guest_stage Eric Auger
2018-08-23 12:17 ` [RFC 11/13] iommu/smmuv3: Implement tlb_invalidate Eric Auger
2018-08-23 12:17 ` [RFC 12/13] dma-iommu: Implement NESTED_MSI cookie Eric Auger
2018-08-23 12:17 ` [RFC 13/13] iommu/smmuv3: Implement bind_guest_msi Eric Auger
2018-08-23 12:17 ` Eric Auger
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=8da25040-42fe-5ce8-2647-ee6b8d795bc9@redhat.com \
--to=eric.auger@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jacob.jun.pan@linux.intel.com \
--cc=jean-philippe.brucker@arm.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=robin.murphy@arm.com \
--cc=will.deacon@arm.com \
--cc=yi.l.liu@linux.intel.com \
/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.