* [PATCH resend] KVM: Document KVM_IRQFD
@ 2011-08-29 12:34 Sasha Levin
2011-08-29 12:37 ` Avi Kivity
2011-08-29 21:52 ` Scott Wood
0 siblings, 2 replies; 5+ messages in thread
From: Sasha Levin @ 2011-08-29 12:34 UTC (permalink / raw)
To: kvm; +Cc: Sasha Levin, Avi Kivity, Marcelo Tosatti
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
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
--
1.7.6.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH resend] KVM: Document KVM_IRQFD
2011-08-29 12:34 [PATCH resend] KVM: Document KVM_IRQFD Sasha Levin
@ 2011-08-29 12:37 ` Avi Kivity
2011-08-29 12:43 ` Sasha Levin
2011-08-29 21:52 ` Scott Wood
1 sibling, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2011-08-29 12:37 UTC (permalink / raw)
To: Sasha Levin; +Cc: kvm, Marcelo Tosatti
On 08/29/2011 03:34 PM, Sasha Levin wrote:
> Cc: Avi Kivity<avi@redhat.com>
> Cc: Marcelo Tosatti<mtosatti@redhat.com>
> Signed-off-by: Sasha Levin<levinsasha928@gmail.com>
Thanks, applied.
> +Returns: 0 on success, !0 on error
> +
-1 (I fixed this).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH resend] KVM: Document KVM_IRQFD
2011-08-29 12:37 ` Avi Kivity
@ 2011-08-29 12:43 ` Sasha Levin
2011-08-29 12:50 ` Avi Kivity
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2011-08-29 12:43 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm, Marcelo Tosatti
On Mon, 2011-08-29 at 15:37 +0300, Avi Kivity wrote:
> On 08/29/2011 03:34 PM, Sasha Levin wrote:
> > Cc: Avi Kivity<avi@redhat.com>
> > Cc: Marcelo Tosatti<mtosatti@redhat.com>
> > Signed-off-by: Sasha Levin<levinsasha928@gmail.com>
>
> Thanks, applied.
>
> > +Returns: 0 on success, !0 on error
> > +
>
> -1 (I fixed this).
>
Why -1? It could be anything < 0, no?
--
Sasha.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH resend] KVM: Document KVM_IRQFD
2011-08-29 12:43 ` Sasha Levin
@ 2011-08-29 12:50 ` Avi Kivity
0 siblings, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2011-08-29 12:50 UTC (permalink / raw)
To: Sasha Levin; +Cc: kvm, Marcelo Tosatti
On 08/29/2011 03:43 PM, Sasha Levin wrote:
> On Mon, 2011-08-29 at 15:37 +0300, Avi Kivity wrote:
> > On 08/29/2011 03:34 PM, Sasha Levin wrote:
> > > Cc: Avi Kivity<avi@redhat.com>
> > > Cc: Marcelo Tosatti<mtosatti@redhat.com>
> > > Signed-off-by: Sasha Levin<levinsasha928@gmail.com>
> >
> > Thanks, applied.
> >
> > > +Returns: 0 on success, !0 on error
> > > +
> >
> > -1 (I fixed this).
> >
>
> Why -1? It could be anything< 0, no?
>
No. ioctl()s (and most system calls) return -1 on error and set errno.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH resend] KVM: Document KVM_IRQFD
2011-08-29 12:34 [PATCH resend] KVM: Document KVM_IRQFD Sasha Levin
2011-08-29 12:37 ` Avi Kivity
@ 2011-08-29 21:52 ` Scott Wood
1 sibling, 0 replies; 5+ messages in thread
From: Scott Wood @ 2011-08-29 21:52 UTC (permalink / raw)
To: Sasha Levin; +Cc: kvm, Avi Kivity, Marcelo Tosatti
On 08/29/2011 07:34 AM, Sasha Levin wrote:
> Cc: Avi Kivity <avi@redhat.com>
> Cc: Marcelo Tosatti <mtosatti@redhat.com>
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> ---
> 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];
> +};
Should define "gsi" (and how it's used by KVM) somewhere. AFAICT it's
an ACPI-ism.
-Scott
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-29 21:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-29 12:34 [PATCH resend] KVM: Document KVM_IRQFD Sasha Levin
2011-08-29 12:37 ` Avi Kivity
2011-08-29 12:43 ` Sasha Levin
2011-08-29 12:50 ` Avi Kivity
2011-08-29 21:52 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox