From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2cgH-0008R9-EA for qemu-devel@nongnu.org; Thu, 03 Jul 2014 04:47:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2cgA-000191-PB for qemu-devel@nongnu.org; Thu, 03 Jul 2014 04:47:49 -0400 Received: from mail-we0-f171.google.com ([74.125.82.171]:45006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2cgA-00018w-It for qemu-devel@nongnu.org; Thu, 03 Jul 2014 04:47:42 -0400 Received: by mail-we0-f171.google.com with SMTP id q58so12443572wes.2 for ; Thu, 03 Jul 2014 01:47:36 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53B5189F.4020909@redhat.com> Date: Thu, 03 Jul 2014 10:47:27 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1404375987-29810-1-git-send-email-tamlokveer@gmail.com> <20140703082852.GC20580@redhat.com> In-Reply-To: <20140703082852.GC20580@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , Le Tan Cc: kwolf@redhat.com, peter.maydell@linaro.org, jan.kiszka@web.de, qemu-devel@nongnu.org, afaerber@suse.de Il 03/07/2014 10:28, Michael S. Tsirkin ha scritto: > On Thu, Jul 03, 2014 at 04:26:27PM +0800, Le Tan wrote: >> In map_page() in hw/ide/ahci.c, replace cpu_physical_memory_map() and >> cpu_physical_memory_unmap() with dma_memory_map() and dma_memory_unmap(), >> because ahci devices should not access memory directly but via their address >> space. Add an AddressSpace parameter to map_page(). In order to call >> map_page(), we should pass the AHCIState.as as the AddressSpace argument. >> >> Signed-off-by: Le Tan > > Makes sense > Reviewed-by: Michael S. Tsirkin I think this is ok for 2.1 as well. Paolo