Hi,
Recently, i use a script to continuously reset a VM and
i found my VM frequently halts at "Attempting to allocate
VGA stack via pmm call". After analyzing, i think it may
be a problem of SeaBIOS.
From the log(attached below), we can see handle_post()
executes twice and this makes the destination address of
"Relocating init" change when the 2nd reset command comes.
This also influences on the source address of "Copying MPTABLE".
At last, the VM will be stuck at attempting to allocate VGA
stack via pmm call.
Could you offer me a solution to fix this problem?
==============bad SeaBIOS log======
SeaBIOS (version rel-1.8.1-0-g4adadbd-20151127_220019-UVP)
No Xen hypervisor found.
Running on QEMU (i440fx)
Running on KVM
RamSize: 0xc0000000 [cmos]
Now vcpu cpu_id = 0 <<========= i add
Static seabios entry times =1 <<========= i add
Relocating init from 0x000dbb30 to 0xbffad2c0 (size 76928)
Found QEMU fw_cfg
SeaBIOS (version rel-1.8.1-0-g4adadbd-20151127_220019-UVP) <<========= handle_post() execute again?
No Xen hypervisor found.
Running on QEMU (i440fx)
Running on KVM
RamSize: 0xc0000000 [cmos]
Now vcpu cpu_id = 0 <<========= i add
Static seabios entry times =2 <<========= i add
Relocating init from 0x000dbb30 to 0xbff997b0 (size 76928) <<========= here, the dest address has been changed!
Found QEMU fw_cfg
RamBlock: addr 0x0000000000000000 len 0x00000000c0000000 [e820]
RamBlock: addr 0x0000000100000000 len 0x0000000240000000 [e820]
Moving pm_base to 0x600
boot order:
1: /pci@i0cf8/ide@1,1/drive@0/disk@0
2: HALT
CPU Mhz=2406
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
Found 11 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: IO: c000 - c1cf
PCI: 32: 00000000c0000000 - 00000000fec00000
PCI: map device bdf=00:1f.0 bar 0, addr 0000c000, size 00000100 [io]
PCI: map device bdf=00:03.0 bar 0, addr 0000c100, size 00000040 [io]
PCI: map device bdf=00:04.0 bar 0, addr 0000c140, size 00000040 [io]
PCI: map device bdf=00:01.2 bar 4, addr 0000c180, size 00000020 [io]
PCI: map device bdf=00:05.0 bar 0, addr 0000c1a0, size 00000020 [io]
PCI: map device bdf=00:01.1 bar 4, addr 0000c1c0, size 00000010 [io]
PCI: map device bdf=00:03.0 bar 6, addr feb80000, size 00040000 [mem]
PCI: map device bdf=00:02.0 bar 6, addr febc0000, size 00010000 [mem]
PCI: map device bdf=00:02.0 bar 1, addr febd0000, size 00001000 [mem]
PCI: map device bdf=00:03.0 bar 1, addr febd1000, size 00001000 [mem]
PCI: map device bdf=00:04.0 bar 1, addr febd2000, size 00001000 [mem]
PCI: map device bdf=00:05.0 bar 1, addr febd3000, size 00001000 [mem]
PCI: map device bdf=00:06.0 bar 0, addr febd4000, size 00001000 [mem]
PCI: map device bdf=00:02.0 bar 0, addr fa000000, size 02000000 [prefmem]
PCI: map device bdf=00:06.0 bar 2, addr fc000000, size 01000000 [prefmem]
PCI: init bdf=00:00.0 id=8086:1237
PCI: init bdf=00:01.0 id=8086:7000
PIIX3/PIIX4 init: elcr=00 0c
PCI: init bdf=00:01.1 id=8086:7010
PCI: init bdf=00:01.2 id=8086:7020
PCI: init bdf=00:01.3 id=8086:7113
Using pmtimer, ioport 0x608
PCI: init bdf=00:02.0 id=1013:00b8
PCI: init bdf=00:03.0 id=1af4:1000
PCI: init bdf=00:04.0 id=1af4:1004
PCI: init bdf=00:05.0 id=1af4:1003
PCI: init bdf=00:06.0 id=1af4:1110
PCI: init bdf=00:1f.0 id=1af4:8888
PCI: Using 00:02.0 for primary VGA
handle_smp: apic_id=1
handle_smp: apic_id=4
handle_smp: apic_id=7
handle_smp: apic_id=5
handle_smp: apic_id=6
handle_smp: apic_id=2
handle_smp: apic_id=3
Found 8 cpu(s) max supported 8 cpu(s)
Copying PIR from 0xbffbea18 to 0x000f5460
Copying MPTABLE from 0x00006e30/bff90570 to 0x000f5360 <<========== here, the src address is different from normal
Copying SMBIOS entry point from 0x00006e11 to 0x000f5180
Scan for VGA option rom
Running option rom at c000:0003
Start SeaVGABIOS (version rel-1.8.1-0-g4adadbd-20151127_220021-UVP)
enter vga_post:
a=00000010 b=0000ffff c=00000000 d=0000ffff ds=0000 es=f000 ss=0000
si=00000000 di=00005540 bp=00000000 sp=00006dbe cs=f000 ip=d2c4 f=0000
cirrus init
cirrus init 2
Attempting to allocate VGA stack via pmm call to f000:d369 <<=========== here, always halt!
============end===========