On 05/15/2017 10:50 AM, Peter Xu wrote:
The problem is that, address_space_get_iotlb_entry() shares a lot with address_space_translate(). This patch tries to abstract the shared elements. Originally, this work is derived from discussion from VT-d passthrough series discussions [1]. But for sure we can just see this series as a standalone cleanup. So I posted it separately here. Smoke tests are done with general VM boots, IOs, especially with vhost dmar configurations. I believe with current series I can throw away the old patch [1], which may be good. But before that, please kindly review. Thanks.
I faced the problem the old patch fixes when declaring and attaching an IOMMU device, but booting the kernel with intel_iommu=off.
I tested again with patches 1 & 4 of your series, and I confirm it fixes the issue:
Tested-by: Maxime Coquelin <maxime.coque...@redhat.com> Thanks! Maxime
References: [1] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg02335.html Peter Xu (4): exec: simplify phys_page_find() params exec: rename resolve_subpage exec: further use is_mmio exec: abstract address_space_do_translate() exec.c | 122 ++++++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 46 deletions(-)