1. 04 7月, 2016 1 次提交
  2. 27 6月, 2016 1 次提交
  3. 16 2月, 2016 1 次提交
    • G
      virtio-net: use the backend cross-endian capabilities · 1bfa316c
      Greg Kurz 提交于
      When running a fully emulated device in cross-endian conditions, including
      a virtio 1.0 device offered to a big endian guest, we need to fix the vnet
      headers. This is currently handled by the virtio_net_hdr_swap() function
      in the core virtio-net code but it should actually be handled by the net
      backend.
      
      With this patch, virtio-net now tries to configure the backend to do the
      endian fixing when the device starts (i.e. drivers sets the CONFIG_OK bit).
      If the backend cannot support the requested endiannes, we have to fallback
      onto virtio_net_hdr_swap(): this is recorded in the needs_vnet_hdr_swap flag,
      to be used in the TX and RX paths.
      
      Note that we reset the backend to the default behaviour (guest native
      endianness) when the device stops (i.e. device status had CONFIG_OK bit and
      driver unsets it). This is needed, with the linux tap backend at least,
      otherwise the guest may lose network connectivity if rebooted into a
      different endianness.
      
      The current vhost-net code also tries to configure net backends. This will
      be no more needed and will be reverted in a subsequent patch.
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NLaurent Vivier <lvivier@redhat.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>
      Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
      1bfa316c
  4. 07 2月, 2016 1 次提交
    • P
      virtio: move allocation to virtqueue_pop/vring_pop · 51b19ebe
      Paolo Bonzini 提交于
      The return code of virtqueue_pop/vring_pop is unused except to check for
      errors or 0.  We can thus easily move allocation inside the functions
      and just return a pointer to the VirtQueueElement.
      
      The advantage is that we will be able to allocate only the space that
      is needed for the actual size of the s/g list instead of the full
      VIRTQUEUE_MAX_SIZE items.  Currently VirtQueueElement takes about 48K
      of memory, and this kind of allocation puts a lot of stress on malloc.
      By cutting the size by two or three orders of magnitude, malloc can
      use much more efficient algorithms.
      
      The patch is pretty large, but changes to each device are testable
      more or less independently.  Splitting it would mostly add churn.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      51b19ebe
  5. 29 1月, 2016 1 次提交
  6. 01 10月, 2015 1 次提交
  7. 24 9月, 2015 2 次提交
  8. 10 9月, 2015 1 次提交
  9. 13 8月, 2015 1 次提交
  10. 27 7月, 2015 2 次提交
  11. 20 7月, 2015 3 次提交
  12. 13 7月, 2015 1 次提交
  13. 19 6月, 2015 1 次提交
  14. 11 6月, 2015 4 次提交
  15. 04 6月, 2015 1 次提交
  16. 01 6月, 2015 1 次提交
  17. 31 5月, 2015 2 次提交
  18. 11 5月, 2015 1 次提交
  19. 30 4月, 2015 1 次提交
  20. 28 4月, 2015 2 次提交
  21. 25 3月, 2015 1 次提交
  22. 10 3月, 2015 1 次提交
    • R
      fix GCC 5.0.0 logical-not-parentheses warnings · 8c1ac475
      Radim Krčmář 提交于
      man gcc:
        Warn about logical not used on the left hand side operand of a
        comparison.  This option does not warn if the RHS operand is of a
        boolean type.
      
      By preferring bool over int where sensible, but without modifying any
      depending code, make GCC happy in cases like this,
        qemu-img.c: In function ‘compare_sectors’:
        qemu-img.c:992:39: error: logical not is only applied to the left hand
        side of comparison [-Werror=logical-not-parentheses]
                 if (!!memcmp(buf1, buf2, 512) != res) {
      
      hw/ide/core.c:1836 doesn't throw an error,
        assert(!!s->error == !!(s->status & ERR_STAT));
      even thought the second operand is int (and first hunk of this patch has
      a very similar case), maybe GCC developers still have a little faith in
      C programmers.
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      8c1ac475
  23. 26 2月, 2015 2 次提交
  24. 12 1月, 2015 1 次提交
    • P
      net: remove all cleanup methods from NIC NetClientInfos · 57407ea4
      Paolo Bonzini 提交于
      All NICs have a cleanup function that, in most cases, zeroes the pointer
      to the NICState.  In some cases, it frees data belonging to the NIC.
      
      However, this function is never called except when exiting from QEMU.
      It is not necessary to NULL pointers and free data here; the right place
      to do that would be in the device's unrealize function, after calling
      qemu_del_nic.  Zeroing the NIC multiple times is also wrong for multiqueue
      devices.
      
      This cleanup function gets in the way of making the NetClientStates for
      the NIC hold an object_ref reference to the object, so get rid of it.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      57407ea4
  25. 28 11月, 2014 1 次提交
  26. 15 10月, 2014 2 次提交
  27. 19 9月, 2014 1 次提交
  28. 05 9月, 2014 2 次提交