lxc c2-m2 focal VM causes KVM internal error during PCI init
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
linux-kvm (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Launching a 2 CPU 2G VM with lxc often cause a KVM internal error during boot.
Reproducer:
lxc launch ubuntu:20.04 dannf-test2 -t c2-m2 --vm
QEMU will report a KVM internal error:
KVM internal error. Suberror: 3
extra data[0]: 800000ec
extra data[1]: 31
extra data[2]: 81
extra data[3]: 30000
RAX=00000000000
RSI=ffff8880785
R8 =0000000029417eca R9 =0000000000000000 R10=00000000000
R12=00000000000
RIP=ffffffff817
ES =0000 0000000000000000 ffffffff 00c00000
CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
SS =0000 0000000000000000 ffffffff 00c00000
DS =0000 0000000000000000 ffffffff 00c00000
FS =0000 0000000000000000 ffffffff 00c00000
GS =0000 ffff888078500000 ffffffff 00c00000
LDT=0000 0000000000000000 ffffffff 00c00000
TR =0040 fffffe0000036000 0000206f 00008b00 DPL=0 TSS64-busy
GDT= fffffe0000034000 0000007f
IDT= fffffe0000000000 00000fff
CR0=80050033 CR2=00000000fff
DR0=00000000000
DR6=00000000fff
EFER=0000000000
Code=00 85 c0 7e 07 0f 00 2d 16 93 4b 00 fb f4 8b 05 14 61 78 00 <65> 44 8b 25 b4 86 8b 7e 85 c0 0f 8f 85 00 00 00 5b 41 5c 41 5d 5d c3 65 8b 05 9e 86 8b 7e
The last lines on the console:
acpi PNP0A08:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
acpi PNP0A08:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
pci_bus 0000:00: root bus resource [mem 0x000a0000-
pci_bus 0000:00: root bus resource [mem 0x7a100000-
pci_bus 0000:00: root bus resource [mem 0xc0000000-
pci_bus 0000:00: root bus resource [mem 0x800000000-
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: [8086:29c0] type 00 class 0x060000
pci 0000:00:01.0: [1b36:000c] type 01 class 0x060400
pci 0000:00:01.0: reg 0x10: [mem 0xc1245000-
pci 0000:00:01.1: [1b36:000c] type 01 class 0x060400
pci 0000:00:01.1: reg 0x10: [mem 0xc1244000-
pci 0000:00:01.2: [1b36:000c] type 01 class 0x060400
pci 0000:00:01.2: reg 0x10: [mem 0xc1243000-
pci 0000:00:01.3: [1b36:000c] type 01 class 0x060400
I attached gdb to the VM[*] and retrieved the following backtrace from the guest kernel:
(gdb) bt full 00001fa0c) at /home/dannf/ linux-kvm- 5.4.0/arch/ x86/pci/ direct. c:35 linux-kvm- 5.4.0/arch/ x86/pci/ common. c:46 linux-kvm- 5.4.0/arch/ x86/include/ asm/pci. h:45 read_config_ dword (bus=<optimized out>, devfn=<optimized out>, pos=<optimized out>, value=0xffffc90 00001fa58) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/access. c:65 config_ dword (dev=<optimized out>, where=<optimized out>, val=<optimized out>) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/access. c:550 00d8d000, type=pci_ bar_unknown, res=0xffff88800 0d8d278, pos=16) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/probe. c:196 53584, end = 184467440715847 49924}
inverted_ region = {start = 184466836005701 53600, end = 184467440715847 49991} 00d8d000, howmany=2, rom=56) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/probe. c:334 00d8d000) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/probe. c:1854 50407, end = 184467440715833 69946} linux-kvm- 5.4.0/drivers/ pci/probe. c:2301 single_ device (devfn=<optimized out>, bus=<optimized out>) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/probe. c:2474 single_ device (bus=0xffff8880 00c76c00, devfn=11) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/probe. c:2464 00c76c00, devfn=8) at /home/dannf/ linux-kvm- 5.4.0/drivers/ pci/probe. c:2560
#0 pci_conf1_read (seg=<optimized out>, bus=<optimized out>, devfn=<optimized out>, reg=16, len=4, value=0xffffc90
flags = 582
__dummy = <optimized out>
__dummy2 = <optimized out>
__dummy = <optimized out>
__dummy2 = <optimized out>
#1 0xffffffff815a1964 in raw_pci_read (domain=<optimized out>, bus=<optimized out>, devfn=<optimized out>, reg=<optimized out>, len=<optimized out>, val=<optimized out>) at /home/dannf/
No locals.
#2 0xffffffff815a19a7 in pci_read (bus=<optimized out>, devfn=<optimized out>, where=<optimized out>, size=<optimized out>, value=<optimized out>) at /home/dannf/
No locals.
#3 0xffffffff8144f4c5 in pci_bus_
res = -2147480816
flags = <optimized out>
data = 0
#4 0xffffffff8144f7f2 in pci_read_
No locals.
#5 0xffffffff8145142a in __pci_read_base (dev=0xffff8880
l = 0
sz = 0
mask = <optimized out>
l64 = <optimized out>
sz64 = <optimized out>
mask64 = <optimized out>
orig_cmd = 7
region = {start = 184466836005701
#6 0xffffffff81451757 in pci_read_bases (dev=0xffff8880
res = <optimized out>
pos = 0
reg = <optimized out>
res = <optimized out>
#7 0xffffffff81451dd4 in pci_setup_device (dev=0xffff8880
class = 1540
cmd = 34750
hdr_type = <optimized out>
pos = <optimized out>
region = {start = 184466836006709
res = <optimized out>
#8 0xffffffff81452950 in pci_scan_device (devfn=<optimized out>, bus=<optimized out>) at /home/dannf/
dev = 0xffff888000d8d000
l = 793398
dev = <optimized out>
l = <optimized out>
#9 pci_scan_
dev = <optimized out>
dev = <optimized out>
#10 pci_scan_
dev = 0x0 <fixed_percpu_data>
#11 0xffffffff81452a02 in pci_scan_slot (bus=0xffff8880
fn = 3
...