From 0e95e612a6747f3c9d722ab3eb60c2cca3e1c9d3 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sat, 28 May 2011 14:12:30 +0300 Subject: [PATCH] --- yaml --- r: 258013 b: refs/heads/master c: 55399a02e90fdc6cd45165b2df5dd97b7c3f018f h: refs/heads/master i: 258011: 8598a826488e5f66d404373734303ad0dcf40971 v: v3 --- [refs] | 2 +- trunk/Documentation/virtual/kvm/api.txt | 30 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 596608109c3c..fec886a11045 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 823e396558e509b7c3225cd76806f3d6643ff5f8 +refs/heads/master: 55399a02e90fdc6cd45165b2df5dd97b7c3f018f diff --git a/trunk/Documentation/virtual/kvm/api.txt b/trunk/Documentation/virtual/kvm/api.txt index 67cc0f5b9974..3755a390f886 100644 --- a/trunk/Documentation/virtual/kvm/api.txt +++ b/trunk/Documentation/virtual/kvm/api.txt @@ -1323,6 +1323,36 @@ struct kvm_lapic_state { Copies the input argument into the the Local APIC registers. The data format and layout are the same as documented in the architecture manual. +4.56 KVM_IOEVENTFD + +Capability: KVM_CAP_IOEVENTFD +Architectures: all +Type: vm ioctl +Parameters: struct kvm_ioeventfd (in) +Returns: 0 on success, !0 on error + +This ioctl attaches or detaches an ioeventfd to a legal pio/mmio address +within the guest. A guest write in the registered address will signal the +provided event instead of triggering an exit. + +struct kvm_ioeventfd { + __u64 datamatch; + __u64 addr; /* legal pio/mmio address */ + __u32 len; /* 1, 2, 4, or 8 bytes */ + __s32 fd; + __u32 flags; + __u8 pad[36]; +}; + +The following flags are defined: + +#define KVM_IOEVENTFD_FLAG_DATAMATCH (1 << kvm_ioeventfd_flag_nr_datamatch) +#define KVM_IOEVENTFD_FLAG_PIO (1 << kvm_ioeventfd_flag_nr_pio) +#define KVM_IOEVENTFD_FLAG_DEASSIGN (1 << kvm_ioeventfd_flag_nr_deassign) + +If datamatch flag is set, the event will be signaled only if the written value +to the registered address is equal to datamatch in struct kvm_ioeventfd. + 5. The kvm_run structure Application code obtains a pointer to the kvm_run structure by