From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Gabriel L. Somlo" Subject: Re: [RFC PATCH v2] kvm: x86: ignore ioapic polarity Date: Thu, 13 Mar 2014 09:43:08 -0400 Message-ID: <20140313134307.GG17184@ERROL.INI.CMU.EDU> References: <20140216114151.GB30056@redhat.com> <1392562020.15608.437.camel@ul30vt.home> <20140216162300.GI30056@redhat.com> <20140227170549.GA23037@redhat.com> <20140227214102.GG17184@ERROL.INI.CMU.EDU> <530FBC9F.8080800@redhat.com> <20140227231312.GH17184@ERROL.INI.CMU.EDU> <530FCACF.40100@redhat.com> <20140228040617.GA22103@crash.ini.cmu.edu> <53218E10.60503@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, mst@redhat.com, eddie.dong@intel.com, qemu-devel@nongnu.org, agraf@suse.de, alex.williamson@redhat.com To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <53218E10.60503@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On Thu, Mar 13, 2014 at 11:53:04AM +0100, Paolo Bonzini wrote: > Instead of this, I'm adding the following to the KVM_IRQ_LINE ioctl: > > +On real hardware, interrupt pins can be active-low or active-high. This > +does not matter for the level field of struct kvm_irq_level: 1 always > +means active (asserted), 0 means inactive (deasserted). > + > +x86 allows the operating system to program the interrupt polarity > +(active-low/active-high) for level-triggered interrupts, and KVM used > +to consider the polarity. However, due to bitrot in the handling of > +active-low interrupts, the above convention is now valid on x86 too. > +This is signaled by KVM_CAP_X86_IOAPIC_POLARITY_IGNORED. Userspace > +should not present interrupts to the guest as active-low unless this > +capability is present (or unless it is not using the in-kernel irqchip, > +of course). > > and applying the patch to kvm/queue. Sounds great to me, thanks ! --Gabriel