From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgWqY-0003h0-7y for qemu-devel@nongnu.org; Sun, 26 May 2013 05:02:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgWqQ-0000ay-TE for qemu-devel@nongnu.org; Sun, 26 May 2013 05:02:34 -0400 Received: from mout.web.de ([212.227.17.11]:60780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgWqQ-0000aj-K7 for qemu-devel@nongnu.org; Sun, 26 May 2013 05:02:26 -0400 Message-ID: <51A1CF92.7030708@web.de> Date: Sun, 26 May 2013 11:02:10 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1369133851-1894-1-git-send-email-pbonzini@redhat.com> <1369133851-1894-18-git-send-email-pbonzini@redhat.com> <51A05CDF.1090106@web.de> <51A06C9B.5060302@redhat.com> <51A09018.7000901@web.de> <51A09E6F.7030109@redhat.com> <51A0A0D5.5000706@web.de> <51A1CE2F.5050508@redhat.com> In-Reply-To: <51A1CE2F.5050508@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2NIHIHXLFGWGLVAKIJKHA" Subject: Re: [Qemu-devel] [PATCH 17/30] memory: add address_space_translate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, David Gibson This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2NIHIHXLFGWGLVAKIJKHA Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2013-05-26 10:56, Paolo Bonzini wrote: > Il 25/05/2013 13:30, Jan Kiszka ha scritto: >> On 2013-05-25 13:20, Paolo Bonzini wrote: >>> Il 25/05/2013 12:19, Jan Kiszka ha scritto: >>>> addr -=3D section->offset_within_address_space; - len =3D >>>> MIN(section->size - addr, len); >>> ^^^^^^^^^^^^^ ^^^^ >>> >>> This is the size of a section minus an offset in the section. >>> >>>> + diff =3D int128_sub(section->mr->size, >>>> int128_make64(addr)); >>> ^^^^^^^^^^^^^^^^^ ^^^^ >>> >>> This is the size of a region minus the same offset in the >>> section. >>> >>>> + len =3D MIN(int128_get64(diff), len); >>>> >>>> /* Compute offset within MemoryRegion */ addr +=3D >>>> section->offset_within_region; >>> >>> So this has to be moved above. >=20 >> Right, fixed. >=20 >>> Do you have a branch pushed somewhere that I can test against? >=20 >> git://git.kiszka.org/qemu.git queues/ioport >=20 > Nice patches. Only one thing, how is .impl.unaligned different from > the existing .valid.unaligned? See memory.h: valid controls is an unaligned access traps or gets processed, impl manages if it is passed as-is to the device or broken up and aligned first. Jan ------enig2NIHIHXLFGWGLVAKIJKHA 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 Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGhz5UACgkQitSsb3rl5xQE4ACffs6mOf1EghwnzWcKVDUuDfKQ 0O0AoKW9DDV3KQVA3Fyb1Ur1P1R2877J =VK17 -----END PGP SIGNATURE----- ------enig2NIHIHXLFGWGLVAKIJKHA--