From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v7 4/4] KVM: x86: Add support for local interrupt requests from userspace Date: Thu, 30 Jul 2015 10:21:38 +0200 Message-ID: <55B9DE92.6050605@redhat.com> References: <1438237303-19124-1-git-send-email-srutherford@google.com> <1438237303-19124-4-git-send-email-srutherford@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit To: Steve Rutherford , KVM list Return-path: Received: from mail-wi0-f180.google.com ([209.85.212.180]:36653 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753509AbbG3IVl (ORCPT ); Thu, 30 Jul 2015 04:21:41 -0400 Received: by wicgb10 with SMTP id gb10so232739461wic.1 for ; Thu, 30 Jul 2015 01:21:40 -0700 (PDT) In-Reply-To: <1438237303-19124-4-git-send-email-srutherford@google.com> Sender: kvm-owner@vger.kernel.org List-ID: On 30/07/2015 08:21, Steve Rutherford wrote: > Architectures: x86, ppc, mips > Type: vcpu ioctl > Parameters: struct kvm_interrupt (in) > -Returns: 0 on success, -1 on error > +Returns: 0 on success, negative on failure. Really returns -1 because... > > -Queues a hardware interrupt vector to be injected. This is only > -useful if in-kernel local APIC or equivalent is not used. > +Queues a hardware interrupt vector to be injected. > > /* for KVM_INTERRUPT */ > struct kvm_interrupt { > @@ -414,7 +413,14 @@ struct kvm_interrupt { > > X86: > > -Note 'irq' is an interrupt vector, not an interrupt pin or line. > +Returns: 0 on success, > + -EEXIST if an interrupt is already enqueued > + -EINVAL the the irq number is invalid > + -ENXIO if the PIC is in the kernel > + -EFAULT if the pointer is invalid ... these are errno values. No need to resend. Paolo > +Note 'irq' is an interrupt vector, not an interrupt pin or line. This > +ioctl is useful if the in-kernel PIC is not used.