From: Andy Walls <awalls@md.metrocast.net>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-kvm problem with DOS/4GW extender and EMM386.EXE
Date: Tue, 11 May 2010 18:10:21 -0400 [thread overview]
Message-ID: <1273615821.4840.31.camel@localhost> (raw)
In-Reply-To: <t2k52d4a3891005111409scfb9c807pd76b16313431effd@mail.gmail.com>
On Wed, 2010-05-12 at 00:09 +0300, Mohammed Gamal wrote:
> On Tue, May 11, 2010 at 11:56 PM, Andy Walls <awalls@md.metrocast.net> wrote:
> > Running an MS-DOS 6.22 image with qemu-kvm on a RedHat Linux OS, I
> > noticed the guest OS becomes hung and my dmesg gets spammed with
> >
> > set_cr0: #GP, set PG flag with a clear PE flag
> >
> > That message appears to be the linux kernel's kvm emulator griping about
> > Paging Enable bit being enabled while the Protection Enable bit is set
> > for real mode. (The Intel manual says this should be a protection
> > fault).
> >
> > The program that causes this has the DOS/4GW DOS extender runtime
> > compiled into it.
> >
> > I found that when I don't load the EMM386.EXE memory manager, the
> > problem doesn't occur.
> >
> > Here's a kvmtrace segment of when things are not working:
> >
> > 0 (+ 0) IO_WRITE vcpu = 0x00000000 pid = 0x00001997 [ port = 0x0070, size = 1 ]
> > 28471049668815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049671815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000004e, rip = 0x00000000 00002a18 ]
> > 0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x00001997 [ errorcode = 0x00000000, virt = 0x00000000 0001ba28 ]
> > 28471049675815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049678815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000004e, rip = 0x00000000 00000334 ]
> > 0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x00001997 [ errorcode = 0x00000000, virt = 0x00000000 00019344 ]
> > 28471049681815 (+ 3000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049685815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000000, rip = 0x00000000 000002a7 ]
> > 0 (+ 0) CR_READ vcpu = 0x00000000 pid = 0x00001997 [ CR# = 0, value = 0x00000000 80000011 ]
> > 28471049688815 (+ 3000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049691815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000010, rip = 0x00000000 000002ae ]
> > 0 (+ 0) LMSW vcpu = 0x00000000 pid = 0x00001997 [ value = 0x80000011 ]
> > 28471049696815 (+ 5000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049699815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000004e, rip = 0x00000000 00005593 ]
> > 0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x00001997 [ errorcode = 0x00000000, virt = 0x00000000 000262e3 ]
> > 28471049703815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049706815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000004e, rip = 0x00000000 000044d6 ]
> > 0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x00001997 [ errorcode = 0x00000000, virt = 0x00000000 00025226 ]
> > 28471049709815 (+ 3000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049713815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000004e, rip = 0x00000000 000055c0 ]
> > 0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x00001997 [ errorcode = 0x00000002, virt = 0x00000000 00024f79 ]
> > 28471049717815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049721815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000000, rip = 0x00000000 00002a69 ]
> > 0 (+ 0) CR_READ vcpu = 0x00000000 pid = 0x00001997 [ CR# = 0, value = 0x00000000 80000011 ]
> > 28471049723815 (+ 2000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049726815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000010, rip = 0x00000000 00002a73 ]
> > 0 (+ 0) LMSW vcpu = 0x00000000 pid = 0x00001997 [ value = 0x80000010 ]
> > 28471049781815 (+ 55000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049784815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000004e, rip = 0x00000000 00001fb8 ]
> > 0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x00001997 [ errorcode = 0x00000000, virt = 0x00000000 00022d08 ]
> > 28471049788815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049792815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000007b, rip = 0x00000000 00001fd6 ]
> > 0 (+ 0) IO_WRITE vcpu = 0x00000000 pid = 0x00001997 [ port = 0x0020, size = 1 ]
> > 28471049794815 (+ 2000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049797815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000007b, rip = 0x00000000 00001fd9 ]
> > 0 (+ 0) IO_READ vcpu = 0x00000000 pid = 0x00001997 [ port = 0x0020, size = 1 ]
> > 28471049800815 (+ 3000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049803815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000004e, rip = 0x00000000 00001f70 ]
> > 0 (+ 0) PAGE_FAULT vcpu = 0x00000000 pid = 0x00001997 [ errorcode = 0x00000000, virt = 0x00000000 0001a072 ]
> > 28471049807815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049811815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000000, rip = 0x00000000 00002a69 ]
> > 0 (+ 0) CR_READ vcpu = 0x00000000 pid = 0x00001997 [ CR# = 0, value = 0x00000000 80000011 ]
> > 28471049815815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049818815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000010, rip = 0x00000000 00002a73 ]
> > 0 (+ 0) LMSW vcpu = 0x00000000 pid = 0x00001997 [ value = 0x80000010 ]
> > 28471049840815 (+ 22000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049844815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000007b, rip = 0x00000000 00001fd6 ]
> > 0 (+ 0) IO_WRITE vcpu = 0x00000000 pid = 0x00001997 [ port = 0x0020, size = 1 ]
> > 28471049846815 (+ 2000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049849815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000007b, rip = 0x00000000 00001fd9 ]
> > 0 (+ 0) IO_READ vcpu = 0x00000000 pid = 0x00001997 [ port = 0x0020, size = 1 ]
> > 28471049851815 (+ 2000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049855815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000000, rip = 0x00000000 00002a69 ]
> > 0 (+ 0) CR_READ vcpu = 0x00000000 pid = 0x00001997 [ CR# = 0, value = 0x00000000 80000011 ]
> > 28471049858815 (+ 3000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049861815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000010, rip = 0x00000000 00002a73 ]
> > 0 (+ 0) LMSW vcpu = 0x00000000 pid = 0x00001997 [ value = 0x80000010 ]
> > 28471049882815 (+ 21000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049885815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000007b, rip = 0x00000000 00001fd6 ]
> > 0 (+ 0) IO_WRITE vcpu = 0x00000000 pid = 0x00001997 [ port = 0x0020, size = 1 ]
> > 28471049887815 (+ 2000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049890815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000007b, rip = 0x00000000 00001fd9 ]
> > 0 (+ 0) IO_READ vcpu = 0x00000000 pid = 0x00001997 [ port = 0x0020, size = 1 ]
> > 28471049892815 (+ 2000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049896815 (+ 4000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000000, rip = 0x00000000 00002a69 ]
> > 0 (+ 0) CR_READ vcpu = 0x00000000 pid = 0x00001997 [ CR# = 0, value = 0x00000000 80000011 ]
> > 28471049900815 (+ 4000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049903815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x00000010, rip = 0x00000000 00002a73 ]
> > 0 (+ 0) LMSW vcpu = 0x00000000 pid = 0x00001997 [ value = 0x80000010 ]
> > 28471049933815 (+ 30000) VMENTRY vcpu = 0x00000000 pid = 0x00001997
> > 28471049936815 (+ 3000) VMEXIT vcpu = 0x00000000 pid = 0x00001997 [ exitcode = 0x0000007b, rip = 0x00000000 00001fd6 ]
> >
> >
> >
> >
> > To me it appears EMM386.EXE enables paging, and the DOS/4GW DOS extender
> > tries to manipulate the PE bit in CR0 with LMSW but doesn't succeed.
> >
> > These programs appear to work fine in VMWare and on real hardware.
> >
> >
> > Any ideas on how to make EMM386.EXE and the DOS/$GW extender work in
> > qemu-kvm?
> >
> > Regards,
> > Andy
> >
> >
> >
>
> Are you using this on an Intel-VT machine?
No, an AMD 64 bit machine.
Regards,
Andy
next prev parent reply other threads:[~2010-05-11 22:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 20:56 [Qemu-devel] qemu-kvm problem with DOS/4GW extender and EMM386.EXE Andy Walls
2010-05-11 21:09 ` Mohammed Gamal
2010-05-11 22:10 ` Andy Walls [this message]
2010-05-11 21:21 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1273615821.4840.31.camel@localhost \
--to=awalls@md.metrocast.net \
--cc=m.gamal005@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.