aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2016-07-15 07:43:24 -0400
committerMarc Zyngier <marc.zyngier@arm.com>2016-07-18 13:10:21 -0400
commit2b8ddd9337ee0d001b22507f95596648a1a90992 (patch)
tree40ca9ccafcde3c28534f5dbcecb9d0dd74539575 /Documentation/virtual
parent42c8870f90098796c2ed7c9eaa3e7526407502a8 (diff)
KVM: Extend struct kvm_msi to hold a 32-bit device ID
The ARM GICv3 ITS MSI controller requires a device ID to be able to assign the proper interrupt vector. On real hardware, this ID is sampled from the bus. To be able to emulate an ITS controller, extend the KVM MSI interface to let userspace provide such a device ID. For PCI devices, the device ID is simply the 16-bit bus-device-function triplet, which should be easily available to the userland tool. Also there is a new KVM capability which advertises whether the current VM requires a device ID to be set along with the MSI data. This flag is still reported as not available everywhere, later we will enable it when ITS emulation is used. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Acked-by: Paolo Bonzini <pbonzini@redhat.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/api.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 09efa9eb3926..65513119fee8 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2175,10 +2175,18 @@ struct kvm_msi {
2175 __u32 address_hi; 2175 __u32 address_hi;
2176 __u32 data; 2176 __u32 data;
2177 __u32 flags; 2177 __u32 flags;
2178 __u8 pad[16]; 2178 __u32 devid;
2179 __u8 pad[12];
2179}; 2180};
2180 2181
2181No flags are defined so far. The corresponding field must be 0. 2182flags: KVM_MSI_VALID_DEVID: devid contains a valid value
2183devid: If KVM_MSI_VALID_DEVID is set, contains a unique device identifier
2184 for the device that wrote the MSI message.
2185 For PCI, this is usually a BFD identifier in the lower 16 bits.
2186
2187The per-VM KVM_CAP_MSI_DEVID capability advertises the need to provide
2188the device ID. If this capability is not set, userland cannot rely on
2189the kernel to allow the KVM_MSI_VALID_DEVID flag being set.
2182 2190
2183 2191
21844.71 KVM_CREATE_PIT2 21924.71 KVM_CREATE_PIT2