From patchwork Mon Aug 29 12:34:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1107662 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7TCYHAs023363 for ; Mon, 29 Aug 2011 12:34:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753069Ab1H2MeQ (ORCPT ); Mon, 29 Aug 2011 08:34:16 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:45661 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752813Ab1H2MeP (ORCPT ); Mon, 29 Aug 2011 08:34:15 -0400 Received: by wyg24 with SMTP id 24so4021759wyg.19 for ; Mon, 29 Aug 2011 05:34:14 -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=tw9DSpjShRblCxPtnD5hAbYktnr4rl7jYW3eSGiYXi0=; b=sQkPy+5MNOTeLJykPkng+5v1GCNPyPUEALsM1ZyN3NtyOyW7hZtwdKUEe2CwPJUZhF 39MzXSZHH9pYlPP/HJ8tFfkSkaLV2FVN1xvElhHGqE/Ft2ixzwAggkPpCjEUrfRmDKuf nvQyA1fQUywnOzecwpL7mV7cXPn601IpqU+38= Received: by 10.227.201.8 with SMTP id ey8mr3694626wbb.108.1314621254601; Mon, 29 Aug 2011 05:34:14 -0700 (PDT) Received: from localhost.localdomain ([31.210.184.127]) by mx.google.com with ESMTPS id fm9sm3701758wbb.44.2011.08.29.05.34.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 05:34:13 -0700 (PDT) From: Sasha Levin To: kvm@vger.kernel.org Cc: Sasha Levin , Avi Kivity , Marcelo Tosatti Subject: [PATCH resend] KVM: Document KVM_IRQFD Date: Mon, 29 Aug 2011 15:34:04 +0300 Message-Id: <1314621244-4360-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 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Aug 2011 12:34:18 +0000 (UTC) Cc: Avi Kivity Cc: 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