qemu/hw/i386
Peter Xu f06a696dc9 intel_iommu: provide its own replay() callback
The default replay() don't work for VT-d since vt-d will have a huge
default memory region which covers address range 0-(2^64-1). This will
normally consumes a lot of time (which looks like a dead loop).

The solution is simple - we don't walk over all the regions. Instead, we
jump over the regions when we found that the page directories are empty.
It'll greatly reduce the time to walk the whole region.

To achieve this, we provided a page walk helper to do that, invoking
corresponding hook function when we found an page we are interested in.
vtd_page_walk_level() is the core logic for the page walking. It's
interface is designed to suite further use case, e.g., to invalidate a
range of addresses.

Reviewed-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: \"Michael S. Tsirkin\" <mst@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <1491562755-23867-8-git-send-email-peterx@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-04-20 15:22:41 -03:00
..
kvm kvmclock: Don't crash QEMU if KVM is disabled 2017-03-14 13:26:36 +01:00
xen Xen 2017/02/02 2017-02-03 12:31:40 +00:00
acpi-build.c virtio, pc: fixes, features 2017-03-03 10:09:03 +00:00
acpi-build.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
amd_iommu.c trace: Avoid abuse of amdvi_mmio_read 2017-03-24 09:21:42 +00:00
amd_iommu.h i386: amd_iommu: fix MMIO register count and access 2016-12-16 01:14:38 +02:00
intel_iommu_internal.h intel_iommu: add "caching-mode" option 2017-02-17 21:52:31 +02:00
intel_iommu.c intel_iommu: provide its own replay() callback 2017-04-20 15:22:41 -03:00
kvmvapic.c tcg: drop global lock during TCG code execution 2017-02-24 10:32:45 +00:00
Makefile.objs hw/i386: Introduce AMD IOMMU 2016-09-24 01:02:00 +03:00
multiboot.c multiboot: copy the cmdline verbatim, unescape module strings 2016-12-22 16:00:26 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc_piix.c pc: Add 2.9 machine-types 2017-01-18 22:59:53 +02:00
pc_q35.c pc: Add 2.9 machine-types 2017-01-18 22:59:53 +02:00
pc_sysfw.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
pc.c machine: replace query_hotpluggable_cpus() callback with has_hotpluggable_cpus flag 2017-02-22 11:28:28 +11:00
pci-assign-load-rom.c pci-assign: avoid pointless stat 2017-01-24 23:26:53 +03:00
trace-events intel_iommu: provide its own replay() callback 2017-04-20 15:22:41 -03:00
x86-iommu.c intel_iommu: support device iotlb descriptor 2017-01-10 05:56:58 +02:00