From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnCpX-0003kb-7f for qemu-devel@nongnu.org; Tue, 28 Apr 2015 17:14:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnCpW-0005me-2H for qemu-devel@nongnu.org; Tue, 28 Apr 2015 17:14:11 -0400 Message-ID: <553FF813.2010900@ilande.co.uk> Date: Tue, 28 Apr 2015 22:13:55 +0100 From: Mark Cave-Ayland MIME-Version: 1.0 References: <1425939893-14404-1-git-send-email-mark.cave-ayland@ilande.co.uk> <5507D680.5030507@suse.de> <553FF42B.1090008@ilande.co.uk> <553FF6A3.30202@redhat.com> In-Reply-To: <553FF6A3.30202@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , Alexander Graf , qemu-devel@nongnu.org, qemu-ppc@nongnu.org On 28/04/15 22:07, John Snow wrote: > On 04/28/2015 04:57 PM, Mark Cave-Ayland wrote: >> On 17/03/15 07:23, Alexander Graf wrote: >> >>> On 09.03.15 23:24, Mark Cave-Ayland wrote: >>>> This patchset attempts to separate out the IDE/ATAPI logic from the >>>> unaligned >>>> DMA access logic for macio which provides the following benefits: >>>> >>>> 1) Reduced code complexity >>>> >>>> The existing macio IDE/ATAPI functions were becoming extremely >>>> difficult to >>>> follow through the various callbacks. By splitting up the functions >>>> in this >>>> way it becomes much easier to follow the DMA-specific sections of code. >>>> >>>> 2) Future-proofing >>>> >>>> If/when the block layer becomes able to handle unaligned DMA >>>> accesses directly >>>> then it should be possible to switch out pmac_dma_read() and >>>> pmac_dma_write() >>>> with their unaligned-capable bdrv_*() equivalents without having to >>>> change any >>>> other logic. >>>> >>>> 3) Fix intermittent CDROM detection under -M g3beige >>>> >>>> The code refactoring now correctly handles non-block ATAPI transfers >>>> which >>>> fixes the problem with intermittent CDROM detection with Darwin under >>>> -M g3beige. >>>> >>>> Signed-off-by: Mark Cave-Ayland >>> >>> Works for me, I'd still prefer to just see unaligned bdrv_*() functions >>> and remove most of the logic we have here. >>> >>> Either way, I think this is a reasonable intermediate step. >> >> Ping? John - I've added you as CC as per Stefan's request. >> >> >> ATB, >> >> Mark. >> > > Yup, didn't forget. Plan to review/test tomorrow. > > Thanks, > --js Great, thanks! FWIW this patchset is a WIP to try and fix the bug introduced by 3e300fa6ad4ee19b16339c25773dec8df0bfb982 which breaks installation of my Darwin PPC test image (I still see exactly the same problem with my patch, however the code paths are somewhat clearer). So if you have some ideas as to why the above commit broke the install, I'd be very interested to hear them - I can easily put together some reproducer instructions. ATB, Mark.