qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 65c2ab: igb: fix link state on resume


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 65c2ab: igb: fix link state on resume
Date: Tue, 12 Mar 2024 06:43:38 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 65c2ab808571dcd9322020690a63df63281a67f0
      
https://github.com/qemu/qemu/commit/65c2ab808571dcd9322020690a63df63281a67f0
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M hw/net/igb_core.c
    M hw/net/igb_core.h

  Log Message:
  -----------
  igb: fix link state on resume

On resume igb_vm_state_change() always calls igb_autoneg_resume()
that sets link_down to false, and thus activates the link even
if we have disabled it.

The problem can be reproduced starting qemu in paused state (-S) and
then set the link to down. When we resume the machine the link appears
to be up.

Reproducer:

   # qemu-system-x86_64 ... -device igb,netdev=netdev0,id=net0 -S

   {"execute": "qmp_capabilities" }
   {"execute": "set_link", "arguments": {"name": "net0", "up": false}}
   {"execute": "cont" }

To fix the problem, merge the content of igb_vm_state_change()
into igb_core_post_load() as e1000 does.

Buglink: https://issues.redhat.com/browse/RHEL-21867
Fixes: 3a977deebe6b ("Intrdocue igb device emulation")
Cc: akihiko.odaki@daynix.com
Suggested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 4cadf10234989861398e19f3bb441d3861f3bb7c
      
https://github.com/qemu/qemu/commit/4cadf10234989861398e19f3bb441d3861f3bb7c
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M hw/net/e1000e_core.c
    M hw/net/e1000e_core.h

  Log Message:
  -----------
  e1000e: fix link state on resume

On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume()
that sets link_down to false, and thus activates the link even
if we have disabled it.

The problem can be reproduced starting qemu in paused state (-S) and
then set the link to down. When we resume the machine the link appears
to be up.

Reproducer:

   # qemu-system-x86_64 ... -device e1000e,netdev=netdev0,id=net0 -S

   {"execute": "qmp_capabilities" }
   {"execute": "set_link", "arguments": {"name": "net0", "up": false}}
   {"execute": "cont" }

To fix the problem, merge the content of e1000e_vm_state_change()
into e1000e_core_post_load() as e1000 does.

Buglink: https://issues.redhat.com/browse/RHEL-21867
Fixes: 6f3fbe4ed06a ("net: Introduce e1000e device emulation")
Suggested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 6a5287ce80470bb8df95901d73ee779a64e70c3a
      
https://github.com/qemu/qemu/commit/6a5287ce80470bb8df95901d73ee779a64e70c3a
  Author: Nick Briggs <nicholas.h.briggs@gmail.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M hw/net/pcnet.c

  Log Message:
  -----------
  Avoid unaligned fetch in ladr_match()

There is no guarantee that the PCNetState is allocated such that
csr[8] is allocated on an 8-byte boundary.  Since not all hosts are
capable of unaligned fetches the 16-bit elements need to be fetched
individually to avoid a potential fault.  Closes issue #2143

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2143
Signed-off-by: Nick Briggs <nicholas.h.briggs@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 333b3e5fab751cce9f077b827563296c797ff399
      
https://github.com/qemu/qemu/commit/333b3e5fab751cce9f077b827563296c797ff399
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M ebpf/ebpf_rss.c
    M ebpf/ebpf_rss.h

  Log Message:
  -----------
  ebpf: Added eBPF map update through mmap.

Changed eBPF map updates through mmaped array.
Mmaped arrays provide direct access to map data.
It should omit using bpf_map_update_elem() call,
which may require capabilities that are not present.

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 0524ea0510a33c616d87108d71a8456071e9daa1
      
https://github.com/qemu/qemu/commit/0524ea0510a33c616d87108d71a8456071e9daa1
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M ebpf/ebpf_rss-stub.c
    M ebpf/ebpf_rss.c
    M ebpf/ebpf_rss.h

  Log Message:
  -----------
  ebpf: Added eBPF initialization by fds.

It allows using file descriptors of eBPF provided
outside of QEMU.
QEMU may be run without capabilities for eBPF and run
RSS program provided by management tool(g.e. libvirt).

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 6b230b7dfcd8123a902e41cd313714b5a57dcac4
      
https://github.com/qemu/qemu/commit/6b230b7dfcd8123a902e41cd313714b5a57dcac4
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

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

  Log Message:
  -----------
  virtio-net: Added property to load eBPF RSS with fds.

eBPF RSS program and maps may now be passed during initialization.
Initially was implemented for libvirt to launch qemu without permissions,
and initialized eBPF program through the helper.

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: e88899fa90635da7f5c1e245028288755bb5fbd4
      
https://github.com/qemu/qemu/commit/e88899fa90635da7f5c1e245028288755bb5fbd4
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    A ebpf/ebpf.c
    A ebpf/ebpf.h
    M ebpf/ebpf_rss.c
    M ebpf/meson.build
    R ebpf/trace.h
    A qapi/ebpf.json
    M qapi/meson.build
    M qapi/qapi-schema.json

  Log Message:
  -----------
  qmp: Added new command to retrieve eBPF blob.

Now, the binary objects may be retrieved by id.
It would require for future qmp commands that may require specific
eBPF blob.

Added command "request-ebpf". This command returns
eBPF program encoded base64. The program taken from the
skeleton and essentially is an ELF object that can be
loaded in the future with libbpf.

The reason to use the command to provide the eBPF object
instead of a separate artifact was to avoid issues related
to finding the eBPF itself. eBPF object is an ELF binary
that contains the eBPF program and eBPF map description(BTF).
Overall, eBPF object should contain the program and enough
metadata to create/load eBPF with libbpf. As the eBPF
maps/program should correspond to QEMU, the eBPF can't
be used from different QEMU build.

The first solution was a helper that comes with QEMU
and loads appropriate eBPF objects. And the issue is
to find a proper helper if the system has several
different QEMUs installed and/or built from the source,
which helpers may not be compatible.

Another issue is QEMU updating while there is a running
QEMU instance. With an updated helper, it may not be
possible to hotplug virtio-net device to the already
running QEMU. Overall, requesting the eBPF object from
QEMU itself solves possible failures with acceptable effort.

Links:
[PATCH 3/5] qmp: Added the helper stamp check.
https://lore.kernel.org/all/20230219162100.174318-4-andrew@daynix.com/

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 0cc14182aba961f4c34a21dd202ce6e4a87470f5
      
https://github.com/qemu/qemu/commit/0cc14182aba961f4c34a21dd202ce6e4a87470f5
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M ebpf/rss.bpf.skeleton.h
    M meson.build
    M tools/ebpf/rss.bpf.c

  Log Message:
  -----------
  ebpf: Updated eBPF program and skeleton.

Updated section name, so libbpf should init/gues proper
program type without specifications during open/load.
Also, added map_flags with explicitly declared BPF_F_MMAPABLE.
Added check for BPF_F_MMAPABLE flag to meson script and
requirements to libbpf version.
Also changed fragmentation flag check - some TCP/UDP packets
may be considered fragmented if DF flag is set.

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: fe6d4434d2531f8bc6fffc7878c801e8d8190c5d
      
https://github.com/qemu/qemu/commit/fe6d4434d2531f8bc6fffc7878c801e8d8190c5d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M MAINTAINERS
    M docs/about/deprecated.rst
    M hw/core/cpu-common.c
    M hw/core/loader-fit.c
    M hw/core/machine-qmp-cmds.c
    M hw/core/numa.c
    M hw/core/qdev-properties-system.c
    M hw/gpio/Kconfig
    M hw/gpio/meson.build
    A hw/gpio/pcf8574.c
    A hw/ide/ahci-internal.h
    M hw/ide/ahci.c
    R hw/ide/ahci_internal.h
    M hw/ide/ich.c
    M hw/misc/ivshmem.c
    M hw/pci/pcie.c
    M hw/pci/shpc.c
    M hw/pci/trace-events
    M hw/ppc/sam460ex.c
    M hw/sparc64/sun4u.c
    A include/hw/gpio/pcf8574.h
    M meson.build

  Log Message:
  -----------
  Merge tag 'hw-misc-20240312' of https://github.com/philmd/qemu into staging

Misc HW patch queue

- Rename hw/ide/ahci-internal.h for consistency (Zoltan)
- More convenient PCI hotplug trace events (Vladimir)
- Short CLI option to add drives for sam460ex machine (Zoltan)
- More missing ERRP_GUARD() macros (Zhao)
- Avoid faulting when unmapped I/O BAR is accessed on SPARC EBUS (Mark)
- Remove unused includes in hw/core/ (Zhao)
- New PCF8574 GPIO over I2C model (Dmitriy)
- Require ObjC on Darwin macOS by default (Peter)
- Corrected "-smp parameter=1" placement in docs/ (Zhao)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmXwEJkACgkQ4+MsLN6t
# wN4A3hAAngVu7VmyrfqYF6jfDMUuRGYaKf4D73/KF6R1PsU+nJdN7UAkECLj8o7g
# mkcAQu1U3fKCUssF6MJ2a3kU+rD1OkkA/ZcitzgWwEjCK8KVjtMt2HzEqX+B/X+e
# RUVjXMOMkyV48MF0+yLhJz+lQiDpEBFVxIgssPBNUz1Pw9IfoXp29Bfz+bYBThS4
# ywAdvCefNzSira0Nt6RWTnvgBHB/1+aLy1uMSt0Xu926zcqoxQJ0b//0flYL8vAf
# JuSSZuiXPw+oAc3qG3d6aPl3g8DrFn3pvPD471KlFQAnB0dlhEZZqNBPvraySpHl
# h04Y8teHYj9XfxPtaWfaEdgQCazdkKFR/q7E5c9GU00Rf469BJeuo9Pzkm4kWfbU
# sbCl8em5biVZ5DpBIOMT3/D0JOyGf7/CM8y5c3Jc92hapx2NdSszkvCicrDE1+i0
# zEr4N0P/F2x5KFVFkQ3Xzv2Jtzw+iXj6kSE5a5/64GMK29Mqu/EPaSkvwGDQOs3N
# QJ9mpa4gg47g310a0/nH0i5eVbvGVuzcCMP6VXOBVr18cJ7JFQFFiYcvoTDXNQ2m
# sq5xUelRimnWfKpawomJXkS+/j0usH61/aQBuDKfj45i8/XFRejCIk0gMWQ9hjyD
# no1HqDN8CVXtiPNSinC7ctNHU5ClS0xO/BRl0h3PGC7Bl+A2eVY=
# =JQg1
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 12 Mar 2024 08:21:45 GMT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" 
[full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'hw-misc-20240312' of https://github.com/philmd/qemu:
  docs/about/deprecated.rst: Move SMP configurations item to system emulator 
section
  meson.build: Always require an objc compiler on macos hosts
  hw/gpio: introduce pcf8574 driver
  hw/core: Cleanup unused included headers in numa.c
  hw/core: Cleanup unused included header in machine-qmp-cmds.c
  hw/core: Cleanup unused included headers in cpu-common.c
  sun4u: remap ebus BAR0 to use unassigned_io_ops instead of alias to PCI IO 
space
  hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend()
  hw/core/qdev-properties-system: Fix missing ERRP_GUARD() for error_prepend()
  hw/core/loader-fit: Fix missing ERRP_GUARD() for error_prepend()
  hw/ppc/sam460ex: Support short options for adding drives
  hw/pci: add some convenient trace-events for pcie and shpc hotplug
  hw/ide/ahci: Rename ahci_internal.h to ahci-internal.h

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


  Commit: 35ac6831d98e18e2c78c85c93e3a6ca1f1ae3e58
      
https://github.com/qemu/qemu/commit/35ac6831d98e18e2c78c85c93e3a6ca1f1ae3e58
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    A ebpf/ebpf.c
    A ebpf/ebpf.h
    M ebpf/ebpf_rss-stub.c
    M ebpf/ebpf_rss.c
    M ebpf/ebpf_rss.h
    M ebpf/meson.build
    M ebpf/rss.bpf.skeleton.h
    R ebpf/trace.h
    M hw/net/e1000e_core.c
    M hw/net/e1000e_core.h
    M hw/net/igb_core.c
    M hw/net/igb_core.h
    M hw/net/pcnet.c
    M hw/net/virtio-net.c
    M include/hw/virtio/virtio-net.h
    M meson.build
    A qapi/ebpf.json
    M qapi/meson.build
    M qapi/qapi-schema.json
    M tools/ebpf/rss.bpf.c

  Log Message:
  -----------
  Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEIV1G9IJGaJ7HfzVi7wSWWzmNYhEFAmXwPUAACgkQ7wSWWzmN
# YhFnIwgAgctDniJwlRxXB01eVlzXz7IulHnpSby07XEJxENSpGB8ufaeE4eK5gJy
# NVK6C2+1EU2vRxm4oIdcvtN4C4/jtRbYYjiSTx7eE4FmSkqshSnR5XCV72LDqG3i
# WbzInjMvYfysmcMXLfrWgxOnVew9WqEzlpEWlc7FfNKnkzBVf+JDztfqCUx0XM7H
# qefw4ImjqQw993QxJpipXC7aEGUyouB0RIBB71FkCa9ihlh9x7W68evbOI/jTn5q
# HWuStgS02sKHjRFliMbdbMY77FNUz4Yroo/GKSvGt64atxkQSJqPNAV+/9n18LNy
# QAH5eK6cXFPOIAaYpADU5kHDVVAFiw==
# =iBdx
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 12 Mar 2024 11:32:16 GMT
# gpg:                using RSA key 215D46F48246689EC77F3562EF04965B398D6211
# 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

* tag 'net-pull-request' of https://github.com/jasowang/qemu:
  ebpf: Updated eBPF program and skeleton.
  qmp: Added new command to retrieve eBPF blob.
  virtio-net: Added property to load eBPF RSS with fds.
  ebpf: Added eBPF initialization by fds.
  ebpf: Added eBPF map update through mmap.
  Avoid unaligned fetch in ladr_match()
  e1000e: fix link state on resume
  igb: fix link state on resume

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


Compare: https://github.com/qemu/qemu/compare/4f0d7dba5536...35ac6831d98e

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

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