Skip to content

Commit d6c77bd

Browse files
eaugerMarc Zyngier
authored andcommitted
KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION
We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the base address and size of a redistributor region Compared to KVM_VGIC_V3_ADDR_TYPE_REDIST, this new attribute allows to declare several separate redistributor regions. So the whole redist space does not need to be contiguous anymore. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 9153ab7 commit d6c77bd

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

‎Documentation/virtual/kvm/devices/arm-vgic-v3.txt‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,42 @@ Groups:
2727
VCPU and all of the redistributor pages are contiguous.
2828
Only valid for KVM_DEV_TYPE_ARM_VGIC_V3.
2929
This address needs to be 64K aligned.
30+
31+
KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION (rw, 64-bit)
32+
The attribute data pointed to by kvm_device_attr.addr is a __u64 value:
33+
bits: | 63 .... 52 | 51 .... 16 | 15 - 12 |11 - 0
34+
values: | count | base | flags | index
35+
- index encodes the unique redistributor region index
36+
- flags: reserved for future use, currently 0
37+
- base field encodes bits [51:16] of the guest physical base address
38+
of the first redistributor in the region.
39+
- count encodes the number of redistributors in the region. Must be
40+
greater than 0.
41+
There are two 64K pages for each redistributor in the region and
42+
redistributors are laid out contiguously within the region. Regions
43+
are filled with redistributors in the index order. The sum of all
44+
region count fields must be greater than or equal to the number of
45+
VCPUs. Redistributor regions must be registered in the incremental
46+
index order, starting from index 0.
47+
The characteristics of a specific redistributor region can be read
48+
by presetting the index field in the attr data.
49+
Only valid for KVM_DEV_TYPE_ARM_VGIC_V3.
50+
51+
It is invalid to mix calls with KVM_VGIC_V3_ADDR_TYPE_REDIST and
52+
KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attributes.
53+
3054
Errors:
3155
-E2BIG: Address outside of addressable IPA range
32-
-EINVAL: Incorrectly aligned address
56+
-EINVAL: Incorrectly aligned address, bad redistributor region
57+
count/index, mixed redistributor region attribute usage
3358
-EEXIST: Address already configured
59+
-ENOENT: Attempt to read the characteristics of a non existing
60+
redistributor region
3461
-ENXIO: The group or attribute is unknown/unsupported for this device
3562
or hardware support is missing.
3663
-EFAULT: Invalid user pointer for attr->addr.
3764

3865

39-
4066
KVM_DEV_ARM_VGIC_GRP_DIST_REGS
4167
KVM_DEV_ARM_VGIC_GRP_REDIST_REGS
4268
Attributes:

0 commit comments

Comments
 (0)