aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2016-07-15 07:43:31 -0400
committerMarc Zyngier <marc.zyngier@arm.com>2016-07-18 13:14:35 -0400
commit1085fdc68c6097244627a02a56bd2d8fe58a1a9c (patch)
tree6a26676301cddc817aa4a4b0ba8eee7e841383f4 /Documentation/virtual
parent59c5ab40989afa5aba9c4a0918a5ed910a917422 (diff)
KVM: arm64: vgic-its: Introduce new KVM ITS device
Introduce a new KVM device that represents an ARM Interrupt Translation Service (ITS) controller. Since there can be multiple of this per guest, we can't piggy back on the existing GICv3 distributor device, but create a new type of KVM device. On the KVM_CREATE_DEVICE ioctl we allocate and initialize the ITS data structure and store the pointer in the kvm_device data. Upon an explicit init ioctl from userland (after having setup the MMIO address) we register the handlers with the kvm_io_bus framework. Any reference to an ITS thus has to go via this interface. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/devices/arm-vgic.txt25
1 files changed, 19 insertions, 6 deletions
diff --git a/Documentation/virtual/kvm/devices/arm-vgic.txt b/Documentation/virtual/kvm/devices/arm-vgic.txt
index 59541d49e15c..89182f80cc7f 100644
--- a/Documentation/virtual/kvm/devices/arm-vgic.txt
+++ b/Documentation/virtual/kvm/devices/arm-vgic.txt
@@ -4,16 +4,22 @@ ARM Virtual Generic Interrupt Controller (VGIC)
4Device types supported: 4Device types supported:
5 KVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0 5 KVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0
6 KVM_DEV_TYPE_ARM_VGIC_V3 ARM Generic Interrupt Controller v3.0 6 KVM_DEV_TYPE_ARM_VGIC_V3 ARM Generic Interrupt Controller v3.0
7 KVM_DEV_TYPE_ARM_VGIC_ITS ARM Interrupt Translation Service Controller
7 8
8Only one VGIC instance may be instantiated through either this API or the 9Only one VGIC instance of the V2/V3 types above may be instantiated through
9legacy KVM_CREATE_IRQCHIP api. The created VGIC will act as the VM interrupt 10either this API or the legacy KVM_CREATE_IRQCHIP api. The created VGIC will
10controller, requiring emulated user-space devices to inject interrupts to the 11act as the VM interrupt controller, requiring emulated user-space devices to
11VGIC instead of directly to CPUs. 12inject interrupts to the VGIC instead of directly to CPUs.
12 13
13Creating a guest GICv3 device requires a host GICv3 as well. 14Creating a guest GICv3 device requires a host GICv3 as well.
14GICv3 implementations with hardware compatibility support allow a guest GICv2 15GICv3 implementations with hardware compatibility support allow a guest GICv2
15as well. 16as well.
16 17
18Creating a virtual ITS controller requires a host GICv3 (but does not depend
19on having physical ITS controllers).
20There can be multiple ITS controllers per guest, each of them has to have
21a separate, non-overlapping MMIO region.
22
17Groups: 23Groups:
18 KVM_DEV_ARM_VGIC_GRP_ADDR 24 KVM_DEV_ARM_VGIC_GRP_ADDR
19 Attributes: 25 Attributes:
@@ -39,6 +45,13 @@ Groups:
39 Only valid for KVM_DEV_TYPE_ARM_VGIC_V3. 45 Only valid for KVM_DEV_TYPE_ARM_VGIC_V3.
40 This address needs to be 64K aligned. 46 This address needs to be 64K aligned.
41 47
48 KVM_VGIC_V3_ADDR_TYPE_ITS (rw, 64-bit)
49 Base address in the guest physical address space of the GICv3 ITS
50 control register frame. The ITS allows MSI(-X) interrupts to be
51 injected into guests. This extension is optional. If the kernel
52 does not support the ITS, the call returns -ENODEV.
53 Only valid for KVM_DEV_TYPE_ARM_VGIC_ITS.
54 This address needs to be 64K aligned and the region covers 128K.
42 55
43 KVM_DEV_ARM_VGIC_GRP_DIST_REGS 56 KVM_DEV_ARM_VGIC_GRP_DIST_REGS
44 Attributes: 57 Attributes:
@@ -109,8 +122,8 @@ Groups:
109 KVM_DEV_ARM_VGIC_GRP_CTRL 122 KVM_DEV_ARM_VGIC_GRP_CTRL
110 Attributes: 123 Attributes:
111 KVM_DEV_ARM_VGIC_CTRL_INIT 124 KVM_DEV_ARM_VGIC_CTRL_INIT
112 request the initialization of the VGIC, no additional parameter in 125 request the initialization of the VGIC or ITS, no additional parameter
113 kvm_device_attr.addr. 126 in kvm_device_attr.addr.
114 Errors: 127 Errors:
115 -ENXIO: VGIC not properly configured as required prior to calling 128 -ENXIO: VGIC not properly configured as required prior to calling
116 this attribute 129 this attribute