Skip to content

ioeventfd (formerly iosignalfd)

Gregory Haskins kvm lkml 17 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest2 patches 6 repliesApplied
  2. v92 patches 20 repliesSuperseded
  3. v83 patches 25 repliesSuperseded
Earlier versions · 14
VersionPostedPatchesRepliesStatus
v7 posting 2/22 patches7 repliesSuperseded
v62 patches3 repliesSuperseded
v5 posting 2/22 patches7 repliesSuperseded
v4 posting 3/33 patches18 repliesSuperseded
v3 posting 3/34 patches3 repliesSuperseded
v3 posting 2/32 of 4 patches0 repliesSuperseded
v2 posting 2/24 patches5 repliesSuperseded
v7 posting 1/23 patches13 repliesSuperseded
v5 posting 1/22 patches0 repliesSuperseded
v4 posting 2/32 patches32 repliesSuperseded
v4 posting 1/32 patches0 repliesSuperseded
v3 posting 1/32 patches13 repliesSuperseded
v2 posting 1/22 patches17 repliesSuperseded
v13 patches8 repliesSuperseded

Changes in v10 from the cover letter

*) Numerous fixes from Michael's review comments
*) collapsed some whitespace
*) comment cleanup (spelling fixes, clarifications, etc) *) structure member optimizations (s/size_t/int, etc) *) unified data-match name to be consistent throughout *) Single line comments are truely single-line *) Clean up superfluous bracketing
*) Check for math overflow
*) More explicit deassign match checking
*) Return an error on deassign if no match found *) Eliminated multiple-match feature
*) Validate args->flags
*) s/iosignalfd/ioeventfd
*) Rebased to kvm.git/master:3abaf217

Patches in v10 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: make io_bus interface more robustarch/x86/kvm/i8254.c arch/x86/kvm/i8259.c include/linux/kvm_host.h +3 more+79 -151 reply
2/2KVM: add ioeventfd supportarch/x86/kvm/x86.c include/linux/kvm.h include/linux/kvm_host.h +2 more+294 -43 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMichael S. Tsirkin
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [KVM PATCH v10 0/2] ioeventfd (formerly iosignalfd)

(Applies to kvm.git/master:3abaf217)

This is v10 of the series. For more details, please see the header to patch 2/2.

This series has been tested against the kvm-eventfd unit test, and appears to be functioning properly. You can download this test here:

ftp://ftp.novell.com/dev/ghaskins/kvm-eventfd.tar.bz2

(Note: unit test has been updated to accomodate new feature-set)

Please consider for inclusion to kvm.git

[
Changelog:

v10:
*) Numerous fixes from Michael's review comments
*) collapsed some whitespace
*) comment cleanup (spelling fixes, clarifications, etc) *) structure member optimizations (s/size_t/int, etc) *) unified data-match name to be consistent throughout *) Single line comments are truely single-line *) Clean up superfluous bracketing
*) Check for math overflow
*) More explicit deassign match checking
*) Return an error on deassign if no match found *) Eliminated multiple-match feature
*) Validate args->flags
*) s/iosignalfd/ioeventfd
*) Rebased to kvm.git/master:3abaf217

v9:
*) Rebased onto Michael's new iodev locking scheme *) Removed group+item nesting in favor of using iodev facility *) Removed iodev-limit patch since we no longer create
our own devices. The limit feature itself may be useful but it is now out of scope from iosignalfd and thus should be addressed separately.
*) Rebased to kvm.git/master:c5b13264e

v8:
*) Addressed Avi's review comments:
*) Simplified the unregister_dev logic in patch 1/3 *) Implemented a per-vm io-device limit (patch 2/3) *) Removed spurious whitespace hunk
*) changed the data-match from a void* to a u64 *) check group-length violations before wildcarding

v7:
*) Implemented a resource limit (CONFIG_KVM_MAX_IOSIGNALFD_ITEMS)
to limit malicious/broken userspace from consuming arbitrary kernel memory.
*) Rebased to kvm.git/master:c27b64a0, which already includes
Marcelo's irq-lock rework.

v6:
*) Removed "FIXME?" comment on choice over RCU vs SRCU after
discussion/numbers from Paul. I think RCU is fine to use for now based on the conversation. We can always convert it later if need be.
*) Fixed the "group" free path to eliminate an RCU related race *) Fixed a memory/eventfd leak on shutdown for any iosignalfd's
which were still active at the time the guest shuts down.
*) Beefed up comments
*) Rebased to kvm.git/master:0281e88f + irq locking rework and
verified that kvm-eventfd unit test still passes.

v5:
*) Removed "cookie" field, which was a misunderstanding on my
part on what Avi wanted for a data-match feature
*) Added a new "trigger" data-match feature which I think is
much closer to what we need.
*) We retain the dev_count field in the io_bus infrastructure
and instead back-fill the array on removal.
*) Various minor cleanups
*) Rebased to kvm.git/master:25deed73

v4:
*) Fixed a bug in the original 2/4 where the PIT failure case
would potentially leave the io_bus components registered.
*) Condensed the v3 2/4 and 3/4 into one patch (2/2) since
the patches became interdependent with the fix described above
*) Rebased to kvm.git/master:74dfca0a

v3:
*) fixed patch 2/4 to handle error cases instead of BUG_ON *) implemented same HAVE_EVENTFD protection mechanism as
irqfd to prevent compilation errors on unsupported arches
*) completed testing
*) rebased to kvm.git/master:7391a6d5

v2:
*) added optional data-matching capability (via cookie field) *) changed name from iofd to iosignalfd
*) added io_bus unregister function
*) implemented deassign feature

v1:
*) original release (integrated into irqfd v7 series as "iofd")
]

---

Gregory Haskins (2):
KVM: add ioeventfd support
KVM: make io_bus interface more robust

 arch/x86/kvm/i8254.c      |   20 +++-
 arch/x86/kvm/i8259.c      |    9 +-
 arch/x86/kvm/x86.c        |    1 
 include/linux/kvm.h       |   24 ++++
 include/linux/kvm_host.h  |   20 +++-
 virt/kvm/coalesced_mmio.c |    8 +
 virt/kvm/eventfd.c        |  252 +++++++++++++++++++++++++++++++++++++++++++++
 virt/kvm/ioapic.c         |    8 +
 virt/kvm/kvm_main.c       |   50 ++++++++-
 9 files changed, 373 insertions(+), 19 deletions(-)
Signature · 1 line
Signature