aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual/kvm
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2016-07-22 14:27:26 -0400
committerRadim Krčmář <rkrcmar@redhat.com>2016-07-22 14:27:26 -0400
commit912902ce78b0d48f717f9128e61fb9bffbd65f86 (patch)
tree5a97dd19149ba1e0386df9bb467f8c5fb7ba2393 /Documentation/virtual/kvm
parent61f5dea179653558562ba9a5dd71eb29d91a383e (diff)
parent3a88bded203591d4683aacdbb65cd0f549bc58cb (diff)
Merge tag 'kvm-arm-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into next
KVM/ARM changes for Linux 4.8 - GICv3 ITS emulation - Simpler idmap management that fixes potential TLB conflicts - Honor the kernel protection in HYP mode - Removal of the old vgic implementation
Diffstat (limited to 'Documentation/virtual/kvm')
-rw-r--r--Documentation/virtual/kvm/api.txt14
-rw-r--r--Documentation/virtual/kvm/devices/arm-vgic.txt25
2 files changed, 30 insertions, 9 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 299306db5d84..5237e1b2fd66 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2182,7 +2182,7 @@ after pausing the vcpu, but before it is resumed.
21824.71 KVM_SIGNAL_MSI 21824.71 KVM_SIGNAL_MSI
2183 2183
2184Capability: KVM_CAP_SIGNAL_MSI 2184Capability: KVM_CAP_SIGNAL_MSI
2185Architectures: x86 2185Architectures: x86 arm64
2186Type: vm ioctl 2186Type: vm ioctl
2187Parameters: struct kvm_msi (in) 2187Parameters: struct kvm_msi (in)
2188Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error 2188Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error
@@ -2195,10 +2195,18 @@ struct kvm_msi {
2195 __u32 address_hi; 2195 __u32 address_hi;
2196 __u32 data; 2196 __u32 data;
2197 __u32 flags; 2197 __u32 flags;
2198 __u8 pad[16]; 2198 __u32 devid;
2199 __u8 pad[12];
2199}; 2200};
2200 2201
2201No flags are defined so far. The corresponding field must be 0. 2202flags: KVM_MSI_VALID_DEVID: devid contains a valid value
2203devid: If KVM_MSI_VALID_DEVID is set, contains a unique device identifier
2204 for the device that wrote the MSI message.
2205 For PCI, this is usually a BFD identifier in the lower 16 bits.
2206
2207The per-VM KVM_CAP_MSI_DEVID capability advertises the need to provide
2208the device ID. If this capability is not set, userland cannot rely on
2209the kernel to allow the KVM_MSI_VALID_DEVID flag being set.
2202 2210
2203On x86, address_hi is ignored unless the KVM_CAP_X2APIC_API capability is 2211On x86, address_hi is ignored unless the KVM_CAP_X2APIC_API capability is
2204enabled. If it is enabled, address_hi bits 31-8 provide bits 31-8 of the 2212enabled. If it is enabled, address_hi bits 31-8 provide bits 31-8 of the
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