[SeaBIOS] vgabios -> seabios breaks (my) 16-bit applications

Kevin O'Connor kevin at koconnor.net
Fri Jan 9 17:58:26 CET 2015


On Thu, Jan 08, 2015 at 09:36:44PM -0600, Richard Laager wrote:
> I've recently upgraded a host from Ubuntu Precise (qemu-kvm-1.0) to
> Ubuntu Trusty (qemu 2.0.0). I have a Windows 2008 32-bit OS running on a
> 64-bit VM that runs a 16-bit line of business application. (While I
> realize that "upgrade the application" is the right answer, I can't.)
> The Windows VM boots, but the business application crashes on startup.
> Changing the VM to be a 32-bit VM doesn't help.
> 
> After several hours of compiling and testing intermediate qemu versions,
> I accidentally stumbled into the real issue. Trusty has switched from
> vgabios to seabios. I have confirmed that switching the vgabios*.bin
> images back to the vgabios package (rather than seabios) fixes the
> 16-bit application in the guest.

Hi Richard,

Thanks for the detailed report, and I'm sorry that you are having
problems.

> Per a suggestion on the Ubuntu bug I filed, I built an updated seabios
> package using the source from git (specifically, revision
> 60e0e55f212dadd043ab9e39bee05a48013ddd8f). It has the same problem.
> 
> I then set CONFIG_DEBUG_LEVEL=8 and booted with "-chardev
> stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios" per:
> http://www.seabios.org/pipermail/seabios/2011-May/001718.html
> 
> The debug log is attached. For more details, including a couple of
> screenshots of the NTVDM crash dialog, see:
> https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1404396

Does the crash occur around the time one of the debug messages is
produced, or is the crash seemingly uncorrelated?  I don't see
anything suspicious in the log.

> 
> What's the next step in debugging this?
> 

Getting a test case that we could run to reproduce on our side would
really help.  Do other 16bit programs in your environment also crash?

Does the app or some part of its 16bit code run for some time before
the crash, or does the crash occur immiediately (ie, is it NTVDM
crashing or is something in the app causing NTVDM to crash)?

I'm a bit surprised that NTVDM would be directly accessing the video
bios, or would allow the 16bit programs it runs to direclty access the
bios.  Can you provide some more info on the app itself - is it a dos
program, a windows 3.0 program, does it run full screen or in a
window?  If it runs full screen, is it possible to run it in a window,
and does that still crash?

Ultimately what we want to try and do is find what part of seavgabios
is at issue.

There are a couple of things you could try to see if it makes any
difference - entirely disable debugging in seavgabios
(CONFIG_DEBUG_LEVEL=0) in the unlikley case that the debug port writes
themselves are causing confusion, and try disabling
CONFIG_VGA_ALLOCATE_EXTRA_STACK.

Also, can you check if the emulated cirrus vga card has the same issue
(qemu command line of "-vga cirrus" and make sure there is no "-vga
std" - not sure how one does that from libvirt).

-Kevin



More information about the SeaBIOS mailing list