From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzZ57-0000W3-DV for qemu-devel@nongnu.org; Mon, 01 Jun 2015 19:25:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzZ54-0005uV-6u for qemu-devel@nongnu.org; Mon, 01 Jun 2015 19:25:21 -0400 Message-ID: <556CE9DC.4060200@redhat.com> Date: Mon, 01 Jun 2015 19:25:16 -0400 From: John Snow MIME-Version: 1.0 References: <1433102732-24034-1-git-send-email-mark.cave-ayland@ilande.co.uk> <556CE630.4000308@redhat.com> <556CE852.1030901@ilande.co.uk> In-Reply-To: <556CE852.1030901@ilande.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/4] macio: change DMA methods over to offset/len implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland , agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org On 06/01/2015 07:18 PM, Mark Cave-Ayland wrote: > On 02/06/15 00:09, John Snow wrote: >=20 >> On 05/31/2015 04:05 PM, Mark Cave-Ayland wrote: >>> This patchset follows on from my recent work on fixing issues with th= e >>> macio controller, and remodels the new pmac_dma_read() and pmac_dma_w= rite() >>> functions in a similar manner to the unaligned block functions. >>> >>> With this in place, long chains of overlapping unaligned requests as = used >>> by OS X/Darwin will now work correctly without introducting torn sect= or >>> errors when writing to disk. >>> >>> Also included are some tidy-ups as a result of the above changes. >>> >>> Signed-off-by: Mark Cave-Ayland >>> >>> Mark Cave-Ayland (4): >>> macio: switch pmac_dma_read() over to new offset/len implementation >>> macio: switch pmac_dma_write() over to new offset/len implementatio= n >>> macio: update comment/constants to reflect the new code >>> macio: remove remainder_len DBDMA_io property >>> >>> hw/ide/macio.c | 271 +++++++++++++++++-----------------= ---------- >>> include/hw/ppc/mac_dbdma.h | 4 +- >>> 2 files changed, 105 insertions(+), 170 deletions(-) >>> >> >> More 32/64bit printf string problems: >> >> macio.c:81: sector_num is int64_t (PRId64) >> macio.c:93: sector_num >> head_bytes is size_t (%zu) >> macio.c:107: sector_num >> tail_bytes is size_t (%zu) >> macio.c:147: sector_num >> macio.c:160: sector_num >> macio.c:178: sector_num >=20 > Ah oops. Do you need me to correct? And do you have a quick way of > testing a 32-bit build on a 64-bit OS? (-m32)? >=20 Unfortunately that's the best I've got. For my particular case I tend to use this: ./configure --enable-debug '--extra-cflags=3D-m32 -I/usr/lib/glib-2.0/include' '--extra-ldflags=3D-m32 -L/usr/lib/iscsi' --disable-glusterfs and that helps guide my F21 through the unholy machinations necessary to produce a 32-ish bit build. I've tried to fix this in the past, but I keep running into edge cases for e.g. cross compilation and issues with how different distros handle multi-lib/multi-arch, so it remains sort of hacky and bad. Wait to send v2 until after I look at the series a little more carefully, in case there's something else. >> But that's an unsatisfying response, so how about: >> >> Tested-by: John Snow >> >> Fixes the problem as far as I can tell. I'll comb it in a little more >> detail later. Have you tested this patchset with OSX et al to make sur= e >> it doesn't introduce any obvious regression on that side of things? >=20 > Most of the work was done on Darwin (which definitely does unaligned > accesses) and I booted an OS X CDROM through to the point where the har= d > disk started installing, so I'm reasonably confident in the patch. And > more so that it's based upon the existing block alignment code in io.c. >=20 > Basically the point of fixing up the -M g3beige/mac99 loadvm/savevm > (which is almost there except for DBDMA) in the last release was to hel= p > debug this. At least I could get to a point where I could start QEMU > with -loadvm, run a single cp command and then md5 the results to check > for errors rather than having to wait for an entire OS install. >=20 If it's good enough for the mac-minded among us, it's good enough for me! >=20 > ATB, >=20 > Mark. >=20 Thanks again! --js