qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3
@ 2025-10-24  8:43 Shameer Kolothum
  2025-10-27 11:27 ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Shameer Kolothum @ 2025-10-24  8:43 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: eric.auger, peter.maydell, nicolinc, ddutile, nathanc, mochs,
	jonathan.cameron

The virt machine now supports creating multiple SMMUv3 instances, each
associated with a separate PCIe root complex.

Update the documentation with an example.

Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
---
 Addressed feedback from v1.(Thanks!).
 https://lore.kernel.org/qemu-devel/20251006182900.100580-1-skolothumtho@nvidia.com/
---
 docs/system/arm/virt.rst | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst
index 10cbffc8a7..339aa99ae1 100644
--- a/docs/system/arm/virt.rst
+++ b/docs/system/arm/virt.rst
@@ -37,7 +37,8 @@ The virt board supports:
 - An RTC
 - The fw_cfg device that allows a guest to obtain data from QEMU
 - A PL061 GPIO controller
-- An optional SMMUv3 IOMMU
+- An optional machine-wide SMMUv3 IOMMU
+- User-creatable SMMUv3 devices (see below for example)
 - hotpluggable DIMMs
 - hotpluggable NVDIMMs
 - An MSI controller (GICv2M or ITS). GICv2M is selected by default along
@@ -176,7 +177,7 @@ iommu
   ``none``
     Don't create an IOMMU (the default)
   ``smmuv3``
-    Create an SMMUv3
+    Create a machine-wide SMMUv3.
 
 default-bus-bypass-iommu
   Set ``on``/``off`` to enable/disable `bypass_iommu
@@ -219,6 +220,35 @@ x-oem-table-id
   Set string (up to 8 bytes) to override the default value of field OEM Table ID
   in ACPI table header.
 
+SMMU configuration
+""""""""""""""""""
+
+Machine-wide SMMUv3 IOMMU
+  See the machine-specific ``iommu`` option above. This allows specifying
+  a single, machine-wide SMMUv3 instance that applies to all devices in
+  the PCIe topology.
+
+  For information about selectively bypassing devices, refer to
+  ``docs/bypass-iommu.txt``.
+
+User-creatable SMMUv3 devices
+  Allows creating multiple user-defined SMMUv3 devices, each associated
+  with a separate PCIe root complex. This is only permitted if the
+  machine-wide SMMUv3 (``iommu=smmuv3``) option is not used.
+
+  This model is useful when you want to mirror a host configuration where
+  each NUMA node typically has its own SMMU, allowing the VM topology to
+  align more closely with the host’s hardware layout. Supporting multiple
+  SMMUv3 instances is also a prerequisite for future accelerated SMMUv3
+  support.
+
+  Example::
+
+      -device arm-smmuv3,primary-bus=pcie.0,id=smmuv3.0
+      ...
+      -device pxb-pcie,id=pcie.1,numa_node=1
+      -device arm-smmuv3,primary-bus=pcie.1,id=smmuv3.1
+
 Linux guest kernel configuration
 """"""""""""""""""""""""""""""""
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3
  2025-10-24  8:43 [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3 Shameer Kolothum
@ 2025-10-27 11:27 ` Peter Maydell
  2025-10-27 12:00   ` Shameer Kolothum
  2025-10-27 14:13   ` Eric Auger
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Maydell @ 2025-10-27 11:27 UTC (permalink / raw)
  To: Shameer Kolothum
  Cc: qemu-arm, qemu-devel, eric.auger, nicolinc, ddutile, nathanc,
	mochs, jonathan.cameron

On Fri, 24 Oct 2025 at 09:46, Shameer Kolothum <skolothumtho@nvidia.com> wrote:
>
> The virt machine now supports creating multiple SMMUv3 instances, each
> associated with a separate PCIe root complex.
>
> Update the documentation with an example.
>
> Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>

Thanks. I have some minor word-smithing tweaks, but I'll just
apply them to this patch in target-arm.next if you're OK with
that:


--- a/docs/system/arm/virt.rst
+++ b/docs/system/arm/virt.rst
@@ -224,23 +224,24 @@ SMMU configuration
 """"""""""""""""""

 Machine-wide SMMUv3 IOMMU
-  See the machine-specific ``iommu`` option above. This allows specifying
-  a single, machine-wide SMMUv3 instance that applies to all devices in
-  the PCIe topology.
+  Setting the machine-specific option ``iommu=smmuv3`` causes QEMU to
+  create a single, machine-wide SMMUv3 instance that applies to all
+  devices in the PCIe topology.

   For information about selectively bypassing devices, refer to
   ``docs/bypass-iommu.txt``.

 User-creatable SMMUv3 devices
-  Allows creating multiple user-defined SMMUv3 devices, each associated
-  with a separate PCIe root complex. This is only permitted if the
-  machine-wide SMMUv3 (``iommu=smmuv3``) option is not used.
+  You can use the ``-device arm-smmuv3`` option to create multiple
+  user-defined SMMUv3 devices, each associated with a separate PCIe
+  root complex. This is only permitted if the machine-wide SMMUv3
+  (``iommu=smmuv3``) option is not used. Each ``arm-smmuv3`` device
+  uses the ``primary-bus`` sub-option to specify which PCIe root
+  complex it is associated with.

   This model is useful when you want to mirror a host configuration where
   each NUMA node typically has its own SMMU, allowing the VM topology to
-  align more closely with the host’s hardware layout. Supporting multiple
-  SMMUv3 instances is also a prerequisite for future accelerated SMMUv3
-  support.
+  align more closely with the host’s hardware layout.

   Example::




(I deleted the sentence about SMMU acceleration because that
isn't upstream yet. When it lands then we can update the
docs if the version of it that lands can't support acceleration
of a single machine-wide accelerator.)

thanks
-- PMM


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3
  2025-10-27 11:27 ` Peter Maydell
@ 2025-10-27 12:00   ` Shameer Kolothum
  2025-10-27 14:13   ` Eric Auger
  1 sibling, 0 replies; 7+ messages in thread
From: Shameer Kolothum @ 2025-10-27 12:00 UTC (permalink / raw)
  To: Peter Maydell
  Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, eric.auger@redhat.com,
	Nicolin Chen, ddutile@redhat.com, Nathan Chen, Matt Ochs,
	jonathan.cameron@huawei.com



> -----Original Message-----
> From: Peter Maydell <peter.maydell@linaro.org>
> Sent: 27 October 2025 11:28
> To: Shameer Kolothum <skolothumtho@nvidia.com>
> Cc: qemu-arm@nongnu.org; qemu-devel@nongnu.org;
> eric.auger@redhat.com; Nicolin Chen <nicolinc@nvidia.com>;
> ddutile@redhat.com; Nathan Chen <nathanc@nvidia.com>; Matt Ochs
> <mochs@nvidia.com>; jonathan.cameron@huawei.com
> Subject: Re: [PATCH v2] docs/system/arm/virt: Document user-creatable
> SMMUv3
> 
> External email: Use caution opening links or attachments
> 
> 
> On Fri, 24 Oct 2025 at 09:46, Shameer Kolothum
> <skolothumtho@nvidia.com> wrote:
> >
> > The virt machine now supports creating multiple SMMUv3 instances, each
> > associated with a separate PCIe root complex.
> >
> > Update the documentation with an example.
> >
> > Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
> 
> Thanks. I have some minor word-smithing tweaks, but I'll just
> apply them to this patch in target-arm.next if you're OK with
> that:
> 
> 
> --- a/docs/system/arm/virt.rst
> +++ b/docs/system/arm/virt.rst
> @@ -224,23 +224,24 @@ SMMU configuration
>  """"""""""""""""""
> 
>  Machine-wide SMMUv3 IOMMU
> -  See the machine-specific ``iommu`` option above. This allows specifying
> -  a single, machine-wide SMMUv3 instance that applies to all devices in
> -  the PCIe topology.
> +  Setting the machine-specific option ``iommu=smmuv3`` causes QEMU to
> +  create a single, machine-wide SMMUv3 instance that applies to all
> +  devices in the PCIe topology.
> 
>    For information about selectively bypassing devices, refer to
>    ``docs/bypass-iommu.txt``.
> 
>  User-creatable SMMUv3 devices
> -  Allows creating multiple user-defined SMMUv3 devices, each associated
> -  with a separate PCIe root complex. This is only permitted if the
> -  machine-wide SMMUv3 (``iommu=smmuv3``) option is not used.
> +  You can use the ``-device arm-smmuv3`` option to create multiple
> +  user-defined SMMUv3 devices, each associated with a separate PCIe
> +  root complex. This is only permitted if the machine-wide SMMUv3
> +  (``iommu=smmuv3``) option is not used. Each ``arm-smmuv3`` device
> +  uses the ``primary-bus`` sub-option to specify which PCIe root
> +  complex it is associated with.
> 
>    This model is useful when you want to mirror a host configuration where
>    each NUMA node typically has its own SMMU, allowing the VM topology to
> -  align more closely with the host’s hardware layout. Supporting multiple
> -  SMMUv3 instances is also a prerequisite for future accelerated SMMUv3
> -  support.
> +  align more closely with the host’s hardware layout.
> 
>    Example::
> 
> 
> 
> 
> (I deleted the sentence about SMMU acceleration because that
> isn't upstream yet. When it lands then we can update the
> docs if the version of it that lands can't support acceleration
> of a single machine-wide accelerator.)

Ok. The changes look fine to me.

Thanks,
Shameer


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3
  2025-10-27 11:27 ` Peter Maydell
  2025-10-27 12:00   ` Shameer Kolothum
@ 2025-10-27 14:13   ` Eric Auger
  2025-10-28  2:13     ` Donald Dutile
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Auger @ 2025-10-27 14:13 UTC (permalink / raw)
  To: Peter Maydell, Shameer Kolothum
  Cc: qemu-arm, qemu-devel, nicolinc, ddutile, nathanc, mochs,
	jonathan.cameron



On 10/27/25 12:27 PM, Peter Maydell wrote:
> On Fri, 24 Oct 2025 at 09:46, Shameer Kolothum <skolothumtho@nvidia.com> wrote:
>> The virt machine now supports creating multiple SMMUv3 instances, each
>> associated with a separate PCIe root complex.
>>
>> Update the documentation with an example.
>>
>> Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
> Thanks. I have some minor word-smithing tweaks, but I'll just
> apply them to this patch in target-arm.next if you're OK with
> that:
>
>
> --- a/docs/system/arm/virt.rst
> +++ b/docs/system/arm/virt.rst
> @@ -224,23 +224,24 @@ SMMU configuration
>  """"""""""""""""""
>
>  Machine-wide SMMUv3 IOMMU
> -  See the machine-specific ``iommu`` option above. This allows specifying
> -  a single, machine-wide SMMUv3 instance that applies to all devices in
> -  the PCIe topology.
> +  Setting the machine-specific option ``iommu=smmuv3`` causes QEMU to
> +  create a single, machine-wide SMMUv3 instance that applies to all
> +  devices in the PCIe topology.
>
>    For information about selectively bypassing devices, refer to
>    ``docs/bypass-iommu.txt``.
>
>  User-creatable SMMUv3 devices
> -  Allows creating multiple user-defined SMMUv3 devices, each associated
> -  with a separate PCIe root complex. This is only permitted if the
> -  machine-wide SMMUv3 (``iommu=smmuv3``) option is not used.
> +  You can use the ``-device arm-smmuv3`` option to create multiple
> +  user-defined SMMUv3 devices, each associated with a separate PCIe
> +  root complex. This is only permitted if the machine-wide SMMUv3
> +  (``iommu=smmuv3``) option is not used. Each ``arm-smmuv3`` device
> +  uses the ``primary-bus`` sub-option to specify which PCIe root
> +  complex it is associated with.
>
>    This model is useful when you want to mirror a host configuration where
>    each NUMA node typically has its own SMMU, allowing the VM topology to
> -  align more closely with the host’s hardware layout. Supporting multiple
> -  SMMUv3 instances is also a prerequisite for future accelerated SMMUv3
> -  support.
> +  align more closely with the host’s hardware layout.
>
>    Example::
>
>
>
>
> (I deleted the sentence about SMMU acceleration because that
> isn't upstream yet. When it lands then we can update the
> docs if the version of it that lands can't support acceleration
> of a single machine-wide accelerator.)
>
> thanks
> -- PMM
>
Looks good to me as well

Fell free to add my R-b

Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks!

Eric






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3
  2025-10-27 14:13   ` Eric Auger
@ 2025-10-28  2:13     ` Donald Dutile
  2025-10-28  5:35       ` Markus Armbruster
  0 siblings, 1 reply; 7+ messages in thread
From: Donald Dutile @ 2025-10-28  2:13 UTC (permalink / raw)
  To: eric.auger, Peter Maydell, Shameer Kolothum
  Cc: qemu-arm, qemu-devel, nicolinc, nathanc, mochs, jonathan.cameron

On 10/27/25 10:13 AM, Eric Auger wrote:
> 
> 
> On 10/27/25 12:27 PM, Peter Maydell wrote:
>> On Fri, 24 Oct 2025 at 09:46, Shameer Kolothum <skolothumtho@nvidia.com> wrote:
>>> The virt machine now supports creating multiple SMMUv3 instances, each
>>> associated with a separate PCIe root complex.
>>>
>>> Update the documentation with an example.
>>>
>>> Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
>> Thanks. I have some minor word-smithing tweaks, but I'll just
>> apply them to this patch in target-arm.next if you're OK with
>> that:
>>
>>
>> --- a/docs/system/arm/virt.rst
>> +++ b/docs/system/arm/virt.rst
>> @@ -224,23 +224,24 @@ SMMU configuration
>>   """"""""""""""""""
>>
>>   Machine-wide SMMUv3 IOMMU
>> -  See the machine-specific ``iommu`` option above. This allows specifying
>> -  a single, machine-wide SMMUv3 instance that applies to all devices in
>> -  the PCIe topology.
>> +  Setting the machine-specific option ``iommu=smmuv3`` causes QEMU to
>> +  create a single, machine-wide SMMUv3 instance that applies to all
>> +  devices in the PCIe topology.
>>
>>     For information about selectively bypassing devices, refer to
>>     ``docs/bypass-iommu.txt``.
>>
>>   User-creatable SMMUv3 devices
>> -  Allows creating multiple user-defined SMMUv3 devices, each associated
>> -  with a separate PCIe root complex. This is only permitted if the
>> -  machine-wide SMMUv3 (``iommu=smmuv3``) option is not used.
>> +  You can use the ``-device arm-smmuv3`` option to create multiple
>> +  user-defined SMMUv3 devices, each associated with a separate PCIe
>> +  root complex. This is only permitted if the machine-wide SMMUv3
>> +  (``iommu=smmuv3``) option is not used. Each ``arm-smmuv3`` device
>> +  uses the ``primary-bus`` sub-option to specify which PCIe root
>> +  complex it is associated with.
>>
>>     This model is useful when you want to mirror a host configuration where
>>     each NUMA node typically has its own SMMU, allowing the VM topology to
>> -  align more closely with the host’s hardware layout. Supporting multiple
>> -  SMMUv3 instances is also a prerequisite for future accelerated SMMUv3
>> -  support.
>> +  align more closely with the host’s hardware layout.
>>
>>     Example::
>>
>>
>>
>>
>> (I deleted the sentence about SMMU acceleration because that
>> isn't upstream yet. When it lands then we can update the
>> docs if the version of it that lands can't support acceleration
>> of a single machine-wide accelerator.)
>>
>> thanks
>> -- PMM
>>
> Looks good to me as well
> 
> Fell free to add my R-b
> 
> Reviewed-by: Eric Auger <eric.auger@redhat.com>
> 
> Thanks!
> 
> Eric
> 
+1; looks good; can add my r-b if another is desired/needed.
- Don
> 
> 
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3
  2025-10-28  2:13     ` Donald Dutile
@ 2025-10-28  5:35       ` Markus Armbruster
  2025-10-29  1:58         ` Donald Dutile
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Armbruster @ 2025-10-28  5:35 UTC (permalink / raw)
  To: Donald Dutile
  Cc: eric.auger, Peter Maydell, Shameer Kolothum, qemu-arm, qemu-devel,
	nicolinc, nathanc, mochs, jonathan.cameron

Donald Dutile <ddutile@redhat.com> writes:

> On 10/27/25 10:13 AM, Eric Auger wrote:

[...]

>> Looks good to me as well
>> Fell free to add my R-b
>> Reviewed-by: Eric Auger <eric.auger@redhat.com>
>> Thanks!
>> Eric
>> 
> +1; looks good; can add my r-b if another is desired/needed.
> - Don

When you put in the review work, claim the review credit!  Suggest you
spell out your R-by.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3
  2025-10-28  5:35       ` Markus Armbruster
@ 2025-10-29  1:58         ` Donald Dutile
  0 siblings, 0 replies; 7+ messages in thread
From: Donald Dutile @ 2025-10-29  1:58 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: eric.auger, Peter Maydell, Shameer Kolothum, qemu-arm, qemu-devel,
	nicolinc, nathanc, mochs, jonathan.cameron

On 10/28/25 1:35 AM, Markus Armbruster wrote:
> Donald Dutile <ddutile@redhat.com> writes:
> 
>> On 10/27/25 10:13 AM, Eric Auger wrote:
> 
> [...]
> 
>>> Looks good to me as well
>>> Fell free to add my R-b
>>> Reviewed-by: Eric Auger <eric.auger@redhat.com>
>>> Thanks!
>>> Eric
>>>
>> +1; looks good; can add my r-b if another is desired/needed.
>> - Don
> 
> When you put in the review work, claim the review credit!  Suggest you
> spell out your R-by.
> 
Trivial doc; I reviewed it previously; Shameer modified it per Peter's suggestion/request.

I added my USD $0.01 ... :-/



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-10-29  2:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24  8:43 [PATCH v2] docs/system/arm/virt: Document user-creatable SMMUv3 Shameer Kolothum
2025-10-27 11:27 ` Peter Maydell
2025-10-27 12:00   ` Shameer Kolothum
2025-10-27 14:13   ` Eric Auger
2025-10-28  2:13     ` Donald Dutile
2025-10-28  5:35       ` Markus Armbruster
2025-10-29  1:58         ` Donald Dutile

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).