[SeaBIOS] Qemu-kvm VM halt at allocate VGA stack when continuously reset VM

Kevin O'Connor kevin at koconnor.net
Mon Nov 30 16:26:56 CET 2015


On Sat, Nov 28, 2015 at 07:12:47AM +0000, Xulei (Stone) wrote:
> 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?

If seabios resets before it sets HaveRunPost then it probably wont
work well, as it will rerun the POST code without resetting the global
variables it has modified.

Unfortunately, it's not clear to me that we can simply move the
setting of HaveRunPost to an earlier point, as the handle_resume()
code would need to be audited to ensure it can run even if POST hasn't
completed.

So, it looks like a fix for this will take some further analysis.

-Kevin



More information about the SeaBIOS mailing list