From: Donald Dutile <ddutile@redhat.com>
To: Jason Gunthorpe <jgg@nvidia.com>,
acpica-devel@lists.linux.dev, Hanjun Guo <guohanjun@huawei.com>,
iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
Kevin Tian <kevin.tian@intel.com>,
kvm@vger.kernel.org, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Robert Moore <robert.moore@intel.com>,
Robin Murphy <robin.murphy@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Will Deacon <will@kernel.org>
Cc: Alex Williamson <alex.williamson@redhat.com>,
Eric Auger <eric.auger@redhat.com>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
Moritz Fischer <mdf@kernel.org>,
Michael Shavit <mshavit@google.com>,
Nicolin Chen <nicolinc@nvidia.com>,
patches@lists.linux.dev,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
Mostafa Saleh <smostafa@google.com>
Subject: Re: [PATCH v3 0/9] Initial support for SMMUv3 nested translation
Date: Wed, 30 Oct 2024 00:06:08 -0400 [thread overview]
Message-ID: <469bcbeb-97e0-4fc4-9c2b-b86c59dbe24a@redhat.com> (raw)
In-Reply-To: <0-v3-e2e16cd7467f+2a6a1-smmuv3_nesting_jgg@nvidia.com>
On 10/9/24 12:23 PM, Jason Gunthorpe wrote:
> This brings support for the IOMMFD ioctls:
>
> - IOMMU_GET_HW_INFO
> - IOMMU_HWPT_ALLOC_NEST_PARENT
> - IOMMU_DOMAIN_NESTED
> - ops->enforce_cache_coherency()
>
> This is quite straightforward as the nested STE can just be built in the
> special NESTED domain op and fed through the generic update machinery.
>
> The design allows the user provided STE fragment to control several
> aspects of the translation, including putting the STE into a "virtual
> bypass" or a aborting state. This duplicates functionality available by
> other means, but it allows trivially preserving the VMID in the STE as we
> eventually move towards the vIOMMU owning the VMID.
>
> Nesting support requires the system to either support S2FWB or the
> stronger CANWBS ACPI flag. This is to ensure the VM cannot bypass the
> cache and view incoherent data, currently VFIO lacks any cache flushing
> that would make this safe.
>
> Yan has a series to add some of the needed infrastructure for VFIO cache
> flushing here:
>
> https://lore.kernel.org/linux-iommu/20240507061802.20184-1-yan.y.zhao@intel.com/
>
> Which may someday allow relaxing this further.
>
> Remove VFIO_TYPE1_NESTING_IOMMU since it was never used and superseded by
> this.
>
> This is the first series in what will be several to complete nesting
> support. At least:
> - IOMMU_RESV_SW_MSI related fixups
> https://lore.kernel.org/linux-iommu/cover.1722644866.git.nicolinc@nvidia.com/
> - vIOMMU object support to allow ATS and CD invalidations
> https://lore.kernel.org/linux-iommu/cover.1723061377.git.nicolinc@nvidia.com/
> - vCMDQ hypervisor support for direct invalidation queue assignment
> https://lore.kernel.org/linux-iommu/cover.1712978212.git.nicolinc@nvidia.com/
> - KVM pinned VMID using vIOMMU for vBTM
> https://lore.kernel.org/linux-iommu/20240208151837.35068-1-shameerali.kolothum.thodi@huawei.com/
> - Cross instance S2 sharing
> - Virtual Machine Structure using vIOMMU (for vMPAM?)
> - Fault forwarding support through IOMMUFD's fault fd for vSVA
>
> The vIOMMU series is essential to allow the invalidations to be processed
> for the CD as well.
>
> It is enough to allow qemu work to progress.
>
> This is on github: https://github.com/jgunthorpe/linux/commits/smmuv3_nesting
>
> v3:
> - Rebase on v6.12-rc2
> - Revise commit messages
> - Consolidate CANWB checks into arm_smmu_master_canwbs()
> - Add CONFIG_ARM_SMMU_V3_IOMMUFD to compile out iommufd only features
> like nesting
> - Shift code into arm-smmu-v3-iommufd.c
> - Add missed IS_ERR check
> - Add S2FWB to arm_smmu_get_ste_used()
> - Fixup quirks checks
> - Drop ARM_SMMU_FEAT_COHERENCY checks for S2FWB
> - Limit S2FWB to S2 Nesting Parent domains "just in case"
> v2: https://patch.msgid.link/r/0-v2-621370057090+91fec-smmuv3_nesting_jgg@nvidia.com
> - Revise commit messages
> - Guard S2FWB support with ARM_SMMU_FEAT_COHERENCY, since it doesn't make
> sense to use S2FWB to enforce coherency on inherently non-coherent hardware.
> - Add missing IO_PGTABLE_QUIRK_ARM_S2FWB validation
> - Include formal ACPIA commit for IORT built using
> generate/linux/gen-patch.sh
> - Use FEAT_NESTING to block creating a NESTING_PARENT
> - Use an abort STE instead of non-valid if the user requests a non-valid
> vSTE
> - Consistently use 'nest_parent' for naming variables
> - Use the right domain for arm_smmu_remove_master_domain() when it
> removes the master
> - Join bitfields together
> - Drop arm_smmu_cache_invalidate_user patch, invalidation will
> exclusively go via viommu
> v1: https://patch.msgid.link/r/0-v1-54e734311a7f+14f72-smmuv3_nesting_jgg@nvidia.com
>
> Jason Gunthorpe (6):
> vfio: Remove VFIO_TYPE1_NESTING_IOMMU
> iommu/arm-smmu-v3: Report IOMMU_CAP_ENFORCE_CACHE_COHERENCY for CANWBS
> iommu/arm-smmu-v3: Implement IOMMU_HWPT_ALLOC_NEST_PARENT
> iommu/arm-smmu-v3: Expose the arm_smmu_attach interface
> iommu/arm-smmu-v3: Support IOMMU_DOMAIN_NESTED
> iommu/arm-smmu-v3: Use S2FWB for NESTED domains
>
> Nicolin Chen (3):
> ACPICA: IORT: Update for revision E.f
> ACPI/IORT: Support CANWBS memory access flag
> iommu/arm-smmu-v3: Support IOMMU_GET_HW_INFO via struct
> arm_smmu_hw_info
>
> drivers/acpi/arm64/iort.c | 13 ++
> drivers/iommu/Kconfig | 9 +
> drivers/iommu/arm/arm-smmu-v3/Makefile | 1 +
> .../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 204 ++++++++++++++++++
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 114 ++++++----
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 83 ++++++-
> drivers/iommu/arm/arm-smmu/arm-smmu.c | 16 --
> drivers/iommu/io-pgtable-arm.c | 27 ++-
> drivers/iommu/iommu.c | 10 -
> drivers/iommu/iommufd/vfio_compat.c | 7 +-
> drivers/vfio/vfio_iommu_type1.c | 12 +-
> include/acpi/actbl2.h | 3 +-
> include/linux/io-pgtable.h | 2 +
> include/linux/iommu.h | 5 +-
> include/uapi/linux/iommufd.h | 55 +++++
> include/uapi/linux/vfio.h | 2 +-
> 16 files changed, 465 insertions(+), 98 deletions(-)
> create mode 100644 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c
>
>
> base-commit: 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
Apologies for the delay; quite a few spec bits to lookup, as well as some SMMU refresh-ing on my part.
Reviewed-by: Donald Dutile <ddutile@redhat.com>
prev parent reply other threads:[~2024-10-30 4:06 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 16:23 [PATCH v3 0/9] Initial support for SMMUv3 nested translation Jason Gunthorpe
2024-10-09 16:23 ` [PATCH v3 1/9] vfio: Remove VFIO_TYPE1_NESTING_IOMMU Jason Gunthorpe
2024-10-09 16:23 ` [PATCH v3 2/9] ACPICA: IORT: Update for revision E.f Jason Gunthorpe
2024-10-10 1:48 ` Hanjun Guo
2024-10-09 16:23 ` [PATCH v3 3/9] ACPI/IORT: Support CANWBS memory access flag Jason Gunthorpe
2024-10-10 7:45 ` Hanjun Guo
2024-10-24 7:38 ` Tian, Kevin
2024-10-09 16:23 ` [PATCH v3 4/9] iommu/arm-smmu-v3: Report IOMMU_CAP_ENFORCE_CACHE_COHERENCY for CANWBS Jason Gunthorpe
2024-10-24 7:41 ` Tian, Kevin
2024-10-09 16:23 ` [PATCH v3 5/9] iommu/arm-smmu-v3: Support IOMMU_GET_HW_INFO via struct arm_smmu_hw_info Jason Gunthorpe
2024-10-30 16:24 ` Mostafa Saleh
2024-10-30 17:56 ` Jason Gunthorpe
2024-10-30 18:14 ` Nicolin Chen
2024-10-09 16:23 ` [PATCH v3 6/9] iommu/arm-smmu-v3: Implement IOMMU_HWPT_ALLOC_NEST_PARENT Jason Gunthorpe
2024-10-30 16:26 ` Mostafa Saleh
2024-10-09 16:23 ` [PATCH v3 7/9] iommu/arm-smmu-v3: Expose the arm_smmu_attach interface Jason Gunthorpe
2024-10-09 17:03 ` Nicolin Chen
2024-10-24 7:47 ` Tian, Kevin
2024-10-30 16:26 ` Mostafa Saleh
2024-10-09 16:23 ` [PATCH v3 8/9] iommu/arm-smmu-v3: Support IOMMU_DOMAIN_NESTED Jason Gunthorpe
2024-10-09 17:27 ` Nicolin Chen
2024-10-11 13:59 ` Jason Gunthorpe
2024-10-24 7:50 ` Tian, Kevin
2024-10-30 16:29 ` Mostafa Saleh
2024-10-30 23:59 ` Jason Gunthorpe
2024-10-09 16:23 ` [PATCH v3 9/9] iommu/arm-smmu-v3: Use S2FWB for NESTED domains Jason Gunthorpe
2024-10-09 17:42 ` Nicolin Chen
2024-10-11 14:00 ` Jason Gunthorpe
2024-10-24 7:54 ` Tian, Kevin
2024-10-25 14:00 ` Jason Gunthorpe
2024-10-28 2:25 ` Tian, Kevin
2024-10-09 17:46 ` [PATCH v3 0/9] Initial support for SMMUv3 nested translation Nicolin Chen
2024-10-26 20:26 ` Jerry Snitselaar
2024-10-30 4:06 ` Donald Dutile [this message]
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=469bcbeb-97e0-4fc4-9c2b-b86c59dbe24a@redhat.com \
--to=ddutile@redhat.com \
--cc=acpica-devel@lists.linux.dev \
--cc=alex.williamson@redhat.com \
--cc=eric.auger@redhat.com \
--cc=guohanjun@huawei.com \
--cc=iommu@lists.linux.dev \
--cc=jean-philippe@linaro.org \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=mdf@kernel.org \
--cc=mshavit@google.com \
--cc=nicolinc@nvidia.com \
--cc=patches@lists.linux.dev \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=robin.murphy@arm.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=smostafa@google.com \
--cc=sudeep.holla@arm.com \
--cc=will@kernel.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