summaryrefslogtreecommitdiff
path: root/hw/vfio/common.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2015-03-02 11:38:55 -0700
committerAlex Williamson <alex.williamson@redhat.com>2015-03-02 11:38:55 -0700
commit6ee47c90081b3ab5980eeef1a8b12b54bac98bb5 (patch)
tree1979d6b81a50f441a02e072ccfcf2c450e23bfe5 /hw/vfio/common.c
parent51b833f4405426b63b66380117bbe1f4c8976021 (diff)
downloadqemu-6ee47c90081b3ab5980eeef1a8b12b54bac98bb5.tar.gz
vfio: allow to disable MMAP per device with -x-mmap=off option
Disabling MMAP support uses the slower read/write accesses but allows to trace all MMIO accesses, which is not good for performance, but very useful for reverse engineering PCI drivers. This option allows to disable MMAP per device without a compile-time change. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio/common.c')
-rw-r--r--hw/vfio/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 4ff8cab0df..9db7d8da17 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -493,7 +493,7 @@ int vfio_mmap_region(Object *obj, VFIORegion *region,
int ret = 0;
VFIODevice *vbasedev = region->vbasedev;
- if (VFIO_ALLOW_MMAP && size && region->flags &
+ if (vbasedev->allow_mmap && size && region->flags &
VFIO_REGION_INFO_FLAG_MMAP) {
int prot = 0;