Commit bf6154db authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Paolo Bonzini

docs: kvm: convert devices/arm-vgit.txt to ReST

- Use title markups;
- change indent to match ReST syntax;
- use proper table markups;
- use literal block markups.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c0d1c8a0
.. SPDX-License-Identifier: GPL-2.0
==================================================
ARM Virtual Generic Interrupt Controller v2 (VGIC) ARM Virtual Generic Interrupt Controller v2 (VGIC)
================================================== ==================================================
Device types supported: Device types supported:
KVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0
- KVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0
Only one VGIC instance may be instantiated through either this API or the Only one VGIC instance may be instantiated through either this API or the
legacy KVM_CREATE_IRQCHIP API. The created VGIC will act as the VM interrupt legacy KVM_CREATE_IRQCHIP API. The created VGIC will act as the VM interrupt
...@@ -17,7 +21,8 @@ create both a GICv3 and GICv2 device on the same VM. ...@@ -17,7 +21,8 @@ create both a GICv3 and GICv2 device on the same VM.
Groups: Groups:
KVM_DEV_ARM_VGIC_GRP_ADDR KVM_DEV_ARM_VGIC_GRP_ADDR
Attributes: Attributes:
KVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit) KVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit)
Base address in the guest physical address space of the GIC distributor Base address in the guest physical address space of the GIC distributor
register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2.
...@@ -27,19 +32,25 @@ Groups: ...@@ -27,19 +32,25 @@ Groups:
Base address in the guest physical address space of the GIC virtual cpu Base address in the guest physical address space of the GIC virtual cpu
interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2.
This address needs to be 4K aligned and the region covers 4 KByte. This address needs to be 4K aligned and the region covers 4 KByte.
Errors: Errors:
-E2BIG: Address outside of addressable IPA range
-EINVAL: Incorrectly aligned address ======= =============================================================
-EEXIST: Address already configured -E2BIG Address outside of addressable IPA range
-ENXIO: The group or attribute is unknown/unsupported for this device -EINVAL Incorrectly aligned address
-EEXIST Address already configured
-ENXIO The group or attribute is unknown/unsupported for this device
or hardware support is missing. or hardware support is missing.
-EFAULT: Invalid user pointer for attr->addr. -EFAULT Invalid user pointer for attr->addr.
======= =============================================================
KVM_DEV_ARM_VGIC_GRP_DIST_REGS KVM_DEV_ARM_VGIC_GRP_DIST_REGS
Attributes: Attributes:
The attr field of kvm_device_attr encodes two values:
bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | The attr field of kvm_device_attr encodes two values::
values: | reserved | vcpu_index | offset |
bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 |
values: | reserved | vcpu_index | offset |
All distributor regs are (rw, 32-bit) All distributor regs are (rw, 32-bit)
...@@ -58,16 +69,22 @@ Groups: ...@@ -58,16 +69,22 @@ Groups:
KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS) to ensure KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS) to ensure
the expected behavior. Unless GICD_IIDR has been set from userspace, writes the expected behavior. Unless GICD_IIDR has been set from userspace, writes
to the interrupt group registers (GICD_IGROUPR) are ignored. to the interrupt group registers (GICD_IGROUPR) are ignored.
Errors: Errors:
-ENXIO: Getting or setting this register is not yet supported
-EBUSY: One or more VCPUs are running ======= =====================================================
-EINVAL: Invalid vcpu_index supplied -ENXIO Getting or setting this register is not yet supported
-EBUSY One or more VCPUs are running
-EINVAL Invalid vcpu_index supplied
======= =====================================================
KVM_DEV_ARM_VGIC_GRP_CPU_REGS KVM_DEV_ARM_VGIC_GRP_CPU_REGS
Attributes: Attributes:
The attr field of kvm_device_attr encodes two values:
bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | The attr field of kvm_device_attr encodes two values::
values: | reserved | vcpu_index | offset |
bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 |
values: | reserved | vcpu_index | offset |
All CPU interface regs are (rw, 32-bit) All CPU interface regs are (rw, 32-bit)
...@@ -101,27 +118,39 @@ Groups: ...@@ -101,27 +118,39 @@ Groups:
value left by 3 places to obtain the actual priority mask level. value left by 3 places to obtain the actual priority mask level.
Errors: Errors:
-ENXIO: Getting or setting this register is not yet supported
-EBUSY: One or more VCPUs are running ======= =====================================================
-EINVAL: Invalid vcpu_index supplied -ENXIO Getting or setting this register is not yet supported
-EBUSY One or more VCPUs are running
-EINVAL Invalid vcpu_index supplied
======= =====================================================
KVM_DEV_ARM_VGIC_GRP_NR_IRQS KVM_DEV_ARM_VGIC_GRP_NR_IRQS
Attributes: Attributes:
A value describing the number of interrupts (SGI, PPI and SPI) for A value describing the number of interrupts (SGI, PPI and SPI) for
this GIC instance, ranging from 64 to 1024, in increments of 32. this GIC instance, ranging from 64 to 1024, in increments of 32.
Errors: Errors:
-EINVAL: Value set is out of the expected range
-EBUSY: Value has already be set, or GIC has already been initialized ======= =============================================================
with default values. -EINVAL Value set is out of the expected range
-EBUSY Value has already be set, or GIC has already been initialized
with default values.
======= =============================================================
KVM_DEV_ARM_VGIC_GRP_CTRL KVM_DEV_ARM_VGIC_GRP_CTRL
Attributes: Attributes:
KVM_DEV_ARM_VGIC_CTRL_INIT KVM_DEV_ARM_VGIC_CTRL_INIT
request the initialization of the VGIC or ITS, no additional parameter request the initialization of the VGIC or ITS, no additional parameter
in kvm_device_attr.addr. in kvm_device_attr.addr.
Errors: Errors:
-ENXIO: VGIC not properly configured as required prior to calling
this attribute ======= =========================================================
-ENODEV: no online VCPU -ENXIO VGIC not properly configured as required prior to calling
-ENOMEM: memory shortage when allocating vgic internal data this attribute
-ENODEV no online VCPU
-ENOMEM memory shortage when allocating vgic internal data
======= =========================================================
...@@ -8,4 +8,5 @@ Devices ...@@ -8,4 +8,5 @@ Devices
:maxdepth: 2 :maxdepth: 2
arm-vgic-its arm-vgic-its
arm-vgic
arm-vgic-v3 arm-vgic-v3
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment