summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-03-31 22:50:38 +0400
committerMarcelo Tosatti <mtosatti@redhat.com>2014-04-17 21:01:42 +0400
commitf848a5a8dcb655553423f77cc98909a04e64173d (patch)
tree02e212c8eeeb52e74876408bb5e7e5d2febae379 /include/uapi
parentcd9ae5fe47dfb9820976c3c38c70f4b07a5a1c36 (diff)
downloadlinux-f848a5a8dcb655553423f77cc98909a04e64173d.tar.xz
KVM: support any-length wildcard ioeventfd
It is sometimes benefitial to ignore IO size, and only match on address. In hindsight this would have been a better default than matching length when KVM_IOEVENTFD_FLAG_DATAMATCH is not set, In particular, this kind of access can be optimized on VMX: there no need to do page lookups. This can currently be done with many ioeventfds but in a suboptimal way. However we can't change kernel/userspace ABI without risk of breaking some applications. Use len = 0 to mean "ignore length for matching" in a more optimal way. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/kvm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index a8f4ee5d2e82..39098a61f41c 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -529,7 +529,7 @@ enum {
struct kvm_ioeventfd {
__u64 datamatch;
__u64 addr; /* legal pio/mmio address */
- __u32 len; /* 1, 2, 4, or 8 bytes */
+ __u32 len; /* 1, 2, 4, or 8 bytes; or 0 to ignore length */
__s32 fd;
__u32 flags;
__u8 pad[36];
@@ -743,6 +743,7 @@ struct kvm_ppc_smmu_info {
#define KVM_CAP_IOAPIC_POLARITY_IGNORED 97
#define KVM_CAP_ENABLE_CAP_VM 98
#define KVM_CAP_S390_IRQCHIP 99
+#define KVM_CAP_IOEVENTFD_NO_LENGTH 100
#ifdef KVM_CAP_IRQ_ROUTING