From: Raghavendra Rao Ananta <rananta@google.com>
To: Oliver Upton <oliver.upton@linux.dev>, Marc Zyngier <maz@kernel.org>
Cc: Raghavendra Rao Anata <rananta@google.com>,
Mingwei Zhang <mizhang@google.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: [PATCH 2/3] docs: kvm: devices/arm-vgic-v3: Document KVM_DEV_ARM_VGIC_CONFIG_GICV4 attr
Date: Wed, 14 May 2025 19:21:58 +0000 [thread overview]
Message-ID: <20250514192159.1751538-3-rananta@google.com> (raw)
In-Reply-To: <20250514192159.1751538-1-rananta@google.com>
Document the KVM_DEV_ARM_VGIC_CONFIG_GICV4 attr under
KVM_DEV_ARM_VGIC_GRP_CTRL, that includes the values supported to set/get
and the expected error returns.
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
---
.../virt/kvm/devices/arm-vgic-v3.rst | 24 +++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/Documentation/virt/kvm/devices/arm-vgic-v3.rst b/Documentation/virt/kvm/devices/arm-vgic-v3.rst
index e860498b1e35..2eed2ac13542 100644
--- a/Documentation/virt/kvm/devices/arm-vgic-v3.rst
+++ b/Documentation/virt/kvm/devices/arm-vgic-v3.rst
@@ -240,17 +240,33 @@ Groups:
save all LPI pending bits into guest RAM pending tables.
The first kB of the pending table is not altered by this operation.
+ KVM_DEV_ARM_VGIC_CONFIG_GICV4
+ attribute to enable/disable vGICv4 for a VM. It supports three values:
+ KVM_DEV_ARM_VGIC_CONFIG_GICV4_UNAVAILABLE: Kernel is not booted with
+ 'kvm-arm.vgic_v4_enable=1' cmdline, and hence vGICv4 is unavailable to
+ the VM. The value can only be read by the userspace, but cannot be set.
+ KVM_DEV_ARM_VGIC_CONFIG_GICV4_ENABLE: Kernel is booted with
+ 'kvm-arm.vgic_v4_enable=1' cmdline, and vGICv4 is available and enabled
+ for the VM (default config). Userspace can get and set this value.
+ KVM_DEV_ARM_VGIC_CONFIG_GICV4_DISABLE: Kernel is booted with
+ 'kvm-arm.vgic_v4_enable=1' cmdline, and vGICv4 is available and disabled
+ for the VM. Userspace can get and set this value.
+
Errors:
- ======= ========================================================
+ ======= ==================================================================
-ENXIO VGIC not properly configured as required prior to calling
- this attribute
+ this attribute or trying to enable/disable vGICv4 for the VM
+ on a vGICv3 configuration in the case of
+ KVM_DEV_ARM_VGIC_CONFIG_GICV4
+ -EINVAL Invalid configuration supplied by userspace
-ENODEV no online VCPU
-ENOMEM memory shortage when allocating vgic internal data
-EFAULT Invalid guest ram access
- -EBUSY One or more VCPUS are running
- ======= ========================================================
+ -EBUSY One or more VCPUS are running or vGIC has already been initialized
+ in the case of KVM_DEV_ARM_VGIC_CONFIG_GICV4
+ ======= ==================================================================
KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO
--
2.49.0.1101.gccaa498523-goog
next prev parent reply other threads:[~2025-05-14 19:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 19:21 [PATCH 0/3] KVM: arm64: Allow vGICv4 configuration per VM Raghavendra Rao Ananta
2025-05-14 19:21 ` [PATCH 1/3] kvm: arm64: Add support for KVM_DEV_ARM_VGIC_CONFIG_GICV4 attr Raghavendra Rao Ananta
2025-05-14 19:21 ` Raghavendra Rao Ananta [this message]
2025-05-14 19:21 ` [PATCH 3/3] KVM: selftests: Extend vgic_init to test GICv4 config attr Raghavendra Rao Ananta
2025-05-15 10:30 ` [PATCH 0/3] KVM: arm64: Allow vGICv4 configuration per VM Ben Horgan
2025-05-15 10:48 ` Marc Zyngier
2025-05-15 15:55 ` Raghavendra Rao Ananta
2025-05-15 16:48 ` Ben Horgan
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=20250514192159.1751538-3-rananta@google.com \
--to=rananta@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mizhang@google.com \
--cc=oliver.upton@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.