From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory Haskins Subject: [KVM PATCH v3 0/2] irqfd Date: Mon, 27 Apr 2009 14:33:24 -0400 Message-ID: <20090427182540.6646.96740.stgit@dev.haskins.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, avi@redhat.com, davidel@xmailserver.org To: kvm@vger.kernel.org Return-path: Received: from victor.provo.novell.com ([137.65.250.26]:46187 "EHLO victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758387AbZD0Sdo (ORCPT ); Mon, 27 Apr 2009 14:33:44 -0400 Sender: kvm-owner@vger.kernel.org List-ID: (Applies to kvm.git 41b76d8d0487c26d6d4d3fe53c1ff59b3236f096) This series implements a mechanism called "irqfd". It lets you create an eventfd based file-desriptor to inject interrupts to a kvm guest. We associate one gsi per fd for fine-grained routing. [ Changelog: v3: *) The kernel now allocates the eventfd (need to export sys_eventfd2) *) Added a flags field for future expansion to kvm_irqfd() *) We properly toggle the irq level 1+0. *) We re-use the USERSPACE_SRC_ID instead of creating our own *) Properly check for failures establishing a poll-table with eventfd *) Fixed fd/file leaks on failure *) Rebased to lateste kvm.git::41b76d8d04 v2: *) Dropped notifier_chain based callbacks in favor of wait_queue_t::func and file::poll based callbacks (Thanks to Davide for the suggestion) v1: *) Initial release -------- We do not have a user of this interface in this series, though note future version of virtual-bus (v4 and above) will be based on this. The first patch will require mainline buy-in, particularly from Davide (cc'd). The last patch is kvm specific. qemu-kvm.git patch to follow. -Greg --- Gregory Haskins (2): kvm: add support for irqfd via eventfd-notification interface eventfd: export fget and signal interfaces for module use arch/x86/kvm/Makefile | 2 - arch/x86/kvm/x86.c | 1 fs/eventfd.c | 4 + include/linux/kvm.h | 7 ++ include/linux/kvm_host.h | 4 + virt/kvm/irqfd.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++ virt/kvm/kvm_main.c | 11 +++ 7 files changed, 186 insertions(+), 1 deletions(-) create mode 100644 virt/kvm/irqfd.c -- Signature