From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqfNI-00083a-Os for qemu-devel@nongnu.org; Mon, 16 Jul 2012 03:05:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqfNB-0002di-Ru for qemu-devel@nongnu.org; Mon, 16 Jul 2012 03:05:44 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:52226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqfNB-0002dO-JB for qemu-devel@nongnu.org; Mon, 16 Jul 2012 03:05:37 -0400 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Jul 2012 08:05:35 +0100 Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6G74slI2420826 for ; Mon, 16 Jul 2012 08:04:54 +0100 Received: from d06av03.portsmouth.uk.ibm.com (localhost.localdomain [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6G74rIR003720 for ; Mon, 16 Jul 2012 01:04:53 -0600 Message-ID: <5003BD14.2090709@de.ibm.com> Date: Mon, 16 Jul 2012 09:04:52 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1342176724-43776-1-git-send-email-borntraeger@de.ibm.com> <1342176724-43776-3-git-send-email-borntraeger@de.ibm.com> <50005058.6000707@de.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] s390: sclp base support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Cornelia Huck , Jens Freimann , Heinz Graalfs , Alexander Graf , qemu-devel On 14/07/12 10:48, Blue Swirl wrote: >>>> + cpu_physical_memory_write(sccb, &work_sccb, >>>> + be16_to_cpu(work_sccb.h.length)); >>> >>> Perhaps the DMA helpers should be used instead. >>> >> >> Is there any rule what to use under which circumstances. > > No, it's a recent addition. Devices (at least those which may be used > in IOMMU environment) should use DMA helpers for their memory accesses > in general but virtio may be an exception. I'm not sure which category > this falls in. Ok, I read this as, if we need to handle DMA into virtual addresses at some point in time dma helpers are the way to go. With SCLP we access real storage (no translation) so I think cpu_physical_memory_write is fine here. Christian