From nobody Fri Apr 4 21:20:21 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=sifive.com ARC-Seal: i=1; a=rsa-sha256; t=1739780334; cv=none; d=zohomail.com; s=zohoarc; b=IZUXFPtM6C5ECfySMYe7UOkPoWEM3Z0AjRkwz/23oeHlFiCo/Jx2sqqXH4ZR+TyrdkNlrdwwpCIyTJ+VMG/OElp2hUMkDuFLS0+bh3QwcizQlFE6bWjHiZdhn2wftw9LXUT4r7zr+Yft8dMqLBL8u1YHWYfePlg5tjYZNk5ql7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739780334; h=Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Avllbujkgt9jGISnFqk3eNbI7THZ3CoG/MVM08xKPXc=; b=fBSClI9ynO6tJJmS95EtamhTjtuU7mqn1KfXQowKFL0dZh9ukMijAnzT4xgTxAmF5ZC982IWE3tCMq4Th0k0WLWBDnPisAOC45jlvlLxr+BEpnBDF5g1/OaWIsv91uJ67iLWgVi862kzf907T0272FiUOLQ4cpOeJv+82FsV5PA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739780334592264.91693565243577; Mon, 17 Feb 2025 00:18:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjwL6-0002d2-Fx; Mon, 17 Feb 2025 03:18:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjwL2-0002Xc-Si for qemu-devel@nongnu.org; Mon, 17 Feb 2025 03:18:49 -0500 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjwKw-00014N-Gp for qemu-devel@nongnu.org; Mon, 17 Feb 2025 03:18:46 -0500 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6dcdf23b4edso36914666d6.0 for ; Mon, 17 Feb 2025 00:18:42 -0800 (PST) Received: from hsinchu26.internal.sifive.com ([210.176.154.34]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e65d9f38absm49673346d6.88.2025.02.17.00.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 00:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739780321; x=1740385121; darn=nongnu.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=Avllbujkgt9jGISnFqk3eNbI7THZ3CoG/MVM08xKPXc=; b=HjCpZeTZu/x/rZ84zPwHL4UHRcyOpSCQGb2OkG1Qns7zmxmiMfaen4Xx7ohQhUmhyw eKqe9kgcAL2JZ5h9Aw7ixRQv0QVCgt2Wpb1C+HYLToRc43TzIFGyfZoonq7qTgo6gzmw S/xhhx+SlTFmssKrJdno85YaF43FpZOqy6giY1OlNcCghFsF0gi877ep0IYvhYFKe/n0 gaAcyE17Bayp0h/Ak9D4A6ENPgX5yumG0VQCYbNSKJf6CL218isEE80Oj8sLR+pTcrq9 brJadFPcxIEG3GyxZlB8sLnCq2N6MhZYHdG8fZOBqHiFC2c2/mIZbGKOOpVeVVdiL4Pa JK3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739780321; x=1740385121; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Avllbujkgt9jGISnFqk3eNbI7THZ3CoG/MVM08xKPXc=; b=SwoKjdzyiLu/C8WqWiE9SCPF23vs/lngtBPMu3IrdhhJnLtd3bZJ9yExxVzRjhK6rG iOOHDTVTmxqj0ZqgHy1AX7e01SzaBiUtUQd4T5NFu9s8Qu7NgXAChTNMLow4OAjhi+hC Nekp8e5PpoulkW/kxwkYrSXnatgMZ8Zj8/aYVZe+zzFzgQxvjICqQvUWAOGrFzCPJX10 iol3Lvt1/mQFwxPdgDZFLhc6o3zpZwXCaJMgKGO/vyPT39kjchJltgDcEkVeLxDXxtDP i23HUPlCxrn5jS/zEXMD/dFNILH2INkZ+9xOfGqxy0TkrZGRuxJgyOqnYqnq12ZIAvN/ kDkA== X-Gm-Message-State: AOJu0Yxnzzm8B3NlR0ZLl5ypCWDQ/p3WIAErdX6MjKiAhe9fRDbgNy0m MDIXiRdaGaqxwSRo2xqDrNUqjNq+Xzip4sv/uo2Lofbsi7gh/4y+esTlHWvGILFGtC51NYiLRlP vZk5tF9kukhf5M9CYlA3HRBrv2mevSuqQ+Fkuh5bgarcJLe/qPefKrNyNpH11UtUsvNc4uIAKh8 1WWxN7o5rURFhr+d0al9yjdNSgf6oCAcnwt5Wmydr/4Q== X-Gm-Gg: ASbGnctuO7rRW+sWgbp3dvbBN0kkU3SUoXX9RcPvtZMZUtvFlQF7TwJng90p5x36Tdu drCunlEwakA6vxHm0i5eM2CmxzSx3BqOMAuwRrN+Rb572HyUERam867Ly/DzBkEHpsPj6gmPrnn 7pj572hcs5QSfE/T0QXUPKPJJUPTHYpxQXDgobSJZdctjA8htGOgnRjLrU+Jgj7U1Y0FYUfGj33 5JXi/pO9bC4LQxttQ99yZ1honLFtXbnES5+xdFWxsRgxr9aZGxMcmKkElKN3KHtI2Gnn6BuX4OC FibANMgMRdVpRSxpjGTjFhlweTCMBKvciFNtelyF58GgSA== X-Google-Smtp-Source: AGHT+IHisylNRgoOuNrWbD/d5X+eESRzBVFM6AyDkkDeGTsOM1Q1w4iNdFMyFkzeWLLY2UBq8aORzA== X-Received: by 2002:a05:6214:1c4a:b0:6e6:6713:3ea8 with SMTP id 6a1803df08f44-6e66cccc3aemr140345816d6.23.1739780321066; Mon, 17 Feb 2025 00:18:41 -0800 (PST) From: Yong-Xuan Wang To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Cc: greentime.hu@sifive.com, vincent.chen@sifive.com, frank.chang@sifive.com, jim.shu@sifive.com, Yong-Xuan Wang , Alistair Francis , Daniel Henrique Barboza Subject: [PATCH 8/8] docs: update the description about RISC-V AIA Date: Mon, 17 Feb 2025 16:17:28 +0800 Message-Id: <20250217081730.9000-9-yongxuan.wang@sifive.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250217081730.9000-1-yongxuan.wang@sifive.com> References: <20250217081730.9000-1-yongxuan.wang@sifive.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=yongxuan.wang@sifive.com; helo=mail-qv1-xf29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @sifive.com) X-ZM-MESSAGEID: 1739780338519019100 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add the description about "-accel kvm,kernel-irqchip=3Doff" into docs/specs/riscv-aia.rst and docs/system/riscv/virt.rst. Signed-off-by: Yong-Xuan Wang --- 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 re= gardless of the AIA mode chosen - with "aia=3Daplic", s-mode APLIC will be emulated by userspace -- with "aia=3Daplic-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= =3Dsplit", - s-mode APLIC will be emulated while using the s-mode IMSIC from the irqc= hip +- with "aia=3Daplic-imsic" there are three possibilities. + - If no additional KVM option is provided there will be no APLIC or IM= SIC emulation + in userspace, and the virtual machine will use the provided in-kerne= l APLIC and + IMSIC controllers. + - If the user chooses to use the irqchip in split mode via + "-accel kvm,kernel-irqchip=3Dsplit", s-mode APLIC will be emulated w= hile using + the s-mode IMSIC from the irqchip. + - If the user disables the in-kernel irqchip via "-accel kvm,kernel-ir= qchip=3Doff", + both s-mode APLIC and IMSIC controller will be emulated. + =20 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=3Dsplit + - kernel-irqchip=3Dsplit - aplic-imsic - n/a - n/a - emul - in-kernel + * - kvm + - kernel-irqchip=3Doff + - 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 sele= cts SiFive PLIC to handle wired interrupts. =20 - This option also interacts with '-accel kvm'. When using "aia=3Daplic-i= msic" - with KVM, it is possible to set the use of the kernel irqchip in split m= ode + This option also interacts with '-accel kvm', when using "aia=3Daplic-im= sic" + with KVM. It is possible to set the use of the kernel irqchip in split = mode by using "-accel kvm,kernel-irqchip=3Dsplit". 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=3Doff". 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 mod= es. =20 - aia-guests=3Dnnn =20 --=20 2.17.1