qemu/include/exec
Damjan Marion 3fd74b8407 vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message
Old code was affected by memory gaps which resulted in buffer pointers
pointing to address outside of the mapped regions.

Here we are introducing following changes:
 - new function qemu_get_ram_block_host_ptr() returns host pointer
   to the ram block, it is needed to calculate offset of specific
   region in the host memory
 - new field mmap_offset is added to the VhostUserMemoryRegion. It
   contains offset where specific region starts in the mapped memory.
   As there is stil no wider adoption of vhost-user agreement was made
   that we will not bump version number due to this change
 - other fileds in VhostUserMemoryRegion struct are not changed, as
   they are all needed for usermode app implementation
 - region data is not taken from ram_list.blocks anymore, instead we
   use region data which is alredy calculated for use in vhost-net
 - Now multiple regions can have same FD and user applicaton can call
   mmap() multiple times with the same FD but with different offset
   (user needs to take care for offset page alignment)

Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2014-06-29 19:39:40 +03:00
..
user abitypes.h: Remove incorrect ARM ABI_LLONG_ALIGNMENT 2013-09-10 19:09:33 +01:00
address-spaces.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
cpu_ldst_template.h softmmu: move all load/store functions to cpu_ldst.h 2014-06-05 16:10:33 +02:00
cpu_ldst.h softmmu: move all load/store functions to cpu_ldst.h 2014-06-05 16:10:33 +02:00
cpu-all.h memory: move RAM_PREALLOC_MASK to exec.c, rename 2014-06-19 18:44:19 +03:00
cpu-common.h NUMA: move numa related code to new file numa.c 2014-06-19 18:44:18 +03:00
cpu-defs.h cpu: Move breakpoints field from CPU_COMMON to CPUState 2014-03-13 19:20:47 +01:00
cputlb.h exec: Change memory_region_section_get_iotlb() argument to CPUState 2014-03-13 19:20:48 +01:00
exec-all.h tcg-ppc: Use uintptr_t in ppc_tb_set_jmp_target 2014-06-23 07:29:30 -07:00
gdbstub.h cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
gen-icount.h cpu: Move icount_decr field from CPU_COMMON to CPUState 2014-03-13 19:20:46 +01:00
helper-gen.h tcg: Move size effects out of dh_arg 2014-05-28 09:33:55 -07:00
helper-head.h tcg: Move size effects out of dh_arg 2014-05-28 09:33:55 -07:00
helper-proto.h tcg: Push tcg-runtime routines into exec/helper-* 2014-05-28 09:33:54 -07:00
helper-tcg.h tcg: Save flags and computed sizemask in TCGHelperInfo 2014-05-28 09:33:54 -07:00
hwaddr.h hwaddr: Make hwaddr type usable beyond softmmu 2013-06-28 13:25:13 +02:00
ioport.h portio: Allow to mark portio lists as coalesced MMIO flushing 2013-10-17 17:24:15 +02:00
memory-internal.h memory: split cpu_physical_memory_* functions to its own include 2014-01-13 14:04:54 +01:00
memory.h hostmem: add property to map memory with MAP_SHARED 2014-06-19 18:44:20 +03:00
poison.h exec: Remove env from list of poisoned names 2013-07-27 11:22:54 +04:00
ram_addr.h vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message 2014-06-29 19:39:40 +03:00
softmmu-semi.h exec: Change cpu_memory_rw_debug() argument to CPUState 2013-07-23 02:41:33 +02:00
spinlock.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00