[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/39] docs/specs: add riscv-iommu-sys information
From: |
Alistair Francis |
Subject: |
[PULL 09/39] docs/specs: add riscv-iommu-sys information |
Date: |
Thu, 19 Dec 2024 08:29:39 +1000 |
From: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241106133407.604587-8-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
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.47.1
- [PULL 00/39] riscv-to-apply queue, Alistair Francis, 2024/12/18
- [PULL 01/39] hw/riscv/riscv-iommu.c: Correct the validness check of iova, Alistair Francis, 2024/12/18
- [PULL 02/39] hw/intc/riscv_aplic: Fix APLIC in_clrip and clripnum write emulation, Alistair Francis, 2024/12/18
- [PULL 03/39] hw/riscv/riscv-iommu.c: add riscv_iommu_instance_init(), Alistair Francis, 2024/12/18
- [PULL 04/39] hw/riscv/riscv-iommu: parametrize CAP.IGS, Alistair Francis, 2024/12/18
- [PULL 07/39] hw/riscv/virt.c, riscv-iommu-sys.c: add MSIx support, Alistair Francis, 2024/12/18
- [PULL 05/39] hw/riscv: add riscv-iommu-sys platform device, Alistair Francis, 2024/12/18
- [PULL 06/39] hw/riscv/virt: Add IOMMU as platform device if the option is set, Alistair Francis, 2024/12/18
- [PULL 11/39] hw/intc/riscv_aplic: rename is_kvm_aia(), Alistair Francis, 2024/12/18
- [PULL 09/39] docs/specs: add riscv-iommu-sys information,
Alistair Francis <=
- [PULL 12/39] hw/riscv/virt.c: reduce virt_use_kvm_aia() usage, Alistair Francis, 2024/12/18
- [PULL 10/39] target/riscv: Add Tenstorrent Ascalon CPU, Alistair Francis, 2024/12/18
- [PULL 08/39] hw/riscv/riscv-iommu: implement reset protocol, Alistair Francis, 2024/12/18
- [PULL 13/39] hw/riscv/virt.c: rename helper to virt_use_kvm_aia_aplic_imsic(), Alistair Francis, 2024/12/18
- [PULL 15/39] hw/riscv/virt.c, riscv_aplic.c: add 'emulated_aplic' helpers, Alistair Francis, 2024/12/18
- [PULL 16/39] hw/intc/riscv_aplic: add kvm_msicfgaddr for split mode aplic-imsic, Alistair Francis, 2024/12/18
- [PULL 14/39] target/riscv/kvm: consider irqchip_split() in aia_create(), Alistair Francis, 2024/12/18
- [PULL 21/39] hw/acpi: Upgrade ACPI SPCR table to support SPCR table revision 4 format, Alistair Francis, 2024/12/18
- [PULL 24/39] hw/char/riscv_htif: Explicit little-endian implementation, Alistair Francis, 2024/12/18
- [PULL 32/39] target/riscv: Check memory access to meet svukte rule, Alistair Francis, 2024/12/18