qemu-e2k/include/sysemu
Stefano Stabellini 1ff7c5986a xen/mapcache: store dma information in revmapcache entries for debugging
The Xen mapcache is able to create long term mappings, they are called
"locked" mappings. The third parameter of the xen_map_cache call
specifies if a mapping is a "locked" mapping.

>From the QEMU point of view there are two kinds of long term mappings:

[a] device memory mappings, such as option roms and video memory
[b] dma mappings, created by dma_memory_map & friends

After certain operations, ballooning a VM in particular, Xen asks QEMU
kindly to destroy all mappings. However, certainly [a] mappings are
present and cannot be removed. That's not a problem as they are not
affected by balloonning. The *real* problem is that if there are any
mappings of type [b], any outstanding dma operations could fail. This is
a known shortcoming. In other words, when Xen asks QEMU to destroy all
mappings, it is an error if any [b] mappings exist.

However today we have no way of distinguishing [a] from [b]. Because of
that, we cannot even print a decent warning.

This patch introduces a new "dma" bool field to MapCacheRev entires, to
remember if a given mapping is for dma or is a long term device memory
mapping. When xen_invalidate_map_cache is called, we print a warning if
any [b] mappings exist. We ignore [a] mappings.

Mappings created by qemu_map_ram_ptr are assumed to be [a], while
mappings created by address_space_map->qemu_ram_ptr_length are assumed
to be [b].

The goal of the patch is to make debugging and system understanding
easier.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
2017-05-16 11:49:09 -07:00
..
accel.h accel: make configure_accelerator return void 2016-05-18 15:04:27 +03:00
arch_init.h nios2: Add support for Nios-II R1 2017-01-24 13:10:36 -08:00
balloon.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
block-backend.h block: Add errp to b{lk,drv}_truncate() 2017-04-28 16:02:02 +02:00
blockdev.h blockdev: Make orphaned -drive fatal 2017-02-21 13:17:45 +01:00
bt.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
char.h A large set of small patches. I have not included yet vhost-user-scsi, 2017-05-08 13:29:40 -04:00
cpus.h cpus: define QEMUTimerListNotifyCB for QEMU system emulation 2017-03-14 13:28:29 +01:00
cryptodev.h cryptodev: wrap the ready flag 2017-01-10 07:02:52 +02:00
device_tree.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
dma.h dma-helpers: explicitly pass alignment into DMA helpers 2016-10-27 16:29:13 -04:00
dump-arch.h dump: allow target to set the physical base 2016-01-15 14:40:25 +00:00
dump.h dump: Acquire BQL around vm_start() in dump thread 2017-05-05 12:10:00 +02:00
hax.h target/i386: Add Intel HAX files 2017-01-19 22:07:46 +01:00
hostmem.h hostmem: introduce host_memory_backend_mr_inited() 2017-04-20 15:22:41 -03:00
hw_accel.h Plumb the HAXM-based hardware acceleration support 2017-01-19 22:07:46 +01:00
iothread.h iothread: add poll-grow and poll-shrink parameters 2017-01-03 16:38:50 +00:00
kvm.h spapr: Add ibm,processor-radix-AP-encodings to the device tree 2017-04-26 12:00:41 +10:00
kvm_int.h kvm-all: add support for multiple address spaces 2015-07-06 17:59:43 +02:00
memory_mapping.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
numa.h numa: remove node_cpu bitmaps as they are no longer used 2017-05-11 16:08:50 -03:00
os-posix.h build: include sys/sysmacros.h for major() and minor() 2017-03-14 10:08:22 +00:00
os-win32.h log: Add locking to large logging blocks 2016-11-01 10:29:03 -06:00
qtest.h include: Clean up includes 2016-02-23 12:43:05 +00:00
replay.h replay: add record/replay for audio passthrough 2017-03-01 15:11:44 +01:00
reset.h hw: move reset handlers from vl.c to hw/core 2017-01-16 17:52:35 +01:00
rng-random.h rng-random: rename RndRandom to RngRandom 2016-05-23 12:18:43 +05:30
rng.h rng: switch request queue to QSIMPLEQ 2016-03-08 12:54:14 +05:30
seccomp.h include: Clean up includes 2016-02-23 12:43:05 +00:00
sysemu.h numa: Allow setting NUMA distance for different NUMA nodes 2017-05-11 16:08:37 -03:00
tpm.h TPM: fix build with tpm disabled 2015-06-03 18:19:15 +02:00
tpm_backend.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
tpm_backend_int.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
watchdog.h watchdog: introduction of get_watchdog_action 2016-01-27 15:34:47 +01:00
xen-mapcache.h xen/mapcache: store dma information in revmapcache entries for debugging 2017-05-16 11:49:09 -07:00