From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L29j1-0006pj-Rq for qemu-devel@nongnu.org; Mon, 17 Nov 2008 14:25:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L29j0-0006oV-VK for qemu-devel@nongnu.org; Mon, 17 Nov 2008 14:25:31 -0500 Received: from [199.232.76.173] (port=49463 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L29j0-0006oG-OG for qemu-devel@nongnu.org; Mon, 17 Nov 2008 14:25:30 -0500 Received: from ug-out-1314.google.com ([66.249.92.175]:35907) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L29j0-0007Jl-0F for qemu-devel@nongnu.org; Mon, 17 Nov 2008 14:25:30 -0500 Received: by ug-out-1314.google.com with SMTP id 29so548413ugc.36 for ; Mon, 17 Nov 2008 11:25:28 -0800 (PST) Message-ID: Date: Mon, 17 Nov 2008 21:25:27 +0200 From: "Blue Swirl" In-Reply-To: <20081117173417.GT31893@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081117173417.GT31893@us.ibm.com> Subject: [Qemu-devel] Re: [RESEND][PATCH] Add 40-bit DMA support to LSI scsi emulation Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ryan Harper Cc: qemu-devel@nongnu.org, Paul Brook On 11/17/08, Ryan Harper wrote: > > Looking for some feedback on this patch, MAINTAINERS points to Paul for > scsi stuff, and I saw Blue Swirl commit a scsi patch recently. > > This patch fixes Linux machines configured with > 4G of ram and using a > SCSI device. I'm working on 64-bit DMA support as well which should > hopefully fix 64-bit Windows using SCSI devices as well. addr = s->dnad; + if (lsi_dma_40bit(s)) + addr |= ((uint64_t)s->dnad64 << 32UL); + else if (s->sbms) + addr |= ((uint64_t)s->sbms << 32UL); Maybe the address could be calculated at script parsing phase for small performance gain. I would use ULL instead of UL, because on 32 bit host long is still 32 bits. > + DPRINTF("DMA addr=0x%" PRIx64 " len=%d\n", addr, count); PRIx64 will be incorrect if target_phys_addr_t is 32 bits. You should use TARGET_FMT_plx instead. > + uint32_t addr, addr64; Looking at the code after this I thought that addr64 is 64 bits, maybe addr_high would be a better name?