1. 30 6月, 2014 3 次提交
    • C
      virtio-net: byteswap virtio-net header · 032a74a1
      Cédric Le Goater 提交于
      TCP connectivity fails when the guest has a different endianness.
      The packets are silently dropped on the host by the tap backend
      when they are read from user space because the endianness of the
      virtio-net header is in the wrong order. These lines may appear
      in the guest console:
      
      [  454.709327] skbuff: bad partial csum: csum=8704/4096 len=74
      [  455.702554] skbuff: bad partial csum: csum=8704/4096 len=74
      
      The issue that got first spotted with a ppc64le PowerKVM guest,
      but it also exists for the less common case of a x86_64 guest run
      by a big-endian ppc64 TCG hypervisor.
      Signed-off-by: NCédric Le Goater <clg@fr.ibm.com>
      [ Ported from PowerKVM,
        Greg Kurz <gkurz@linux.vnet.ibm.com> ]
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      032a74a1
    • M
      vhost-user: typo fixups · a628fc8d
      Michael S. Tsirkin 提交于
      Fix typo in field name.
      Strip two consequitive empty lines.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a628fc8d
    • 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
  2. 29 6月, 2014 29 次提交
  3. 28 6月, 2014 8 次提交