From: Donald Dutile <ddutile@redhat.com>
To: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: eric.auger@redhat.com, peter.maydell@linaro.org, jgg@nvidia.com,
nicolinc@nvidia.com, berrange@redhat.com, nathanc@nvidia.com,
mochs@nvidia.com, smostafa@google.com, linuxarm@huawei.com,
wangzhou1@hisilicon.com, jiangkunkun@huawei.com,
jonathan.cameron@huawei.com, zhangfei.gao@linaro.org
Subject: Re: [PATCH 0/5] Add support for user creatable SMMUv3 device
Date: Fri, 18 Apr 2025 16:34:22 -0400 [thread overview]
Message-ID: <84870c74-f078-48c5-bead-96db1d582987@redhat.com> (raw)
In-Reply-To: <20250415081104.71708-1-shameerali.kolothum.thodi@huawei.com>
Shameer,
Hi!
First off, like the partitioning of these pieces.
On 4/15/25 4:10 AM, Shameer Kolothum wrote:
> Hi All,
>
> This patch series introduces support for a user-creatable SMMUv3 device
> (-device arm-smmuv3-dev) in QEMU.
>
Can we drop the '-dev', as 'arm-smmu' is sufficient, as is '-device'?
I know, internal to QEMU, there's already an ARM_SMMU, but as suggested later,
if it uses the same struct, the qemu cmdline syntax is a bit less redundant.
> The implementation is based on feedback received from the RFCv2[0]:
> "hw/arm/virt: Add support for user-creatable accelerated SMMUv3"
>
> Currently, QEMU's SMMUv3 emulation (iommu=smmuv3) is tied to the machine
> and does not support instantiating multiple SMMUv3 devices—each associated
> with a separate PCIe root complex. In contrast, real-world ARM systems
> often include multiple SMMUv3 instances, each bound to a different PCIe
> root complex.
>
> This also lays the groundwork for supporting accelerated SMMUv3, as
> proposed in the aforementioned RFC. Please note, the accelerated SMMUv3
> support is not part of this series and will be sent out as a separate
> series later on top of this one.
>
> Summary of changes:
>
> -Introduces support for multiple -device arm-smmuv3-dev,bus=pcie.x
> instances.
>
> Example usage:
>
> -device arm-smmuv3-dev,bus=pcie.0
> -device virtio-net-pci,bus=pcie.0
> -device pxb-pcie,id=pcie.1,bus_nr=2
> -device arm-smmuv3-dev,bus=pcie.1
> -device pcie-root-port,id=pcie.port1,bus=pcie.1
> -device virtio-net-pci,bus=pcie.port1
>
> -Supports either the legacy iommu=smmuv3 option or the new
> "-device arm-smmuv3-dev" model.
>
nice! :)
Can it support both? i.e., some devices using a system-wide, legacy smmuv3,
and some pcie devices using the -device arm-smmuv3 ?
If not, then add a check to min-warn or max-fail, that config.
I can see old machines being converted/upgraded to new machines,
and they will want to switch from legacy->device smmuv3, and catching
an edit/update to a machine change (or enabling automated conversion) would be helpful.
> -Adds device tree bindings for the new SMMUv3 device on the arm/virt
> machine only, and only for the default pcie.0 root complex.
> (Note: pxb-pcie root complexes are currently not supported with the
> device tree due to known limitations[1].)
> -Restricts usage of the new SMMUv3 device to virt machine versions > 9.2.
> This is to avoid creating new smmuv3 device for old virt machine versions
> and accidently breaking the migration support.
>
> Please take a look and let me know your feedback.
>
> Thanks,
> Shameer
> [0]:https://lore.kernel.org/qemu-devel/20250311141045.66620-1-shameerali.kolothum.thodi@huawei.com/
> [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-Jonathan.Cameron@huawei.com/
>
> Shameer Kolothum (5):
> hw/arm/smmuv3: Introduce SMMUv3 device
> hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices
> hw/arm/virt: Factor out common SMMUV3 dt bindings code
> hw/arm/virt: Add support for smmuv3 device
> hw/arm/smmuv3: Enable smmuv3 device creation
>
> hw/arm/smmuv3.c | 55 ++++++++++++++++++
> hw/arm/virt-acpi-build.c | 119 +++++++++++++++++++++++++++++++++++----
> hw/arm/virt.c | 109 ++++++++++++++++++++++++++---------
> hw/core/sysbus-fdt.c | 3 +
> include/hw/arm/smmuv3.h | 16 ++++++
> include/hw/arm/virt.h | 2 +
> 6 files changed, 266 insertions(+), 38 deletions(-)
>
next prev parent reply other threads:[~2025-04-18 20:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 8:10 [PATCH 0/5] Add support for user creatable SMMUv3 device Shameer Kolothum via
2025-04-15 8:11 ` [PATCH 1/5] hw/arm/smmuv3: Introduce " Shameer Kolothum via
[not found] ` <Z/8m8cFLY1vEjHpA@Asurada-Nvidia>
2025-04-16 5:32 ` Shameerali Kolothum Thodi via
2025-04-15 8:11 ` [PATCH 2/5] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices Shameer Kolothum via
[not found] ` <Z/8vzf/q24sZOdBG@Asurada-Nvidia>
2025-04-16 5:38 ` Shameerali Kolothum Thodi via
2025-04-18 20:34 ` Donald Dutile
2025-04-22 8:43 ` Shameerali Kolothum Thodi via
2025-04-15 8:11 ` [PATCH 3/5] hw/arm/virt: Factor out common SMMUV3 dt bindings code Shameer Kolothum via
[not found] ` <Z/8xSljew92Hhh99@Asurada-Nvidia>
2025-04-16 5:54 ` Shameerali Kolothum Thodi via
2025-04-15 8:11 ` [PATCH 4/5] hw/arm/virt: Add support for smmuv3 device Shameer Kolothum via
2025-04-15 9:25 ` Jonathan Cameron via
2025-04-15 9:28 ` Shameerali Kolothum Thodi via
2025-04-15 9:30 ` Daniel P. Berrangé
2025-04-15 8:11 ` [PATCH 5/5] hw/arm/smmuv3: Enable smmuv3 device creation Shameer Kolothum via
2025-04-18 20:34 ` Donald Dutile [this message]
2025-04-22 8:57 ` [PATCH 0/5] Add support for user creatable SMMUv3 device Shameerali Kolothum Thodi via
2025-04-28 18:41 ` Donald Dutile
2025-04-30 17:47 ` Eric Auger
2025-05-01 9:37 ` Shameerali Kolothum Thodi via
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=84870c74-f078-48c5-bead-96db1d582987@redhat.com \
--to=ddutile@redhat.com \
--cc=berrange@redhat.com \
--cc=eric.auger@redhat.com \
--cc=jgg@nvidia.com \
--cc=jiangkunkun@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linuxarm@huawei.com \
--cc=mochs@nvidia.com \
--cc=nathanc@nvidia.com \
--cc=nicolinc@nvidia.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=smostafa@google.com \
--cc=wangzhou1@hisilicon.com \
--cc=zhangfei.gao@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;
as well as URLs for NNTP newsgroup(s).