qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <ajones@ventanamicro.com>
To: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
	greentime.hu@sifive.com,  vincent.chen@sifive.com,
	frank.chang@sifive.com, jim.shu@sifive.com,
	 Alistair Francis <alistair.francis@wdc.com>,
	Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Subject: Re: [PATCH v2 7/8] docs: update the description about RISC-V AIA
Date: Fri, 28 Feb 2025 14:33:14 +0100	[thread overview]
Message-ID: <20250228-2444e574d55bf88c1427e28b@orel> (raw)
In-Reply-To: <20250224082417.31382-8-yongxuan.wang@sifive.com>

On Mon, Feb 24, 2025 at 04:24:14PM +0800, Yong-Xuan Wang wrote:
> Add the description about "-accel kvm,kernel-irqchip=off" into
> docs/specs/riscv-aia.rst and docs/system/riscv/virt.rst.
> 
> Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
> ---
>  docs/specs/riscv-aia.rst   | 24 ++++++++++++++++++------
>  docs/system/riscv/virt.rst | 10 ++++++----
>  2 files changed, 24 insertions(+), 10 deletions(-)
> 
> diff --git a/docs/specs/riscv-aia.rst b/docs/specs/riscv-aia.rst
> index 8097e2f89744..38797cca4998 100644
> --- a/docs/specs/riscv-aia.rst
> +++ b/docs/specs/riscv-aia.rst
> @@ -25,11 +25,16 @@ When running KVM:
>  - no m-mode is provided, so there is no m-mode APLIC or IMSIC emulation regardless of
>    the AIA mode chosen
>  - with "aia=aplic", s-mode APLIC will be emulated by userspace
> -- with "aia=aplic-imsic" there are two possibilities.  If no additional KVM option
> -  is provided there will be no APLIC or IMSIC emulation in userspace, and the virtual
> -  machine will use the provided in-kernel APLIC and IMSIC controllers.  If the user
> -  chooses to use the irqchip in split mode via "-accel kvm,kernel-irqchip=split",
> -  s-mode APLIC will be emulated while using the s-mode IMSIC from the irqchip
> +- with "aia=aplic-imsic" there are three possibilities.
> +    - If no additional KVM option is provided there will be no APLIC or IMSIC emulation
> +      in userspace, and the virtual machine will use the provided in-kernel APLIC and
> +      IMSIC controllers.
> +    - If the user chooses to use the irqchip in split mode via
> +      "-accel kvm,kernel-irqchip=split", s-mode APLIC will be emulated while using
> +      the s-mode IMSIC from the irqchip.
> +    - If the user disables the in-kernel irqchip via "-accel kvm,kernel-irqchip=off",
> +      both s-mode APLIC and IMSIC controller will be emulated.
> +
>  
>  The following table summarizes how the AIA and accelerator options defines what
>  we will emulate in userspace:
> @@ -75,9 +80,16 @@ we will emulate in userspace:
>       - in-kernel
>       - in-kernel
>     * - kvm
> -     - irqchip=split
> +     - kernel-irqchip=split
>       - aplic-imsic
>       - n/a
>       - n/a
>       - emul
>       - in-kernel
> +   * - kvm
> +     - kernel-irqchip=off
> +     - aplic-imsic
> +     - n/a
> +     - n/a
> +     - emul
> +     - emul
> diff --git a/docs/system/riscv/virt.rst b/docs/system/riscv/virt.rst
> index 60850970ce83..96d7ee1ebc64 100644
> --- a/docs/system/riscv/virt.rst
> +++ b/docs/system/riscv/virt.rst
> @@ -129,12 +129,14 @@ The following machine-specific options are supported:
>    MSIs. When not specified, this option is assumed to be "none" which selects
>    SiFive PLIC to handle wired interrupts.
>  
> -  This option also interacts with '-accel kvm'.  When using "aia=aplic-imsic"
> -  with KVM, it is possible to set the use of the kernel irqchip in split mode
> +  This option also interacts with '-accel kvm', when using "aia=aplic-imsic"
> +  with KVM.  It is possible to set the use of the kernel irqchip in split mode
>    by using "-accel kvm,kernel-irqchip=split".  In this case the ``virt`` machine
>    will emulate the APLIC controller instead of using the APLIC controller from
> -  the irqchip.  See :ref:`riscv-aia` for more details on all available AIA
> -  modes.
> +  the in-kernel irqchip. Or the kernel irqchip can be disabled by using
> +  "-accel kvm,kernel-irqchip=off". In this case the ``virt`` machine will
> +  emulate the APLIC and IMSIC controller in user-space instead of using in-kernel
> +  irqchip.  See :ref:`riscv-aia` for more details on all available AIA modes.
>  
>  - aia-guests=nnn
>  
> -- 
> 2.17.1
> 
>

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>


  reply	other threads:[~2025-02-28 13:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24  8:24 [PATCH v2 0/8] riscv: AIA: kernel-irqchip=off support Yong-Xuan Wang
2025-02-24  8:24 ` [PATCH v2 1/8] target/riscv/kvm: rewrite get/set for KVM_REG_RISCV_CSR Yong-Xuan Wang
2025-02-28 13:10   ` Andrew Jones
2025-02-24  8:24 ` [PATCH v2 2/8] target/riscv/kvm: add KVM_REG_RISCV_CSR_AIA Yong-Xuan Wang
2025-02-28 13:18   ` Andrew Jones
2025-02-24  8:24 ` [PATCH v2 3/8] target/riscv/kvm: add KVM_REG_RISCV_CSR_SMSTATEEN Yong-Xuan Wang
2025-02-28 13:21   ` Andrew Jones
2025-02-24  8:24 ` [PATCH v2 4/8] target/riscv: add helper to get CSR name Yong-Xuan Wang
2025-02-28 13:23   ` Andrew Jones
2025-02-24  8:24 ` [PATCH v2 5/8] target/riscv/kvm: rewrite kvm_riscv_handle_csr Yong-Xuan Wang
2025-03-04 15:45   ` Andrew Jones
2025-02-24  8:24 ` [PATCH v2 6/8] target/riscv/kvm: add CSR_SIREG and CSR_STOPEI emulation Yong-Xuan Wang
2025-03-04 15:52   ` Andrew Jones
2025-02-24  8:24 ` [PATCH v2 7/8] docs: update the description about RISC-V AIA Yong-Xuan Wang
2025-02-28 13:33   ` Andrew Jones [this message]
2025-02-24  8:24 ` [PATCH v2 8/8] hw/intc/imsic: prevent to use IMSIC when host doesn't support AIA extension Yong-Xuan Wang
2025-02-28 13:36   ` Andrew Jones
2025-03-03 19:19 ` [PATCH v2 0/8] riscv: AIA: kernel-irqchip=off support Kashyap Chamarthy

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=20250228-2444e574d55bf88c1427e28b@orel \
    --to=ajones@ventanamicro.com \
    --cc=alistair.francis@wdc.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=frank.chang@sifive.com \
    --cc=greentime.hu@sifive.com \
    --cc=jim.shu@sifive.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=vincent.chen@sifive.com \
    --cc=yongxuan.wang@sifive.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).