From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgWpS-0002A5-5o for qemu-devel@nongnu.org; Sun, 26 May 2013 05:01:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgWpJ-0000T5-Mk for qemu-devel@nongnu.org; Sun, 26 May 2013 05:01:25 -0400 Received: from mail-ea0-x229.google.com ([2a00:1450:4013:c01::229]:42328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgWpJ-0000T1-HV for qemu-devel@nongnu.org; Sun, 26 May 2013 05:01:17 -0400 Received: by mail-ea0-f169.google.com with SMTP id m14so3498531eaj.28 for ; Sun, 26 May 2013 02:01:16 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51A1CF4C.2070903@redhat.com> Date: Sun, 26 May 2013 11:01:00 +0200 From: Paolo Bonzini 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> In-Reply-To: <51A0A0D5.5000706@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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: Jan Kiszka Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, David Gibson -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 -= section->offset_within_address_space; - len = >>> MIN(section->size - addr, len); >> ^^^^^^^^^^^^^ ^^^^ >> >> This is the size of a section minus an offset in the section. >> >>> + diff = int128_sub(section->mr->size, >>> int128_make64(addr)); >> ^^^^^^^^^^^^^^^^^ ^^^^ >> >> This is the size of a region minus the same offset in the >> section. >> >>> + len = MIN(int128_get64(diff), len); >>> >>> /* Compute offset within MemoryRegion */ addr += >>> section->offset_within_region; >> >> So this has to be moved above. > > Right, fixed. > >> Do you have a branch pushed somewhere that I can test against? > > git://git.kiszka.org/qemu.git queues/ioport And another thing... in "ioport: Switch dispatching to memory core layer", could you put memory_region_iorange_read/write in mr->ops->read/write instead of adding an "if" in the dispatch routines? Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRoc9MAAoJEBvWZb6bTYbya6IP/Rso0r/qUrRttOZYyC0GX1IL xBXZEyCDrbV49pQw9O85Lpb2BRzbUOy38RZ/gvrUfGzg9iYo+88nxoA4qiTXSKil IBxC/Nu5QCcV01zTWLE7dsjAGVVP6td2UWqtI/41T7H1OmhmN9BR2hD0hHhDT6aO f1KAhzkrdD2aOJHCyWjtehriZFH+J638QuAem8zMIC6kFGOBm475iYBI5l4haXaN k2Rx66EaOuJRFzZVscHnTw3Ohrk2QZEe8EpBScQIf3hxAlDv4wPDzXYjADUmCGhH u5dHXSDMgD3+ll5/XLAq3dX/lZPn6nJCzAqV2DPboAxhjpe5+gt0i50r91Di8T+3 Rn8ycEi5hy7Pck++ijwTDs4JGU1vGvT6xpnCmsTwiU3Tw5Yd8lNEQJyOQAMsdsrH GX+Tsqiowoq8LKVACHSOHouffUB4TM5XdUN0dPGKdohPGyDSlRlkE58mFPeBmMRT SIhaCPkykpRguNFnkxx5iLl66yUsi5Jb0qeXslffKKx6wCr6N5d3jOeb2jqjG/LT AAlQ4U5GdKbKU6rDWmcB8GeV2HZh9+ivIUwC4Q4+s+inlaXXh5V4hnNKQ8aHc2MX wBfq07Zit8bbCUvB+tYf+ORAWHUV1BFWjFRkE4sZ08ouCs45TN7Ug67334GyPvxe K5Zz+3M9ZKkvnK4kNINg =71ln -----END PGP SIGNATURE-----