qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
	alistair.francis@wdc.com,  bmeng@tinylab.org,
	liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com,
	 palmer@rivosinc.com
Subject: Re: [PATCH for-10.0 7/7] docs/specs: add riscv-iommu-sys information
Date: Tue, 19 Nov 2024 12:17:35 +1000	[thread overview]
Message-ID: <CAKmqyKPg8RibBZ_jOvcp1o5zgPk20YvszgusznFubTZUw3RKbQ@mail.gmail.com> (raw)
In-Reply-To: <20241106133407.604587-8-dbarboza@ventanamicro.com>

On Wed, Nov 6, 2024 at 11:35 PM Daniel Henrique Barboza
<dbarboza@ventanamicro.com> wrote:
>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  docs/specs/riscv-iommu.rst | 30 +++++++++++++++++++++++++++---
>  docs/system/riscv/virt.rst | 10 ++++++++++
>  2 files changed, 37 insertions(+), 3 deletions(-)
>
> diff --git a/docs/specs/riscv-iommu.rst b/docs/specs/riscv-iommu.rst
> index 463f4cffb6..b1538c9ead 100644
> --- a/docs/specs/riscv-iommu.rst
> +++ b/docs/specs/riscv-iommu.rst
> @@ -6,9 +6,9 @@ RISC-V IOMMU support for RISC-V machines
>  QEMU implements a RISC-V IOMMU emulation based on the RISC-V IOMMU spec
>  version 1.0 `iommu1.0`_.
>
> -The emulation includes a PCI reference device, riscv-iommu-pci, that QEMU
> -RISC-V boards can use.  The 'virt' RISC-V machine is compatible with this
> -device.
> +The emulation includes a PCI reference device (riscv-iommu-pci) and a platform
> +bus device (riscv-iommu-sys) that QEMU RISC-V boards can use.  The 'virt'
> +RISC-V machine is compatible with both devices.
>
>  riscv-iommu-pci reference device
>  --------------------------------
> @@ -83,6 +83,30 @@ Several options are available to control the capabilities of the device, namely:
>  - "s-stage": enable s-stage support
>  - "g-stage": enable g-stage support
>
> +riscv-iommu-sys device
> +----------------------
> +
> +This device implements the RISC-V IOMMU emulation as a platform bus device that
> +RISC-V boards can use.
> +
> +For the 'virt' board the device is disabled by default.  To enable it use the
> +'iommu-sys' machine option:
> +
> +.. code-block:: bash
> +
> +  $ qemu-system-riscv64 -M virt,iommu-sys=on (...)
> +
> +There is no options to configure the capabilities of this device in the 'virt'
> +board using the QEMU command line.  The device is configured with the following
> +riscv-iommu options:
> +
> +- "ioatc-limit": default value (2Mb)
> +- "intremap": enabled
> +- "ats": enabled
> +- "off": on (DMA disabled)
> +- "s-stage": enabled
> +- "g-stage": enabled
> +
>  .. _iommu1.0: https://github.com/riscv-non-isa/riscv-iommu/releases/download/v1.0/riscv-iommu.pdf
>
>  .. _linux-v8: https://lore.kernel.org/linux-riscv/cover.1718388908.git.tjeznach@rivosinc.com/
> diff --git a/docs/system/riscv/virt.rst b/docs/system/riscv/virt.rst
> index 8e9a2e4dda..537aac0340 100644
> --- a/docs/system/riscv/virt.rst
> +++ b/docs/system/riscv/virt.rst
> @@ -94,6 +94,12 @@ command line:
>
>    $ qemu-system-riscv64 -M virt -device riscv-iommu-pci (...)
>
> +It also has support for the riscv-iommu-sys platform device:
> +
> +.. code-block:: bash
> +
> +  $ qemu-system-riscv64 -M virt,iommu-sys=on (...)
> +
>  Refer to :ref:`riscv-iommu` for more information on how the RISC-V IOMMU support
>  works.
>
> @@ -129,6 +135,10 @@ The following machine-specific options are supported:
>    having AIA IMSIC (i.e. "aia=aplic-imsic" selected). When not specified,
>    the default number of per-HART VS-level AIA IMSIC pages is 0.
>
> +- iommu-sys=[on|off]
> +
> +  Enables the riscv-iommu-sys platform device. Defaults to 'off'.
> +
>  Running Linux kernel
>  --------------------
>
> --
> 2.45.2
>
>


  reply	other threads:[~2024-11-19  2:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 13:34 [PATCH for-10.0 0/7] hw/riscv: riscv-iommu-sys device Daniel Henrique Barboza
2024-11-06 13:34 ` [PATCH for-10.0 1/7] hw/riscv/riscv-iommu.c: add riscv_iommu_instance_init() Daniel Henrique Barboza
2024-11-19  1:21   ` Alistair Francis
2024-11-06 13:34 ` [PATCH for-10.0 2/7] hw/riscv/riscv-iommu: parametrize CAP.IGS Daniel Henrique Barboza
2024-11-19  1:23   ` Alistair Francis
2024-11-06 13:34 ` [PATCH for-10.0 3/7] hw/riscv: add riscv-iommu-sys platform device Daniel Henrique Barboza
2024-11-19  1:27   ` Alistair Francis
2024-11-06 13:34 ` [PATCH for-10.0 4/7] hw/riscv/virt: Add IOMMU as platform device if the option is set Daniel Henrique Barboza
2024-11-19  1:40   ` Alistair Francis
2024-11-06 13:34 ` [PATCH for-10.0 5/7] hw/riscv/virt.c, riscv-iommu-sys.c: add MSIx support Daniel Henrique Barboza
2024-11-19  2:13   ` Alistair Francis
2024-11-06 13:34 ` [PATCH for-10.0 6/7] hw/riscv/riscv-iommu: implement reset protocol Daniel Henrique Barboza
2024-11-19  2:16   ` Alistair Francis
2024-11-06 13:34 ` [PATCH for-10.0 7/7] docs/specs: add riscv-iommu-sys information Daniel Henrique Barboza
2024-11-19  2:17   ` Alistair Francis [this message]
2024-11-06 17:58 ` [PATCH for-10.0 0/7] hw/riscv: riscv-iommu-sys device Andrew Jones
2024-11-19  2:51 ` Alistair Francis

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=CAKmqyKPg8RibBZ_jOvcp1o5zgPk20YvszgusznFubTZUw3RKbQ@mail.gmail.com \
    --to=alistair23@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=bmeng@tinylab.org \
    --cc=dbarboza@ventanamicro.com \
    --cc=liwei1518@gmail.com \
    --cc=palmer@rivosinc.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=zhiwei_liu@linux.alibaba.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 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).