1. 28 11月, 2017 1 次提交
    • J
      virtio-net: don't touch virtqueue if vm is stopped · 70e53e6e
      Jason Wang 提交于
      Guest state should not be touched if VM is stopped, unfortunately we
      didn't check running state and tried to drain tx queue unconditionally
      in virtio_net_set_status(). A crash was then noticed as a migration
      destination when user type quit after virtqueue state is loaded but
      before region cache is initialized. In this case,
      virtio_net_drop_tx_queue_data() tries to access the uninitialized
      region cache.
      
      Fix this by only dropping tx queue data when vm is running.
      
      Fixes: 283e2c2a ("net: virtio-net discards TX data after link down")
      Cc: Yuri Benditovich <yuri.benditovich@daynix.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: qemu-stable@nongnu.org
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      70e53e6e
  2. 20 11月, 2017 4 次提交
    • T
      hw/net/vmxnet3: Fix code to work on big endian hosts, too · c527e0af
      Thomas Huth 提交于
      Since commit ab06ec43 we test the vmxnet3 device in the
      pxe-tester, too (when running "make check SPEED=slow"). This now
      revealed that the code is not working there if the host is a big
      endian machine (for example ppc64 or s390x) - "make check SPEED=slow"
      is now failing on such hosts.
      
      The vmxnet3 code lacks endianness conversions in a couple of places.
      Interestingly, the bitfields in the structs in vmxnet3.h already tried to
      take care of the *bit* endianness of the C compilers - but the code missed
      to change the *byte* endianness when reading or writing the corresponding
      structs. So the bitfields are now wrapped into unions which allow to change
      the byte endianness during runtime with the non-bitfield member of the union.
      With these changes, "make check SPEED=slow" now properly works on big endian
      hosts, too.
      Reported-by: NDavid Gibson <dgibson@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NDavid Gibson <dgibson@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      c527e0af
    • E
      net: Transmit zero UDP checksum as 0xFFFF · 0dacea92
      Ed Swierk 提交于
      The checksum algorithm used by IPv4, TCP and UDP allows a zero value
      to be represented by either 0x0000 and 0xFFFF. But per RFC 768, a zero
      UDP checksum must be transmitted as 0xFFFF because 0x0000 is a special
      value meaning no checksum.
      
      Substitute 0xFFFF whenever a checksum is computed as zero when
      modifying a UDP datagram header. Doing this on IPv4 and TCP checksums
      is unnecessary but legal. Add a wrapper for net_checksum_finish() that
      makes the substitution.
      
      (We can't just change net_checksum_finish(), as that function is also
      used by receivers to verify checksums, and in that case the expected
      value is always 0x0000.)
      Signed-off-by: NEd Swierk <eswierk@skyportsystems.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      0dacea92
    • T
      hw/net/eepro100: Fix endianness problem on big endian hosts · 8f8e8053
      Thomas Huth 提交于
      Since commit 1865e288 ("Fix eepro100 simple transmission
      mode"), the test/pxe-test is broken for the eepro100 device on big
      endian hosts. However, it seems like that commit did not introduce the
      problem, but just uncovered it: The EEPRO100State->tx.tbd_array_addr and
      EEPRO100State->tx.tcb_bytes fields are already in host byte order, since
      they have already been byte-swapped in the read_cb() function.
      Thus byte-swapping them in tx_command() again results in the wrong
      endianness. Removing the byte-swapping here fixes the pxe-test.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      8f8e8053
    • J
      Revert "Add new PCI ID for i82559a" · 2ec40552
      Jason Wang 提交于
      This reverts commit 5e89dc01 since:
      
      - we should use ID in the spec instead the one used by OEM
      - in the future, we should allow changing id through either property
        or EEPROM file.
      
      Cc: Stefan Weil <sw@weilnetz.de>
      Cc: Michael Nawrocki <michael.nawrocki@gtri.gatech.edu>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      2ec40552
  3. 13 11月, 2017 2 次提交
  4. 01 11月, 2017 1 次提交
  5. 15 10月, 2017 3 次提交
  6. 27 9月, 2017 1 次提交
  7. 21 9月, 2017 1 次提交
  8. 15 9月, 2017 1 次提交
  9. 08 9月, 2017 6 次提交
  10. 07 9月, 2017 1 次提交
  11. 31 8月, 2017 1 次提交
  12. 01 8月, 2017 2 次提交
  13. 31 7月, 2017 1 次提交
  14. 17 7月, 2017 2 次提交
  15. 15 7月, 2017 1 次提交
  16. 13 7月, 2017 1 次提交
  17. 04 7月, 2017 4 次提交
  18. 20 6月, 2017 1 次提交
  19. 13 6月, 2017 2 次提交
  20. 07 6月, 2017 1 次提交
  21. 06 6月, 2017 1 次提交
  22. 02 6月, 2017 2 次提交