1. 20 7月, 2015 1 次提交
  2. 01 6月, 2015 1 次提交
  3. 30 4月, 2015 1 次提交
  4. 04 11月, 2014 1 次提交
  5. 18 7月, 2014 2 次提交
  6. 30 6月, 2014 1 次提交
    • D
      vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message · 3fd74b84
      Damjan Marion 提交于
      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: NDamjan Marion <damarion@cisco.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDamjan Marion <damarion@cisco.com>
      3fd74b84
  7. 19 6月, 2014 1 次提交
    • N
      Add vhost-user as a vhost backend. · 5f6f6664
      Nikolay Nikolaev 提交于
      The initialization takes a chardev backed by a unix domain socket.
      It should implement qemu_fe_set_msgfds in order to be able to pass
      file descriptors to the remote process.
      
      Each ioctl request of vhost-kernel has a vhost-user message equivalent,
      which is sent over the control socket.
      
      The general approach is to copy the data from the supplied argument
      pointer to a designated field in the message. If a file descriptor is
      to be passed it will be placed in the fds array for inclusion in
      the sendmsg control header.
      
      VHOST_SET_MEM_TABLE ignores the supplied vhost_memory structure and scans
      the global ram_list for ram blocks with a valid fd field set. This would
      be set when the '-object memory-file' option with share=on property is used.
      Signed-off-by: NAntonios Motakis <a.motakis@virtualopensystems.com>
      Signed-off-by: NNikolay Nikolaev <n.nikolaev@virtualopensystems.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      5f6f6664