History

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.

Michael S. Tsirkin committed 12 years ago

Commit f848a5a1 parent cd9ae5f3 files · +25 −6Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/kvm.h+2−1
@@ -529,7 +529,7 @@ enum { · 528 unmodified lines
529529 struct kvm_ioeventfd {
530530 __u64 datamatch;
531531 __u64 addr; /* legal pio/mmio address */
532− __u32 len; /* 1, 2, 4, or 8 bytes */
532+ __u32 len; /* 1, 2, 4, or 8 bytes; or 0 to ignore length */
533533 __s32 fd;
534534 __u32 flags;
535535 __u8 pad[36];
@@ -743,6 +743,7 @@ struct kvm_ppc_smmu_info { · 207 unmodified lines
743743 #define KVM_CAP_IOAPIC_POLARITY_IGNORED 97
744744 #define KVM_CAP_ENABLE_CAP_VM 98
745745 #define KVM_CAP_S390_IRQCHIP 99
746+#define KVM_CAP_IOEVENTFD_NO_LENGTH 100
746747
747748 #ifdef KVM_CAP_IRQ_ROUTING
748749

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t