From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMqDK-00017N-8d for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:26:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMqDG-0006eW-Tu for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:26:34 -0400 Received: from ozlabs.org ([103.22.144.67]:35135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMqDG-0006eB-IY for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:26:30 -0400 Date: Tue, 12 Jul 2016 15:27:50 +1000 From: David Gibson Message-ID: <20160712052750.GY16355@voom.fritz.box> References: <1467934423-5997-1-git-send-email-andrew.smirnov@gmail.com> <1467934423-5997-7-git-send-email-andrew.smirnov@gmail.com> <20160708034259.GC14675@voom.fritz.box> <20160711022401.GI16355@voom.fritz.box> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BERr2LqgA7m/bZG/" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 6/9] Convert cpu_memory_rw_debug to use MMUAccessType List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Andrey Smirnov , QEMU Developers --BERr2LqgA7m/bZG/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 11, 2016 at 05:27:50PM +0100, Peter Maydell wrote: > On 11 July 2016 at 03:24, David Gibson wrot= e: > > On Sun, Jul 10, 2016 at 08:32:32PM +0100, Peter Maydell wrote: > >> On 8 July 2016 at 04:42, David Gibson wr= ote: > >> > My only concern here is that the constants are named > >> > *MMU*_DATA_... whereas these are physical memory accesses not > >> > involving the MMU. I can't actually see any current users of > >> > MMUAccessType which makes me a bit confused as to what it's intended > >> > meaning was > >> > >> If you grep for MMU_DATA_LOAD/MMU_DATA_STORE/MMU_INST_FETCH > >> you'll see the uses. A lot of the softmmu code uses the > >> convention of 0=3Dread,1=3Dwrite,2=3Dinsn (which developed I > >> think historically from a bool "is_write", which you'll > >> still see in some function argument names, that was > >> augmented to handle insn-fetch separately). The enum > >> gives us some symbolic names for the constant values. > >> (There's a proposed patch somewhere to change the > >> 'int is_write' arguments to actually use the enum type.) > > > > Ah, yes, I see. Still surprisingly few, actually. >=20 > Yeah, we didn't go through (yet) and update the legacy code, > just provided the common type so new code could use it. Ah, yes, I see. > > My concern about the potentially misleading name still stands. >=20 > I don't mind if we want to rename it, but I don't think we want > to have two types. This is all in the softmmu code, whether it's > in the physical-address parts or the virtual-address parts. Right, I agree we shouldn't have two types. I think we should rename the existing constants, though, since it doesn't really have anything to do with the MMU. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --BERr2LqgA7m/bZG/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXhH/WAAoJEGw4ysog2bOSf00QALhIBa3Krx0kV0922bp7tr1Y 2RFe8zytx7GuHyAh/IUKO3BUgwz3LVYutHED458PYH6DH/P8vJrKytdrXCL2fmpE kHhFgpfewyEMqSoIaUzVBG4L0CbUR/wuHAz8kHNSARSD9X1aijNMHdqkTBRfVrm+ T5XItU+RWOeNY71q8eYfC/qajvWpBy190Zp5XmrcbtMQgDvnz58HWz2pxauh6HQS u1/ikwW0KwGRAc6juMC3JfXFnyJzg2c2GzvSLTu4KtwFPkIOI3HvztfdB7ynUQlL kWr6rSA/dRVPpB596FQJuSrxxaJaMP3FIcMUdPnaPEIFmE7P4/rQy0grbtyKVh/O UCVOiBPWKuuKhvEeWUW28HI8vNxjTmZJ/PF78br/U4b787uMTfByQfRUxnoSLvId ZylE5xbPtpxCLW1Mk/iFH7GxzR68WADmadsb5pO+pjbNjRq52WFPEN6/j8wnG2au 0YeHvgDzL6gIg+ds9A0hNlU27t2GkLRNDN0pwi8P5aP1pQ41KU2BRF1megp20Adv oKkn88V5i1t2wjHEOAL+JCzJA7To1/m+xxAK59+Ssl28mDxrWNe8UtDRrViDraAd GSgySsqc3/BcdgCsCeNQsSDrqQquAKaH0GHTTEOxe2lYwarOfs+rK7gBwaOoCwTf 1IeF4i0PXPulvGKhlsyw =/Ihv -----END PGP SIGNATURE----- --BERr2LqgA7m/bZG/--