]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
ahci: map memory via device's address space instead of address_space_memory
authorLe Tan <tamlokveer@gmail.com>
Thu, 3 Jul 2014 08:26:27 +0000 (16:26 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 7 Jul 2014 08:22:43 +0000 (10:22 +0200)
commit5a18e67dfd515992076c5fcae47035fdd3ed2462
tree57f9ad5f936eca9f56e38d605baf70160ed024ef
parentaa729704f48331787d0afac510df214aedda2843
ahci: map memory via device's address space instead of address_space_memory

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 <tamlokveer@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/ide/ahci.c