]> git.proxmox.com Git - mirror_qemu.git/commit
exec: abstract address_space_do_translate()
authorPeter Xu <peterx@redhat.com>
Wed, 17 May 2017 08:57:42 +0000 (16:57 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 17 May 2017 21:35:15 +0000 (00:35 +0300)
commita764040cc831cfe5b8bf1c80e8341b9bf2de3ce8
tree86ad673ceb08f68504eaf0eee8b001c160dd200f
parent3936161f1fd72d1dfa577aaba910819c5e873260
exec: abstract address_space_do_translate()

This function is an abstraction helper for address_space_translate() and
address_space_get_iotlb_entry(). It does the lookup of address into
memory region section, then does proper IOMMU translation if necessary.
Refactor the two existing functions to use it.

This fixes vhost when IOMMU is disabled by guest.

Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
exec.c