qemu-system-x86_64: ../hw/pci/msix.c:227: msix_table_mmio_write: Assertion `addr + size <= dev->msix_entries_nr * PCI_MSIX_ENTRY_SIZE' failed.
Host environment
- Operating system: Gentoo Linux
- OS/kernel version: Linux R730 6.1.41-gentoo-x86_64 #3 SMP PREEMPT_DYNAMIC Tue Aug 8 12:09:00 CST 2023 x86_64 Intel(R) Xeon(R) CPU E5-2698 v3 @ 2.30GHz GenuineIntel GNU/Linux
- Architecture: x86_64
- QEMU flavor: qemu-system-x86_64
- QEMU version: v8.1.0-rc4
- QEMU command line:
qemu-system-x86_64 \ -M q35 \ -smp 2 \ -m 1G \ -nographic \ -serial mon:stdio \ -kernel $IMAGE/bzImage-qemu-x86_64.bin \ -append "console=ttyS0" \ -device virtio-rng-pci \ -device virtio-balloon \ -device virtio-net-pci
Emulated/Virtualized environment
- Operating system: linux
- OS/kernel version: linux kernel 6.1.38
- Architecture: x86_64
Description of problem
Steps to reproduce
- Run qemu using the provided command line
- linux kernel boot and qemu crashes at pci bus scan step
Additional information
SeaBIOS (version rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org
iPXE (http://ipxe.org) 00:02.0 CA00 PCI2.10 PnP PMM+3EFD0CE0+3EF30CE0 CA00
iPXE (http://ipxe.org) 00:05.0 CB00 PCI2.10 PnP PMM+3EF1FCE0 3EF30CE0 CB00
Booting from ROM...
[ 0.000000] Linux version 6.1.38-yocto-standard (oe-user@oe-host) (x86_64-poky-linux-gcc (GCC) 12.3.0, GNU ld (GNU Binutils) 2.40.0.20230620) #1 SMP PREEMPT_DYNAMIC Thu Jul 6 18:52:54 UTC 2023
[ 0.000000] Command line: console=ttyS0
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] signal: max sigframe size: 1040
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffdefff] usable
[ 0.000000] BIOS-e820: [mem 0x000000003ffdf000-0x000000003fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000b0000000-0x00000000bfffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x000000fd00000000-0x000000ffffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 3.0.0 present.
[ 0.000000] DMI: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
[ 0.000000] last_pfn = 0x3ffdf max_arch_pfn = 0x400000000
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.000000] found SMP MP-table at [mem 0x000f5b80-0x000f5b8f]
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000000F59A0 000014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 0x000000003FFE238A 000038 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 0x000000003FFE217A 0000F4 (v03 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 0x000000003FFE0040 00213A (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 0x000000003FFE0000 000040
[ 0.000000] ACPI: APIC 0x000000003FFE226E 000080 (v03 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 0x000000003FFE0000 000040
[ 0.000000] ACPI: APIC 0x000000003FFE226E 000080 (v03 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: HPET 0x000000003FFE22EE 000038 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: MCFG 0x000000003FFE2326 00003C (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: WAET 0x000000003FFE2362 000028 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: Reserving FACP table memory at [mem 0x3ffe217a-0x3ffe226d]
[ 0.000000] ACPI: Reserving DSDT table memory at [mem 0x3ffe0040-0x3ffe2179]
[ 0.000000] ACPI: Reserving FACS table memory at [mem 0x3ffe0000-0x3ffe003f]
[ 0.000000] ACPI: Reserving APIC table memory at [mem 0x3ffe226e-0x3ffe22ed]
[ 0.000000] ACPI: Reserving HPET table memory at [mem 0x3ffe22ee-0x3ffe2325]
[ 0.000000] ACPI: Reserving MCFG table memory at [mem 0x3ffe2326-0x3ffe2361]
[ 0.000000] ACPI: Reserving WAET table memory at [mem 0x3ffe2362-0x3ffe2389]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x000000003ffdefff]
[ 0.000000] Normal empty
[ 0.000000] Device empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x000000003ffdefff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000003ffdefff]
[ 0.000000] On node 0, zone DMA: 1 pages in unavailable ranges
[ 0.000000] On node 0, zone DMA: 97 pages in unavailable ranges
[ 0.000000] On node 0, zone DMA32: 33 pages in unavailable ranges
[ 0.000000] ACPI: PM-Timer IO Port: 0x608
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.000000] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.000000] ACPI: Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.000000] smpboot: Allowing 2 CPUs, 0 hotplug CPUs
[ 0.000000] [mem 0x40000000-0xafffffff] available for PCI devices
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:2 nr_cpu_ids:2 nr_node_ids:1
[ 0.000000] percpu: Embedded 52 pages/cpu s173288 r8192 d31512 u1048576
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 257759
[ 0.000000] Kernel command line: console=ttyS0
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[ 0.000000] Memory: 1002116K/1048052K available (12294K kernel code, 1469K rwdata, 2600K rodata, 1488K init, 2040K bss, 45680K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] ftrace: allocating 31276 entries in 123 pages
[ 0.000000] ftrace: allocated 123 pages with 6 groups
[ 0.000000] ftrace: allocating 31276 entries in 123 pages
[ 0.000000] ftrace: allocated 123 pages with 6 groups
[ 0.000000] Dynamic Preempt: none
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Rude variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 4352, nr_irqs: 440, preallocated irqs: 16
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] printk: console [ttyS0] enabled
[ 0.000000] ACPI: Core revision 20220331
[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[ 0.020000] APIC: Switch to symmetric I/O mode setup
[ 0.040000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.120000] tsc: Unable to calibrate against PIT
[ 0.120000] tsc: using HPET reference calibration
[ 0.120000] tsc: Detected 2299.960 MHz processor
[ 0.001362] tsc: Marking TSC unstable due to TSCs unsynchronized
[ 0.002851] Calibrating delay loop (skipped), value calculated using timer frequency.. 4599.92 BogoMIPS (lpj=22999600)
[ 0.004441] pid_max: default: 32768 minimum: 301
[ 0.019780] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.020332] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.078474] process: using AMD E400 aware idle routine
[ 0.079221] Last level iTLB entries: 4KB 512, 2MB 255, 4MB 127
[ 0.079631] Last level dTLB entries: 4KB 512, 2MB 255, 4MB 127, 1GB 0
[ 0.081092] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[ 0.082698] Spectre V2 : Mitigation: Retpolines
[ 0.083053] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[ 0.083616] Spectre V2 : Spectre v2 / SpectreRSB : Filling RSB on VMEXIT
[ 0.348864] Freeing SMP alternatives memory: 32K
[ 0.514732] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0xf, model: 0x6b, stepping: 0x1)
[ 0.536546] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.537604] cblist_init_generic: Setting shift to 1 and lim to 1.
[ 0.538995] cblist_init_generic: Setting shift to 1 and lim to 1.
[ 0.541338] Performance Events: PMU not available due to virtualization, using software events only.
[ 0.548504] rcu: Hierarchical SRCU implementation.
[ 0.548986] rcu: Max phase no-delay instances is 1000.
[ 0.563842] smp: Bringing up secondary CPUs ...
[ 0.583950] x86: Booting SMP configuration:
[ 0.584395] .... node #0, CPUs: #1
[ 0.802667] smp: Brought up 1 node, 2 CPUs
[ 0.803300] smpboot: Max logical packages: 1
[ 0.803821] smpboot: Total of 2 processors activated (9202.49 BogoMIPS)
[ 0.864556] devtmpfs: initialized
[ 0.897545] x86/mm: Memory block size: 128MB
[ 0.936982] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.938878] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.980994] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 1.004001] thermal_sys: Registered thermal governor 'step_wise'
[ 1.004143] thermal_sys: Registered thermal governor 'user_space'
[ 1.009528] cpuidle: using governor menu
[ 1.022723] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 1.043717] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xb0000000-0xbfffffff] (base 0xb0000000)
[ 1.050546] PCI: MMCONFIG at [mem 0xb0000000-0xbfffffff] reserved in E820
[ 1.060576] PCI: Using configuration type 1 for base access
[ 1.074215] mtrr: your CPUs had inconsistent fixed MTRR settings
[ 1.075157] mtrr: your CPUs had inconsistent variable MTRR settings
[ 1.076043] mtrr: your CPUs had inconsistent MTRRdefType settings
[ 1.076840] mtrr: probably your BIOS does not setup all CPUs.
[ 1.077612] mtrr: corrected configuration.
[ 1.453630] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 1.454286] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[ 1.467152] raid6: skipped pq benchmark and selected sse2x4
[ 1.467152] raid6: using intx1 recovery algorithm
[ 1.485004] ACPI: Added _OSI(Module Device)
[ 1.485539] ACPI: Added _OSI(Processor Device)
[ 1.485909] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 1.486309] ACPI: Added _OSI(Processor Aggregator Device)
[ 1.578101] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 1.670966] ACPI: Interpreter enabled
[ 1.676848] ACPI: PM: (supports S0 S3 S5)
[ 1.677404] ACPI: Using IOAPIC for interrupt routing
[ 1.683268] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 1.684107] PCI: Using E820 reservations for host bridge windows
[ 1.691382] ACPI: Enabled 2 GPEs in block 00 to 3F
[ 1.828171] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 1.831923] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
[ 1.839401] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug LTR DPC]
[ 1.843631] acpi PNP0A08:00: _OSC: OS now controls [SHPCHotplug PME AER PCIeCapability]
[ 1.867627] PCI host bridge to bus 0000:00
[ 1.868866] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 1.870044] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 1.870572] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 1.871151] pci_bus 0000:00: root bus resource [mem 0x40000000-0xafffffff window]
[ 1.871719] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff window]
[ 1.872269] pci_bus 0000:00: root bus resource [mem 0x100000000-0x8ffffffff window]
[ 1.873668] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.880983] pci 0000:00:00.0: [8086:29c0] type 00 class 0x060000
[ 1.898659] pci 0000:00:01.0: [1234:1111] type 00 class 0x030000
qemu-system-x86_64: ../hw/pci/msix.c:227: msix_table_mmio_write: Assertion `addr + size <= dev->msix_entries_nr * PCI_MSIX_ENTRY_SIZE' failed.
Edited by li xingyuan