From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory Haskins Subject: Re: [KVM PATCH v2 2/2] kvm: add support for irqfd via eventfd-notification interface Date: Tue, 28 Apr 2009 06:34:05 -0400 Message-ID: <49F6DB9D.3080501@novell.com> References: <20090424042142.1796.60756.stgit@dev.haskins.net> <20090424042518.1796.65593.stgit@dev.haskins.net> <49F572EF.4010909@redhat.com> <49F58A8C.7090808@novell.com> <49F58D75.7040304@redhat.com> <49F5B2DA.5060207@novell.com> <49F6CDFC.6000400@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFEDE34FA9AE74189949A93EA" Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, davidel@xmailserver.org To: Avi Kivity Return-path: Received: from victor.provo.novell.com ([137.65.250.26]:36553 "EHLO victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754832AbZD1KeY (ORCPT ); Tue, 28 Apr 2009 06:34:24 -0400 In-Reply-To: <49F6CDFC.6000400@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFEDE34FA9AE74189949A93EA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > Gregory Haskins wrote: > > =20 > >>> Sure, the interface remains the same (write 8 bytes), but the >>> implementation can change. For example, we can implement it to work >>> from interrupt context, once we hack the locking appropriately. >>> =20 >> >> I was thinking more along the lines of eventfd_signal(). AIO and vbus= >> currently use this interface, as opposed to the more polymorhpic >> f_ops->write(). >> >> =20 > > But eventfd_signal basically marries us to eventfd. Well, only if we expect the fd to have eventfd semantics. There are advantages to doing so, as we have discussed, because things like AIO can polymorhpically signal an interrupt without even knowing whats behind the eventfd. But this isn't a strict requirement to support AIO. Really all we need is a way for both kernel and userspace to signal. Perhaps I should export an "irqfd_signal()" function from kvm, which today will map to eventfd_signal(), and tomorrow to ??. I don't think using f_ops->write() is an option for in-kernel signaling, so we need some kind of interface here. Does that sound reasonable? -Greg --------------enigFEDE34FA9AE74189949A93EA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkn2250ACgkQlOSOBdgZUxnx7ACfUiUVrOtNcfs73R/EeZkU74b4 iTIAoI1a1XslZwh2xr/lvPNMpKtqsR7Q =B43C -----END PGP SIGNATURE----- --------------enigFEDE34FA9AE74189949A93EA--