Skip to contentSkip to conversation

WfW setup and DOS display.sys hanging

Qemu-devel Sebastian 4 participants 11 messages Jan 8, 2014 – Feb 10, 2014

lore
Share & tools
lore

Sebastian

author
#0 lore raw

Hi,

I noticed in newer versions of Qemu (Debian Jessie) a regression causing DISPLAY.SYS from MS-DOS 6.22 to hang the system as soon as loaded.

The Windows for Workgroups 3.11 SETUP.EXE file hangs with a cleared screen and the cursor blinking in the top left of the screen. The DOSIDLE.EXE[1] file hangs after printing out some system information.

Git-Bisecting returned "roms: update vgabios binaries" (commit 6eefccc0bb9c34051b1e21880fc3a1c1c8686edd) as the bad commit.

I tested the i386-softmmu target on Debian 7.3 (wheezy), x86_64 host and gcc 4.7.2 (Debian 4.7.2-5) without KVM support.

[1] Source and binary are available e.g. at http://maribu.home.xs4all.nl/zeurkous/download/mirror/dosidle/

Best Regards,
Sebastian

#1 lore raw

Hi Gerd,

Am 09.01.2014 um 00:20 hat Sebastian geschrieben:

Quoted 5 lines

Hi,

I noticed in newer versions of Qemu (Debian Jessie) a regression causing DISPLAY.SYS from MS-DOS 6.22 to hang the system as soon as loaded.

now that you sent a pull request for a SeaBIOS update, I tried what would happen with this one. Sadly, while it does fix my hanging Win 7 boot, DOS still hangs while loading display.sys.

Any ideas where to look, or are you going to have a look yourself? When I tried to debug it a while ago, I didn't see anything obvious, but then I didn't invest that much time for it either.

I haven't tried out any of the other cases described below.

Kevin

Quoted 17 lines

The Windows for Workgroups 3.11 SETUP.EXE file hangs with a cleared screen and the cursor blinking in the top left of the screen. The DOSIDLE.EXE[1] file hangs after printing out some system information.

Git-Bisecting returned "roms: update vgabios binaries" (commit 6eefccc0bb9c34051b1e21880fc3a1c1c8686edd) as the bad commit.

I tested the i386-softmmu target on Debian 7.3 (wheezy), x86_64 host and gcc 4.7.2 (Debian 4.7.2-5) without KVM support.

[1] Source and binary are available e.g. at
http://maribu.home.xs4all.nl/zeurkous/download/mirror/dosidle/

Best Regards,
Sebastian

#2 lore raw

[ adding seabios list ]

Quoted 5 lines · Kevin Wolf

Hi Gerd,

Am 09.01.2014 um 00:20 hat Sebastian geschrieben:

Quoted 2 lines

Hi,

Quoted 7 lines
Quoted 3 lines

I noticed in newer versions of Qemu (Debian Jessie) a regression causing DISPLAY.SYS from MS-DOS 6.22 to hang the system as soon as loaded.

now that you sent a pull request for a SeaBIOS update, I tried what would happen with this one. Sadly, while it does fix my hanging Win 7 boot, DOS still hangs while loading display.sys.

[ This is http://www.kraxel.org/cgit/qemu/tag/?id=pull-roms-1
with the 1.7.4 update ]

Digged out my prehistoric msdos floppy images. Can confirm the hang. Using default vga (i.e. cirrus).

Switching back to lgplvgabios ("make -C roms lgplvgabios" in qemu src tree) makes the hang go away.

Quoted 3 lines

Any ideas where to look, or are you going to have a look yourself? When I tried to debug it a while ago, I didn't see anything obvious, but then I didn't invest that much time for it either.

"perf kvm stat live" shows tons of NMIs:

VM-EXIT Samples Samples% Time% Min Time Max Time Avg time

EXCEPTION_NMI 660538 99.82% 99.40% 0us 183us 0.67us ( +- 0.14% )

  EXTERNAL_INTERRUPT       1133     0.17%     0.58%        0us       43us      2.25us ( +-   4.86% )
      IO_INSTRUCTION         18     0.00%     0.01%        1us        5us      3.39us ( +-   6.50% )
   PENDING_INTERRUPT         17     0.00%     0.01%        1us       11us      2.15us ( +-  26.24% )

How can one get a trace log of all the kvm tracepoints these days?

'perf list' shows a bunch of kvm trace events, but "perf trace -e '*kvm*' doesn't show me anything ...

cheers,
Gerd

Quoted 1 line

I haven't tried out any of the other cases described below.

[ keeping full quote for seabios list ]

Quoted 17 lines
Quoted 17 lines

The Windows for Workgroups 3.11 SETUP.EXE file hangs with a cleared screen and the cursor blinking in the top left of the screen. The DOSIDLE.EXE[1] file hangs after printing out some system information.

Git-Bisecting returned "roms: update vgabios binaries" (commit 6eefccc0bb9c34051b1e21880fc3a1c1c8686edd) as the bad commit.

I tested the i386-softmmu target on Debian 7.3 (wheezy), x86_64 host and gcc 4.7.2 (Debian 4.7.2-5) without KVM support.

[1] Source and binary are available e.g. at
http://maribu.home.xs4all.nl/zeurkous/download/mirror/dosidle/

Best Regards,
Sebastian

#3 lore raw
Quoted 14 lines · Gerd Hoffmann
Quoted 5 lines · Kevin Wolf

Hi Gerd,

Am 09.01.2014 um 00:20 hat Sebastian geschrieben:

Quoted 2 lines

Hi,

Quoted 7 lines
Quoted 3 lines

I noticed in newer versions of Qemu (Debian Jessie) a regression causing DISPLAY.SYS from MS-DOS 6.22 to hang the system as soon as loaded.

now that you sent a pull request for a SeaBIOS update, I tried what would happen with this one. Sadly, while it does fix my hanging Win 7 boot, DOS still hangs while loading display.sys.

Quoted 5 lines

[ This is http://www.kraxel.org/cgit/qemu/tag/?id=pull-roms-1
with the 1.7.4 update ]

Digged out my prehistoric msdos floppy images. Can confirm the hang. Using default vga (i.e. cirrus).

I can't reproduce the hang with the dosidle program linked by Sebastian. (I ran the program on freedos and on an msdos floppy and both times it said it install succesfully.) Can someone walk through the steps needed to reproduce the problem?

Also, logs from "-chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios" would be useful.

-Kevin

#4 lore raw
Quoted 18 lines · Kevin O'Connor
Quoted 17 lines · Gerd Hoffmann
Quoted 5 lines · Kevin Wolf

Hi Gerd,

Am 09.01.2014 um 00:20 hat Sebastian geschrieben:

Quoted 2 lines

Hi,

Quoted 7 lines
Quoted 3 lines

I noticed in newer versions of Qemu (Debian Jessie) a regression causing DISPLAY.SYS from MS-DOS 6.22 to hang the system as soon as loaded.

now that you sent a pull request for a SeaBIOS update, I tried what would happen with this one. Sadly, while it does fix my hanging Win 7 boot, DOS still hangs while loading display.sys.

[ This is http://www.kraxel.org/cgit/qemu/tag/?id=pull-roms-1
with the 1.7.4 update ]

Quoted 7 lines
Quoted 2 lines

Digged out my prehistoric msdos floppy images. Can confirm the hang. Using default vga (i.e. cirrus).

I can't reproduce the hang with the dosidle program linked by Sebastian. (I ran the program on freedos and on an msdos floppy and both times it said it install succesfully.) Can someone walk through the steps needed to reproduce the problem?

I found some old Win3.1 images, and I do see the failure running setup on that (when run from dos 6). I'll look into it.

Sebastian, can you document the steps to reproduce the dosidle and display.sys failure? (I tried putting display.sys into a dos6 config.sys, but it doesn't like my parameters so I don't think it's doing anything.)

-Kevin

author
#5 lore raw

Hi,

Quoted 5 lines
Quoted 4 lines

I can't reproduce the hang with the dosidle program linked by Sebastian. (I ran the program on freedos and on an msdos floppy and both times it said it install succesfully.) Can someone walk through the steps needed to reproduce the problem?

Quoted 7 lines

I found some old Win3.1 images, and I do see the failure running setup on that (when run from dos 6). I'll look into it.

Sebastian, can you document the steps to reproduce the dosidle and display.sys failure? (I tried putting display.sys into a dos6 config.sys, but it doesn't like my parameters so I don't think it's doing anything.)

I cloned the git repository, and built with:

$ ./configure --target-list=i386-softmmu
$ make -j2

I then installed MS-DOS onto a virtual 50 MB disk, all default settings:

$ /tmp/qemu/i386-softmmu/qemu-system-i386 -m 4 -hda msdos.img -fda MS-DOS_1.IMG

After rebooting, qemu hangs with 100% cpu usage when loading DISPLAY.SYS. It is loaded by the following line in CONFIG.SYS:

DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,,1)

Surprisingly, this hang occurs with all of MS-DOS 5.00, 6.20 and 6.22 (German), but not with a Russian MS-DOS 6.22 (which appears in english). I don't have any other language version of DOS to test with, though.

Best Regards,
Sebastian

#6 lore raw
Quoted 17 lines · Sebastian
Quoted 5 lines
Quoted 4 lines

I can't reproduce the hang with the dosidle program linked by Sebastian. (I ran the program on freedos and on an msdos floppy and both times it said it install succesfully.) Can someone walk through the steps needed to reproduce the problem?

Quoted 7 lines

I found some old Win3.1 images, and I do see the failure running setup on that (when run from dos 6). I'll look into it.

Sebastian, can you document the steps to reproduce the dosidle and display.sys failure? (I tried putting display.sys into a dos6 config.sys, but it doesn't like my parameters so I don't think it's doing anything.)

I cloned the git repository, and built with:

$ ./configure --target-list=i386-softmmu
$ make -j2
Quoted 8 lines

I then installed MS-DOS onto a virtual 50 MB disk, all default settings:

$ /tmp/qemu/i386-softmmu/qemu-system-i386 -m 4 -hda msdos.img -fda
MS-DOS_1.IMG

After rebooting, qemu hangs with 100% cpu usage when loading DISPLAY.SYS. It is loaded by the following line in CONFIG.SYS:

DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,,1)

Thanks. That DEVICE line causes a failure for me as well and the call trace is much easier to understand.

The SeaVGABIOS patch below fixes both the DISPLAY.SYS and Win3 setup issue for me. (I can't reproduce the dosidle problem.)

-Kevin

vgasrc/vgabios.c +1 -1
@@ -1114,7 +1114,7 @@ struct funcInfo {
     u8 save_flags;
     u8 disp_info;
     u8 reserved_34[12];
-};
+} PACKED;
 
 static void
 handle_101b(struct bregs *regs)
author
#7 lore raw

Hi,

Quoted 10 lines
Quoted 4 lines

After rebooting, qemu hangs with 100% cpu usage when loading DISPLAY.SYS. It is loaded by the following line in CONFIG.SYS:

DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,,1)

Thanks. That DEVICE line causes a failure for me as well and the call trace is much easier to understand.

The SeaVGABIOS patch below fixes both the DISPLAY.SYS and Win3 setup issue for me. (I can't reproduce the dosidle problem.)

The attached patch does indeed fix both the DISPLAY.SYS and Windows Setup problems for me. Thanks a lot! I can't reproduce the dosidle-problem either, it works now.

A straight non-networked Windows for Workgroups 3.11 installation now hangs after loading the Program Manager.

I noticed that SeaBIOS does not work correctly with parallel make, log excerpts following:

$ LANG=C make -j16 # dual-core machine without SMT
  Compiling IASL out/src/fw/acpi-dsdt.hex
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  Compiling IASL out/src/fw/ssdt-proc.hex
  Compiling IASL out/src/fw/ssdt-pcihp.hex

[...]

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 2 Optimizations
Generating offset file out/asm-offsets.h
Compiling (16bit) out/romlayout.o
In file included from src/romlayout.S:9:0:
src/config.h:4:22: fatal error: autoconf.h: No such file or directory compilation terminated.
make: *** [out/romlayout.o] Error 1
make: *** Waiting for unfinished jobs....
ASL Input: out/src/fw/q35-acpi-dsdt.dsl.i - 515 lines, 28284 bytes, 413 keywords AML Output: out/src/fw/q35-acpi-dsdt.aml - 7344 bytes, 239 named objects, 174 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 445 Optimizations
Build Kconfig config file
$

Best Regards,
Sebastian

#8 lore raw
Quoted 10 lines · Sebastian

Hi,

Quoted 8 lines
Quoted 4 lines

After rebooting, qemu hangs with 100% cpu usage when loading DISPLAY.SYS. It is loaded by the following line in CONFIG.SYS:

DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,,1)

Thanks. That DEVICE line causes a failure for me as well and the call trace is much easier to understand.

Quoted 6 lines
Quoted 2 lines

The SeaVGABIOS patch below fixes both the DISPLAY.SYS and Win3 setup issue for me. (I can't reproduce the dosidle problem.)

The attached patch does indeed fix both the DISPLAY.SYS and Windows Setup problems for me. Thanks a lot! I can't reproduce the dosidle-problem either, it works now.

Okay, I hae pushed that patch into mainline.

Quoted 2 lines

A straight non-networked Windows for Workgroups 3.11 installation now hangs after loading the Program Manager.

Is that related to seabios?

Quoted 2 lines

I noticed that SeaBIOS does not work correctly with parallel make, log excerpts following:

I'll take a look if I get a chance.

-Kevin

#10 lore raw
Quoted 9 lines · Gerd Hoffmann

Hi,

Quoted 2 lines

Sebastian, can you document the steps to reproduce the dosidle and display.sys failure?

Placed a copy of a fresh ms-dos 6.2 install here (qcow2 hard disk image): http://www.kraxel.org/download/

display.sys hangs reproduces with that image.

Thanks. I can reproduce this hang, and it looks like the same problem of handle_101b() missing the PACKED declaration. It seems fixed with the "vgabios: Make sure exported structs use PACKED" patch.

-Kevin