From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH v2 5/6] kvm: KVM_EOIFD, an eventfd for EOIs Date: Wed, 27 Jun 2012 18:20:29 +0300 Message-ID: <20120627152029.GB21393@redhat.com> References: <20120627044758.23698.249.stgit@bling.home> <20120627050952.23698.37235.stgit@bling.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, jan.kiszka@siemens.com To: Alex Williamson Return-path: Content-Disposition: inline In-Reply-To: <20120627050952.23698.37235.stgit@bling.home> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, Jun 26, 2012 at 11:10:08PM -0600, Alex Williamson wrote: > +static void eoifd_event(struct kvm_irq_ack_notifier *notifier) > +{ > + struct _eoifd *eoifd; > + > + eoifd = container_of(notifier, struct _eoifd, notifier); > + > + if (eoifd->source) > + kvm_set_irq(eoifd->kvm, eoifd->source->id, > + eoifd->notifier.gsi, 0); Let's add a comment here explaining why it's a safe thing to do, which is, userspace will check status and reinject if necessary. -- MST