qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 590790: virtio-net: implement RSS configurati


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 590790: virtio-net: implement RSS configuration command
Date: Fri, 19 Jun 2020 03:30:28 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 590790297c0dd2c8e817c7b33daf66862b0ee8ef
      
https://github.com/qemu/qemu/commit/590790297c0dd2c8e817c7b33daf66862b0ee8ef
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/trace-events
    M hw/net/virtio-net.c
    M include/hw/virtio/virtio-net.h

  Log Message:
  -----------
  virtio-net: implement RSS configuration command

Optionally report RSS feature.
Handle RSS configuration command and keep RSS parameters
in virtio-net device context.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 4474e37a5b3a616803f4570b542e8eede91e50d2
      
https://github.com/qemu/qemu/commit/4474e37a5b3a616803f4570b542e8eede91e50d2
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/Makefile.objs
    M hw/net/virtio-net.c
    M include/hw/virtio/virtio-net.h

  Log Message:
  -----------
  virtio-net: implement RX RSS processing

If VIRTIO_NET_F_RSS negotiated and RSS is enabled, process
incoming packets, calculate packet's hash and place the
packet into respective RX virtqueue.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: fbbdbddec018723d9f863f01cdec172dda9df12b
      
https://github.com/qemu/qemu/commit/fbbdbddec018723d9f863f01cdec172dda9df12b
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/tap.c

  Log Message:
  -----------
  tap: allow extended virtio header with hash info

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: e22f0603fb2fc274920a9e3a1d1306260b9a4cc4
      
https://github.com/qemu/qemu/commit/e22f0603fb2fc274920a9e3a1d1306260b9a4cc4
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/virtio-net.c
    M include/hw/virtio/virtio-net.h

  Log Message:
  -----------
  virtio-net: reference implementation of hash report

Suggest VIRTIO_NET_F_HASH_REPORT if specified in device
parameters.
If the VIRTIO_NET_F_HASH_REPORT is set,
the device extends configuration space. If the feature
is negotiated, the packet layout is extended to
accomodate the hash information. In this case deliver
packet's hash value and report type in virtio header
extension.
Use for configuration the same procedure as already
used for RSS. We add two fields in rss_data that
controls what the device does with the calculated hash
if rss_data.enabled is set. If field 'populate' is set
the hash is set in the packet, if field 'redirect' is
set the hash is used to decide the queue to place the
packet to.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: ff4e6d545d924ad9bfe135a90c05b4f9960773d6
      
https://github.com/qemu/qemu/commit/ff4e6d545d924ad9bfe135a90c05b4f9960773d6
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M include/migration/vmstate.h

  Log Message:
  -----------
  vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro

Similar to VMSTATE_VARRAY_UINT32_ALLOC, but the size is
16-bit field.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: e41b711485e5b2dcf747ef27cf252a940e09247f
      
https://github.com/qemu/qemu/commit/e41b711485e5b2dcf747ef27cf252a940e09247f
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/virtio-net.c

  Log Message:
  -----------
  virtio-net: add migration support for RSS and hash report

Save and restore RSS/hash report configuration.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: dd3d85e89123c907be7628957457af3d03e3b85b
      
https://github.com/qemu/qemu/commit/dd3d85e89123c907be7628957457af3d03e3b85b
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/virtio-net.c

  Log Message:
  -----------
  virtio-net: align RSC fields with updated virtio-net header

Removal of duplicated RSC definitions. Changing names of the
fields to ones defined in the Linux header.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: d9b69640391618045949f7c500b87fc129f862ed
      
https://github.com/qemu/qemu/commit/d9b69640391618045949f7c500b87fc129f862ed
  Author: Helge Deller <deller@gmx.de>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/tulip.c

  Log Message:
  -----------
  Fix tulip breakage

The tulip network driver in a qemu-system-hppa emulation is broken in
the sense that bigger network packages aren't received any longer and
thus even running e.g. "apt update" inside the VM fails.

The breakage was introduced by commit 8ffb7265af ("check frame size and
r/w data length") which added checks to prevent accesses outside of the
rx/tx buffers.

But the new checks were implemented wrong. The variable rx_frame_len
counts backwards, from rx_frame_size down to zero, and the variable len
is never bigger than rx_frame_len, so accesses just can't happen and the
checks are unnecessary.
On the contrary the checks now prevented bigger packages to be moved
into the rx buffers.

This patch reverts the wrong checks and were sucessfully tested with a
qemu-system-hppa emulation.

Fixes: 8ffb7265af ("check frame size and r/w data length")
Buglink: https://bugs.launchpad.net/bugs/1874539
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 171ce2e27906a59e243baf8c67ad1c1193cec4be
      
https://github.com/qemu/qemu/commit/171ce2e27906a59e243baf8c67ad1c1193cec4be
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/tulip.h

  Log Message:
  -----------
  hw/net/tulip: Fix 'Descriptor Error' definition

Bit #14 is "DE" for 'Descriptor Error':

  When set, indicates a frame truncation caused by a frame
  that does not fit within the current descriptor buffers,
  and that the 21143 does not own the next descriptor.

  [Table 4-1. RDES0 Bit Fields Description]

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 97d7fb5a792b8b289ca6a981d9fe3369fa8b8c3c
      
https://github.com/qemu/qemu/commit/97d7fb5a792b8b289ca6a981d9fe3369fa8b8c3c
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/tulip.c

  Log Message:
  -----------
  hw/net/tulip: Log descriptor overflows

Log with GUEST_ERROR what the guest is doing wrong.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 6fe7661d3dc16d605e0ef283b5c77b5256125c2a
      
https://github.com/qemu/qemu/commit/6fe7661d3dc16d605e0ef283b5c77b5256125c2a
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Fix debug statements

Enabling debug breaks the build, Fix them and make debug statements
always compilable. Fix few statements to use sized integer casting.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 96ea126a8deef30cc81519fb3cb50bf3d65eb6aa
      
https://github.com/qemu/qemu/commit/96ea126a8deef30cc81519fb3cb50bf3d65eb6aa
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Fix the queue address update during wrap around

During wrap around and reset, queues are pointing to initial base
address of queue 0, irrespective of what queue we are dealing with.
Fix it by assigning proper base address every time.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 86a29d4c72e42130e08bae3335c25575d4af0b4d
      
https://github.com/qemu/qemu/commit/86a29d4c72e42130e08bae3335c25575d4af0b4d
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Fix irq update w.r.t queue

Set irq's specific to a queue, present implementation is setting q1 irq
based on q0 status.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 4c70e32f05fc7903185a4e9d01987ee3de2052f6
      
https://github.com/qemu/qemu/commit/4c70e32f05fc7903185a4e9d01987ee3de2052f6
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Define access permission for interrupt registers

Q1 to Q7 ISR's are clear-on-read, IER/IDR registers
are write-only, mask reg are read-only.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 68dbee3bf95173d73f103d1a82ad9b14e5cde354
      
https://github.com/qemu/qemu/commit/68dbee3bf95173d73f103d1a82ad9b14e5cde354
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Set ISR according to queue in use

Set ISR according to queue in use, added interrupt support for
all queues.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 24d62fd5028ea66448f441de8ae483beaf4afe93
      
https://github.com/qemu/qemu/commit/24d62fd5028ea66448f441de8ae483beaf4afe93
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c
    M include/hw/net/cadence_gem.h

  Log Message:
  -----------
  net: cadence_gem: Move tx/rx packet buffert to CadenceGEMState

Moving this buffers to CadenceGEMState, as their size will be increased
more when JUMBO frames support is added.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 88dba7ed842d18da0a9354660adf1e6a5a87b37b
      
https://github.com/qemu/qemu/commit/88dba7ed842d18da0a9354660adf1e6a5a87b37b
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Fix up code style

Fix the code style for register definitions.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 7ca151c381c1da146dd274c428ed7825906cc29a
      
https://github.com/qemu/qemu/commit/7ca151c381c1da146dd274c428ed7825906cc29a
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c
    M include/hw/net/cadence_gem.h

  Log Message:
  -----------
  net: cadence_gem: Add support for jumbo frames

Add a property "jumbo-max-len", which sets default value of jumbo frames
up to 16,383 bytes. Add Frame length checks for standard and jumbo
frames.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: d48cb519b35010a90f18df915d187e566bf10c3e
      
https://github.com/qemu/qemu/commit/d48cb519b35010a90f18df915d187e566bf10c3e
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadnece_gem: Update irq_read_clear field of designcfg_debug1 reg

Advertise support of clear-on-read for ISR registers.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 15baf5e23743871820504be6afb1bae24d1211c2
      
https://github.com/qemu/qemu/commit/15baf5e23743871820504be6afb1bae24d1211c2
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Update the reset value for interrupt mask register

Mask all interrupt on reset.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: fdd35195c5ed57162b080a20df588773768b589c
      
https://github.com/qemu/qemu/commit/fdd35195c5ed57162b080a20df588773768b589c
  Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: TX_LAST bit should be set by guest

TX_LAST bit should not be set by hardware, its set by guest to inform
the last bd of the frame.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: fbc14a098d945dfa9c141423771db0122defa38c
      
https://github.com/qemu/qemu/commit/fbc14a098d945dfa9c141423771db0122defa38c
  Author: Tong Ho <tong.ho@xilinx.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/cadence_gem.c

  Log Message:
  -----------
  net: cadence_gem: Fix RX address filtering

Two defects are fixed:

1/ Detection of multicast frames
2/ Treating drop of mis-addressed frames as non-error

Signed-off-by: Tong Ho <tong.ho@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 5fe19fb81839ea42b592b409f725349cf3c73551
      
https://github.com/qemu/qemu/commit/5fe19fb81839ea42b592b409f725349cf3c73551
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/net.c

  Log Message:
  -----------
  net: use peer when purging queue in qemu_flush_or_purge_queue_packets()

The sender of packet will be checked in the qemu_net_queue_purge() but
we use NetClientState not its peer when trying to purge the incoming
queue in qemu_flush_or_purge_packets(). This will trigger the assert
in virtio_net_reset since we can't pass the sender check:

hw/net/virtio-net.c:533: void virtio_net_reset(VirtIODevice *): Assertion
`!virtio_net_get_subqueue(nc)->async_tx.elem' failed.
#9 0x55a33fa31b78 in virtio_net_reset hw/net/virtio-net.c:533:13
#10 0x55a33fc88412 in virtio_reset hw/virtio/virtio.c:1919:9
#11 0x55a341d82764 in virtio_bus_reset hw/virtio/virtio-bus.c:95:9
#12 0x55a341dba2de in virtio_pci_reset hw/virtio/virtio-pci.c:1824:5
#13 0x55a341db3e02 in virtio_pci_common_write hw/virtio/virtio-pci.c:1252:13
#14 0x55a33f62117b in memory_region_write_accessor memory.c:496:5
#15 0x55a33f6205e4 in access_with_adjusted_size memory.c:557:18
#16 0x55a33f61e177 in memory_region_dispatch_write memory.c:1488:16

Reproducer:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg701914.html

Fix by using the peer.

Reported-by: "Alexander Bulekov" <alxndr@bu.edu>
Acked-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: ca77d85e1dbf9 ("net: complete all queued packets on VM stop")
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 5893c7383e6e16e3e6b24b0551501721f3309d9e
      
https://github.com/qemu/qemu/commit/5893c7383e6e16e3e6b24b0551501721f3309d9e
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/colo-compare.c

  Log Message:
  -----------
  net/colo-compare.c: Create event_bh with the right AioContext

qemu_bh_new will set the bh to be executed in the main
loop. This causes crashes as colo_compare_handle_event assumes
that it has exclusive access the queues, which are also
concurrently accessed in the iothread.

Create the bh with the AioContext of the iothread to fulfill
these assumptions and fix the crashes. This is safe, because
the bh already takes the appropriate locks.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Derek Su <dereksu@qnap.com>
Tested-by: Derek Su <dereksu@qnap.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 2158fa1be7c1e76e2c25c32d75bb38e90cce0267
      
https://github.com/qemu/qemu/commit/2158fa1be7c1e76e2c25c32d75bb38e90cce0267
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M chardev/char.c

  Log Message:
  -----------
  chardev/char.c: Use qemu_co_sleep_ns if in coroutine

To be able to convert compare_chr_send to a coroutine in the
next commit, use qemu_co_sleep_ns if in coroutine.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 9c55fe94081dd15148428d32e60fd75ec2eb37ec
      
https://github.com/qemu/qemu/commit/9c55fe94081dd15148428d32e60fd75ec2eb37ec
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/colo-compare.c
    M net/colo.c
    M net/colo.h

  Log Message:
  -----------
  net/colo-compare.c: Fix deadlock in compare_chr_send

The chr_out chardev is connected to a filter-redirector
running in the main loop. qemu_chr_fe_write_all might block
here in compare_chr_send if the (socket-)buffer is full.
If another filter-redirector in the main loop want's to
send data to chr_pri_in it might also block if the buffer
is full. This leads to a deadlock because both event loops
get blocked.

Fix this by converting compare_chr_send to a coroutine and
putting the packets in a send queue.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Tested-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 76658541f3950e580ae3be8019f1b4c019a8a638
      
https://github.com/qemu/qemu/commit/76658541f3950e580ae3be8019f1b4c019a8a638
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/colo-compare.c

  Log Message:
  -----------
  net/colo-compare.c: Only hexdump packets if tracing is enabled

Else the log will be flooded if there is a lot of network
traffic.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 45942b79b9f89b42a5f5ccfa861c36a86a95d89a
      
https://github.com/qemu/qemu/commit/45942b79b9f89b42a5f5ccfa861c36a86a95d89a
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/colo-compare.c

  Log Message:
  -----------
  net/colo-compare.c: Check that colo-compare is active

If the colo-compare object is removed before failover and a
checkpoint happens, qemu crashes because it tries to lock
the destroyed event_mtx in colo_notify_compares_event.

Fix this by checking if everything is initialized by
introducing a new variable colo_compare_active which
is protected by a new mutex colo_compare_mutex. The new mutex
also protects against concurrent access of the net_compares
list and makes sure that colo_notify_compares_event isn't
active while we destroy event_mtx and event_complete_cond.

With this it also is again possible to use colo without
colo-compare (periodic mode) and to use multiple colo-compare
for multiple network interfaces.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 5bd57eba041fb62c373f89c311936000c115fdd6
      
https://github.com/qemu/qemu/commit/5bd57eba041fb62c373f89c311936000c115fdd6
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/colo-compare.c

  Log Message:
  -----------
  net/colo-compare.c: Correct ordering in complete and finalize

In colo_compare_complete, insert CompareState into net_compares
only after everything has been initialized.
In colo_compare_finalize, remove CompareState from net_compares
before anything is deinitialized.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: bdadbb0f74305d1509805936bf9b1ac14eab30e4
      
https://github.com/qemu/qemu/commit/bdadbb0f74305d1509805936bf9b1ac14eab30e4
  Author: Derek Su <dereksu@qnap.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/colo-compare.c
    M net/trace-events

  Log Message:
  -----------
  colo-compare: Fix memory leak in packet_enqueue()

The patch is to fix the "pkt" memory leak in packet_enqueue().
The allocated "pkt" needs to be freed if the colo compare
primary or secondary queue is too big.

Replace the error_report of full queue with a trace event.

Signed-off-by: Derek Su <dereksu@qnap.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: fda43b1204aecd1db158b3255c591d227fbdd629
      
https://github.com/qemu/qemu/commit/fda43b1204aecd1db158b3255c591d227fbdd629
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M hw/net/e1000e_core.c

  Log Message:
  -----------
  hw/net/e1000e: Do not abort() on invalid PSRCTL register value

libFuzzer found using 'qemu-system-i386 -M q35':

qemu: hardware error: e1000e: PSRCTL.BSIZE0 cannot be zero
CPU #0:
EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000663
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 00000000 0000ffff 00009300
CS =f000 ffff0000 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0000 00000000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT=     00000000 0000ffff
IDT=     00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000400
EFER=0000000000000000
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
==1988== ERROR: libFuzzer: deadly signal
    #6 0x7fae4d3ea894 in __GI_abort (/lib64/libc.so.6+0x22894)
    #7 0x563f4cc59a1d in hw_error (qemu-fuzz-i386+0xe8ca1d)
    #8 0x563f4d7c93f2 in e1000e_set_psrctl (qemu-fuzz-i386+0x19fc3f2)
    #9 0x563f4d7b798f in e1000e_core_write (qemu-fuzz-i386+0x19ea98f)
    #10 0x563f4d7afc46 in e1000e_mmio_write (qemu-fuzz-i386+0x19e2c46)
    #11 0x563f4cc9a0a7 in memory_region_write_accessor (qemu-fuzz-i386+0xecd0a7)
    #12 0x563f4cc99c13 in access_with_adjusted_size (qemu-fuzz-i386+0xeccc13)
    #13 0x563f4cc987b4 in memory_region_dispatch_write (qemu-fuzz-i386+0xecb7b4)

It simply sent the following 2 I/O command to the e1000e
PCI BAR #2 I/O region:

  writew 0x0100 0x0c00 # RCTL =   E1000_RCTL_DTYP_MASK
  writeb 0x2170 0x00   # PSRCTL = 0

2813 static void
2814 e1000e_set_psrctl(E1000ECore *core, int index, uint32_t val)
2815 {
2816     if (core->mac[RCTL] & E1000_RCTL_DTYP_MASK) {
2817
2818         if ((val & E1000_PSRCTL_BSIZE0_MASK) == 0) {
2819             hw_error("e1000e: PSRCTL.BSIZE0 cannot be zero");
2820         }

Instead of calling hw_error() which abort the process (it is
meant for CPU fatal error condition, not for device logging),
log the invalid request with qemu_log_mask(LOG_GUEST_ERROR)
and return, ignoring the request.

Cc: qemu-stable@nongnu.org
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 9d903f30cb37eb2f7aec53ab58cd869f48ec16d5
      
https://github.com/qemu/qemu/commit/9d903f30cb37eb2f7aec53ab58cd869f48ec16d5
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M docs/system/deprecated.rst
    M net/net.c
    M qapi/net.json

  Log Message:
  -----------
  net: Drop the legacy "name" parameter from the -net option

It's been deprecated since QEMU v3.1, so it's time to finally
remove it. The "id" parameter can simply be used instead.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 71830d8430e65dd20aec4765d87e60336148e1a6
      
https://github.com/qemu/qemu/commit/71830d8430e65dd20aec4765d87e60336148e1a6
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M net/net.c
    M qapi/net.json

  Log Message:
  -----------
  net: Drop the NetLegacy structure, always use Netdev instead

Now that the "name" parameter is gone, there is hardly any difference
between NetLegacy and Netdev anymore, so we can drop NetLegacy and always
use Netdev to simplify the code quite a bit.

The only two differences that were really left between Netdev and NetLegacy:

1) NetLegacy does not allow a "hubport" type. We can continue to block
   this with a simple check in net_client_init1() for this type.

2) The "id" parameter was optional in NetLegacy (and an internal id
   was chosen via assign_name() during initialization), but it is mandatory
   for Netdev. To avoid that the visitor code bails out here, we have to
   add an internal id to the QemuOpts already earlier now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 292ef18a38270e1cb8e9a3dc06bca589068f293d
      
https://github.com/qemu/qemu/commit/292ef18a38270e1cb8e9a3dc06bca589068f293d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M chardev/char.c
    M docs/system/deprecated.rst
    M hw/net/Makefile.objs
    M hw/net/cadence_gem.c
    M hw/net/e1000e_core.c
    M hw/net/trace-events
    M hw/net/tulip.c
    M hw/net/tulip.h
    M hw/net/virtio-net.c
    M include/hw/net/cadence_gem.h
    M include/hw/virtio/virtio-net.h
    M include/migration/vmstate.h
    M net/colo-compare.c
    M net/colo.c
    M net/colo.h
    M net/net.c
    M net/tap.c
    M net/trace-events
    M qapi/net.json

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into 
staging

# gpg: Signature made Thu 18 Jun 2020 14:16:22 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) 
<jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request: (33 commits)
  net: Drop the NetLegacy structure, always use Netdev instead
  net: Drop the legacy "name" parameter from the -net option
  hw/net/e1000e: Do not abort() on invalid PSRCTL register value
  colo-compare: Fix memory leak in packet_enqueue()
  net/colo-compare.c: Correct ordering in complete and finalize
  net/colo-compare.c: Check that colo-compare is active
  net/colo-compare.c: Only hexdump packets if tracing is enabled
  net/colo-compare.c: Fix deadlock in compare_chr_send
  chardev/char.c: Use qemu_co_sleep_ns if in coroutine
  net/colo-compare.c: Create event_bh with the right AioContext
  net: use peer when purging queue in qemu_flush_or_purge_queue_packets()
  net: cadence_gem: Fix RX address filtering
  net: cadence_gem: TX_LAST bit should be set by guest
  net: cadence_gem: Update the reset value for interrupt mask register
  net: cadnece_gem: Update irq_read_clear field of designcfg_debug1 reg
  net: cadence_gem: Add support for jumbo frames
  net: cadence_gem: Fix up code style
  net: cadence_gem: Move tx/rx packet buffert to CadenceGEMState
  net: cadence_gem: Set ISR according to queue in use
  net: cadence_gem: Define access permission for interrupt registers
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/eefe34ea4b82...292ef18a3827



reply via email to

[Prev in Thread] Current Thread [Next in Thread]