From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M78Mx-0003Gc-BT for qemu-devel@nongnu.org; Thu, 21 May 2009 09:31:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M78Ms-0003GI-Uu for qemu-devel@nongnu.org; Thu, 21 May 2009 09:31:34 -0400 Received: from [199.232.76.173] (port=51364 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M78Ms-0003GF-Ov for qemu-devel@nongnu.org; Thu, 21 May 2009 09:31:30 -0400 Received: from mx20.gnu.org ([199.232.41.8]:57354) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M78Ms-000355-CK for qemu-devel@nongnu.org; Thu, 21 May 2009 09:31:30 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M78Mr-0007UC-II for qemu-devel@nongnu.org; Thu, 21 May 2009 09:31:29 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH] qemu: msi irq allocation api Date: Thu, 21 May 2009 14:31:26 +0100 References: <20090520162130.GA22109@redhat.com> <20090521131231.GH25309@redhat.com> <200905211423.20843.paul@codesourcery.com> In-Reply-To: <200905211423.20843.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905211431.27287.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Carsten Otte , kvm@vger.kernel.org, Rusty Russell , qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, Christian Borntraeger , Avi Kivity On Thursday 21 May 2009, Paul Brook wrote: > > > MSI provides multiple edge triggered interrupts, whereas traditional > > > mode provides a single level triggered interrupt. My guess is most > > > devices will want to treat these differently anyway. > > > > So, is qemu_send_msi better than qemu_set_irq. > > Neither. pci_send_msi, which is a trivial wrapper around stl_phys. To clarify, you seem to be trying to fuse two largely separate features together. MSI is a standard PCI device capability[1] that involves the device performing a 32-bit memory write when something interesting occurs. These writes may or may not be directed at a APIC. The x86 APIC has a memory mapped interface that allows generation of CPU interrupts in response response to memory writes. These may or may not come from an MSI capable PCI device. Paul [1] Note a *device* capability, not a bus capability.