From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXDMI-0006UM-2I for qemu-devel@nongnu.org; Sun, 04 Dec 2011 09:48:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXDMG-0004Mj-4Q for qemu-devel@nongnu.org; Sun, 04 Dec 2011 09:48:01 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:59354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXDMF-0004Md-L3 for qemu-devel@nongnu.org; Sun, 04 Dec 2011 09:48:00 -0500 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate03.web.de (Postfix) with ESMTP id D589E1AB34C55 for ; Sun, 4 Dec 2011 15:47:58 +0100 (CET) Message-ID: <4EDB8817.4050803@web.de> Date: Sun, 04 Dec 2011 15:47:51 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20111204142413.GA21238@redhat.com> <4EDB853A.6050901@web.de> <20111204144844.GA21645@redhat.com> In-Reply-To: <20111204144844.GA21645@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7334C4DE673C205B3C4775E1" Subject: Re: [Qemu-devel] [PATCH 4/6] msi: Invoke msi/msix_reset from PCI core List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Isaku Yamahata , Gerd Hoffmann , qemu-devel , Alexander Graf This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7334C4DE673C205B3C4775E1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-12-04 15:48, Michael S. Tsirkin wrote: > On Sun, Dec 04, 2011 at 03:35:38PM +0100, Jan Kiszka wrote: >> On 2011-12-04 15:24, Michael S. Tsirkin wrote: >>> On Sun, Dec 04, 2011 at 02:22:12PM +0100, Jan Kiszka wrote: >>>> From: Jan Kiszka >>>> >>>> There is no point in pushing this burden to the devices, they may ra= ther >>>> forget to call them (like intel-hda and ahci ATM). Instead, reset >>>> functions are now called from pci_device_reset and pci_bridge_reset.= >>>> They do nothing if the MSI/MSI-X is not in use. >>>> >>>> CC: Alexander Graf >>>> CC: Gerd Hoffmann >>>> CC: Isaku Yamahata >>>> Signed-off-by: Jan Kiszka >>> >>> What makes me unhappy with this proposal is that msix_write_config, f= or >>> example, becomes in fact an internal interface. So devices should be >>> calling some functions like msix_init from msix.h, but not others lik= e >>> msix_write_config. >>> >>> It used to be simple: devices should call msix_. >>> Now, how are devices to figure it out? >>> >>> E.g. the comment near msix_write_config says: >>> /* Handle MSI-X capability config write. */ >> >> That should be aligned to msi_write_config's comment. >> >> My goal is to reduce the number of calls devices have to do in order t= o >> use MSI. We have quite a few correct examples by now, so it should not= >> be too hard to figure out what to do to use standard MSI[X] services. >> >> Maybe a PCI skeleton device model would help further. Or up-to-date >> documentation, thought that may be even harder. ;) >=20 > Maybe it's time to move code into hw/pci/ ? > Then we could have private interfaces without > kludges like pci_internals.h ... >=20 Sounds reasonable. Jan --------------enig7334C4DE673C205B3C4775E1 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/ iEYEARECAAYFAk7biBcACgkQitSsb3rl5xTeMQCfYFbNkSoE8kdOhiXoUI+P8ljY UVYAn2A3d4l1AVSXS1rj0tVXBOkkTjII =byEI -----END PGP SIGNATURE----- --------------enig7334C4DE673C205B3C4775E1--