From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
To: Eric Auger <eric.auger@redhat.com>,
"\"eric.auger.pro"@gmail.comeric.auger@redhat.com,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
joro@8bytes.org, alex.williamson@redhat.com,
jean-philippe.brucker@arm.com, jacob.jun.pan@linux.intel.com,
"yi.l.liu\""@linux.intel.com, will.deacon@arm.com,
robin.murphy@arm.com
Cc: marc.zyngier@arm.com, peter.maydell@linaro.org, christoffer.dall@arm.com
Subject: Re: [RFC 02/13] iommu: Introduce tlb_invalidate API
Date: Fri, 31 Aug 2018 14:17:19 +0100 [thread overview]
Message-ID: <11279859-08f8-6d9d-7aa7-7a5de4cfd3fb@arm.com> (raw)
In-Reply-To: <1535026656-8450-3-git-send-email-eric.auger@redhat.com>
On 23/08/18 13:17, Eric Auger wrote:
> +/**
> + * Translation cache invalidation information, contains generic IOMMU
> + * data which can be parsed based on model ID by model specific drivers.
> + * Since the invalidation of second level page tables are included in the
> + * unmap operation, this info is only applicable to the first level
> + * translation caches, i.e. DMA request with PASID.
> + *
> + * @granularity: requested invalidation granularity, type dependent
> + * @size: 2^size of 4K pages, 0 for 4k, 9 for 2MB, etc.
> + * @nr_pages: number of pages to invalidate
> + * @pasid: processor address space ID value per PCI spec.
> + * @addr: page address to be invalidated
> + * @flags IOMMU_INVALIDATE_ADDR_LEAF: leaf paging entries
> + * IOMMU_INVALIDATE_GLOBAL_PAGE: global pages
> + *
> + */
> +struct iommu_tlb_invalidate_info {
> + struct iommu_tlb_invalidate_hdr hdr;
> + enum iommu_inv_granularity granularity;
> + __u32 flags;
> +#define IOMMU_INVALIDATE_ADDR_LEAF (1 << 0)
> +#define IOMMU_INVALIDATE_GLOBAL_PAGE (1 << 1)
> + __u8 size;
> + __u64 nr_pages;
> + __u32 pasid;
> + __u64 addr;
> +};
> #endif /* _UAPI_IOMMU_H */
Since the ioctl will be used to combine invalidations (invalidate both
ATC and TLB with a single call), we need an additional ASID field for
the SMMU - ATC is invalidated by PASID, TLB by ASID. I used to call it
"tag", but I'm leaning towards "arch_id" now
(http://www.linux-arm.org/git?p=linux-jpb.git;a=commitdiff;h=40fdef74816dd8d8d113100b9e0162fab4cec28d)
Thanks,
Jean
next prev parent reply other threads:[~2018-08-31 13:17 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1535026656-8450-1-git-send-email-eric.auger@redhat.com>
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
2018-08-23 12:17 ` [RFC 13/13] iommu/smmuv3: Implement bind_guest_msi Eric Auger
[not found] ` <1535026656-8450-2-git-send-email-eric.auger@redhat.com>
2018-08-23 15:25 ` [RFC 01/13] iommu: Introduce bind_guest_stage API 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-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 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: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
[not found] ` <A2975661238FB949B60364EF0F2C257439CCE9EE@SHSMSX104.ccr.corp.intel.com>
2018-08-24 13:20 ` Auger Eric
[not found] ` <1535026656-8450-3-git-send-email-eric.auger@redhat.com>
2018-08-31 13:17 ` Jean-Philippe Brucker [this message]
2018-08-31 14:07 ` [RFC 02/13] iommu: Introduce tlb_invalidate API 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
[not found] ` <1535026656-8450-10-git-send-email-eric.auger@redhat.com>
2018-08-31 13:20 ` [RFC 09/13] iommu/smmuv3: Get prepared for nested stage support 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:48 ` Auger Eric
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=11279859-08f8-6d9d-7aa7-7a5de4cfd3fb@arm.com \
--to=jean-philippe.brucker@arm.com \
--cc="\"eric.auger.pro"@gmail.comeric.auger \
--cc=christoffer.dall@arm.com \
--cc=eric.auger@redhat.com \
--cc=marc.zyngier@arm.com \
--cc=peter.maydell@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox