From patchwork Mon Aug 29 12:32:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1107642 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7TCWpGT012636 for ; Mon, 29 Aug 2011 12:32:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753079Ab1H2Mct (ORCPT ); Mon, 29 Aug 2011 08:32:49 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:53794 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752813Ab1H2Mcs (ORCPT ); Mon, 29 Aug 2011 08:32:48 -0400 Received: by wwf5 with SMTP id 5so5655406wwf.1 for ; Mon, 29 Aug 2011 05:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=cGcdQHQZU/QEwZuuetpGFs1/PH3g9Mfq50ozYT14Pnc=; b=tWN1KULPRTG/5SvkY0t9ZdAU1+QNN6eUPSoWA2SKXPHifcnl6ebfAM2Iq/y/LaDKkP 6qeli3L22y/oiA2OSi4nWCqcDzfHVrzbHyT3uEPDVuUsRwF2WExpHWCuw6uYV3wLUDUK OfBKOBISvzBt4dznIf0A3MynasHw5VU+wQSQc= Received: by 10.216.165.212 with SMTP id e62mr2469957wel.87.1314621166741; Mon, 29 Aug 2011 05:32:46 -0700 (PDT) Received: from localhost.localdomain ([31.210.184.127]) by mx.google.com with ESMTPS id t44sm2880929wec.3.2011.08.29.05.32.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 05:32:46 -0700 (PDT) From: Sasha Levin To: kvm@vger.kernel.org Cc: avi@redhat.com, mtosatti@redhat.com, Sasha Levin Subject: [PATCH] KVM: Document KVM_IRQFD Date: Mon, 29 Aug 2011 15:32:28 +0300 Message-Id: <1314621148-4187-1-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.6.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 29 Aug 2011 12:32:51 +0000 (UTC) Avi Kivity Marcelo Tosatti Signed-off-by: Sasha Levin --- Documentation/virtual/kvm/api.txt | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 2d510b6..d1150b6 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1450,6 +1450,33 @@ is supported; 2 if the processor requires all virtual machines to have an RMA, or 1 if the processor can use an RMA but doesn't require it, because it supports the Virtual RMA (VRMA) facility. +4.64 KVM_IRQFD + +Capability: KVM_CAP_IRQFD +Architectures: all +Type: vm ioctl +Parameters: struct kvm_irqfd (in) +Returns: 0 on success, !0 on error + +This ioctl attaches or detaches an eventfd to a GSI within the guest. +While the eventfd is assigned to the guest, any write to the eventfd +would trigger the GSI within the guest. + +struct kvm_irqfd { + __u32 fd; + __u32 gsi; + __u32 flags; + __u8 pad[20]; +}; + +The following flags are defined: + +#define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) + +If deassign flag is set, the eventfd will be deassigned from the GSI and +further writes to the eventfd won't trigger the GSI. + + 5. The kvm_run structure Application code obtains a pointer to the kvm_run structure by