mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
51b833f440
commit
6ee47c9008
3 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue