qemu/hw/net
Laurent Vivier a84e2e04e8 e1000e: Prevent crash from legacy interrupt firing after MSI-X enable
A race condition between guest driver actions and QEMU timers can lead
to an assertion failure when the guest switches the e1000e from legacy
interrupt mode to MSI-X. If a legacy interrupt delay timer (TIDV or
RDTR) is active, but the guest enables MSI-X before the timer fires,
the pending interrupt cause can trigger an assert in
e1000e_intmgr_collect_delayed_causes().

This patch removes the assertion and executes the code that clears the
pending legacy causes. This change is safe and introduces no unintended
behavioral side effects, as it only alters a state that previously led
to termination.

- when core->delayed_causes == 0 the function was already a no-op and
  remains so.

- when core->delayed_causes != 0 the function would previously
  crash due to the assertion failure. The patch now defines a safe
  outcome by clearing the cause and returning. Since behavior after
  the assertion never existed, this simply corrects the crash.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1863
Suggested-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20250807110806.409065-1-lvivier@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 8e4649cac9)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-09-04 18:26:14 +03:00
..
can qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
fsl_etsec hw/net/fsl_etsec: Set default MAC address 2025-06-10 12:59:09 +02:00
rocker rocker: do not pollute the namespace 2025-05-28 19:00:41 +02:00
allwinner_emac.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
allwinner-sun8i-emac.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
cadence_gem.c hw/net/cadence_gem: fix register mask initialization 2025-07-29 13:56:39 +02:00
dp8393x.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
e1000_common.h e1000: Split header files 2023-03-10 15:35:38 +08:00
e1000_regs.h hw/net: spelling fixes 2023-09-20 07:54:34 +03:00
e1000.c hw/net/e1000: Remove unused E1000_FLAG_MAC flag 2025-05-30 09:52:08 +02:00
e1000e_core.c e1000e: Prevent crash from legacy interrupt firing after MSI-X enable 2025-09-04 18:26:14 +03:00
e1000e_core.h e1000e: fix link state on resume 2024-03-12 19:28:32 +08:00
e1000e.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
e1000x_common.c e1000x: Take CRC into consideration for size check 2023-05-23 15:20:15 +08:00
e1000x_common.h e1000x: Share more Rx filtering logic 2023-05-23 15:20:15 +08:00
e1000x_regs.h hw/net/e1000: Remove stray empty comment in header 2025-05-09 23:49:26 +03:00
eepro100.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
ftgmac100.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
i82596.c hw/net/i82596: Factor configure function out 2025-06-10 15:08:46 +02:00
i82596.h include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
igb_common.h igb: Add a VF reset handler 2023-11-13 15:33:37 +08:00
igb_core.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
igb_core.h igb: fix link state on resume 2024-03-12 19:28:31 +08:00
igb_regs.h license: Update deprecated SPDX tag GPL-2.0 to GPL-2.0-only 2024-09-20 10:11:59 +03:00
igb.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
igbvf.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
imx_fec.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
Kconfig hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations 2024-12-11 15:30:51 +00:00
lan9118_phy.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
lan9118.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
lance.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
lasi_i82596.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
mcf_fec.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
meson.build hw/net: Add NPCM8XX PCS Module 2025-02-20 15:22:22 +00:00
mipsnet.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
msf2-emac.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
mv88w8618_eth.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ne2000-isa.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ne2000-pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
ne2000.c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
ne2000.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
net_rx_pkt.c hw/net/net_rx_pkt: Remove deadcode 2024-10-03 17:26:05 +03:00
net_rx_pkt.h hw/net/net_rx_pkt: Remove deadcode 2024-10-03 17:26:05 +03:00
net_tx_pkt.c Revert "hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()" 2025-03-10 17:07:16 +08:00
net_tx_pkt.h igb: Implement Tx SCTP CSO 2023-05-23 15:20:15 +08:00
npcm7xx_emc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
npcm_gmac.c hw/net/npcm_gmac.c: Drop 'buf' local variable 2025-07-21 10:21:51 +08:00
npcm_pcs.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
opencores_eth.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pcnet-pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pcnet.c Avoid unaligned fetch in ladr_match() 2024-03-12 19:28:32 +08:00
pcnet.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
rtl8139.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
smc91c111.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_llan.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
stellaris_enet.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sungem.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
sunhme.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
trace-events hw/net: Add NPCM8XX PCS Module 2025-02-20 15:22:22 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
tulip.c hw/net/tulip: skip automatic zero-init of large array 2025-06-12 13:40:15 -04:00
tulip.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
vhost_net-stub.c net: Add save_acked_features callback to vhost_net 2025-07-14 13:27:09 +08:00
vhost_net.c net: Add is_vhost_user flag to vhost_net struct 2025-07-14 13:27:09 +08:00
virtio-net.c virtio-net: Fix VLAN filter table reset timing 2025-08-01 08:33:04 -04:00
vmware_utils.h hw/net/vmxnet3: Fix code to work on big endian hosts, too 2017-11-20 11:08:00 +08:00
vmxnet3_defs.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
vmxnet3.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
vmxnet3.h hw: replace FSF postal address with licenses URL 2025-06-26 00:42:37 +02:00
vmxnet_debug.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
xen_nic.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
xgmac.c hw/net/xgamc: skip automatic zero-init of large array 2025-06-12 13:40:16 -04:00
xilinx_axienet.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
xilinx_ethlite.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00