From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8RC-0000Qw-IL for qemu-devel@nongnu.org; Tue, 18 Oct 2011 08:06:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG8RA-0006HJ-7I for qemu-devel@nongnu.org; Tue, 18 Oct 2011 08:06:30 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:57335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8R9-0006H8-P6 for qemu-devel@nongnu.org; Tue, 18 Oct 2011 08:06:28 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate03.web.de (Postfix) with ESMTP id 432AF1A45824A for ; Mon, 17 Oct 2011 23:00:17 +0200 (CEST) Message-ID: <4E9C7E9B.1060404@web.de> Date: Mon, 17 Oct 2011 21:14:35 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <963bfdb7ee30cd65bec92c89cc04af0363de86c8.1318843693.git.jan.kiszka@siemens.com> <20111017114612.GE4537@redhat.com> <4E9C16A4.9030402@siemens.com> <20111017120404.GG4537@redhat.com> <4E9C1B0A.5080707@siemens.com> <20111017130145.GK4537@redhat.com> In-Reply-To: <20111017130145.GK4537@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE545697E2A0D1BEBE0E36E83" Subject: Re: [Qemu-devel] [RFC][PATCH 08/45] Introduce MSIMessage structure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Alex Williamson , Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE545697E2A0D1BEBE0E36E83 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-10-17 15:01, Michael S. Tsirkin wrote: > On Mon, Oct 17, 2011 at 02:09:46PM +0200, Jan Kiszka wrote: >> On 2011-10-17 14:04, Michael S. Tsirkin wrote: >>> On Mon, Oct 17, 2011 at 01:51:00PM +0200, Jan Kiszka wrote: >>>> On 2011-10-17 13:46, Michael S. Tsirkin wrote: >>>>> On Mon, Oct 17, 2011 at 11:27:42AM +0200, Jan Kiszka wrote: >>>>>> Will be used for generating and distributing MSI messages, both in= >>>>>> emulation mode and under KVM. >>>>>> >>>>>> Signed-off-by: Jan Kiszka >>>>> >>>>> I would add >>>>> >>>>> uint64_t msix_get_address(dev, vector) >>>>> uint64_t msix_get_data(dev, vector) >>>>> >>>>> and same for msi. >>>>> >>>>> this would minimise the changes while still making it >>>>> possible to avoid code duplication in kvm. >>>> >>>> I'm introducing msi[x]_message_from_vector for that purpose later on= =2E Or >>>> what do you mean? >>>> >>>> Jan >>> >>> It does not look like everyone actually wants the structure, >>> users seem to put it on stack and then immediately >>> unwrap it to get at the address/data. >>> So two accessorts get_data + get_address instead of one, will >>> remove the need to rework all code to use the structure. >> >> The idea of this patch is to start handling MSI messages as a single >> blob. There should be no need to ask a device for parts of that blobs >> this way. >=20 > There should be no need to look at the message at all. > devices really only care about vector numbers. > So we are left with msix.c msi.c and kvm as the only users. > kvm has a cache of messages so it needs a struct of these, > msix/msi don't. MSIMessages is primarily designed for path from the device to the interrupt controller. And there are multiple stops, already in the path after this patch set. Interrupt remapping, e.g., would add another stop. >=20 >> If you see use cases in this series, though, let me know. >> >> Jan >=20 > Yes, I see them. msix_notify is one example. msi_notify is another. >=20 > E.g. msi_notify would IMO look nicer as: > stl_le_phys(msi_get_address(dev, vector), msi_get_data(dev, vector)= ); This line does not exist anymore at the end of this series. See pc_msi_deliver. Jan --------------enigE545697E2A0D1BEBE0E36E83 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6cfpsACgkQitSsb3rl5xRFTgCfWNYwvAO/vFFKsQUrfrz1ASYO jtgAn2iOGKP91SuVdd0xx2xuUMbfG+qG =l5XB -----END PGP SIGNATURE----- --------------enigE545697E2A0D1BEBE0E36E83--