public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: "Patrick J. LoPresti" <patl@curl.com>
To: linux-msdos@vger.kernel.org
Subject: Re: Using Linux+dosemu to install Windows
Date: 26 Jul 2002 12:06:34 -0400	[thread overview]
Message-ID: <s5gznweh3sl.fsf@egghead.curl.com> (raw)
In-Reply-To: <mit.lcs.mail.linux-msdos/3D41566B.5030903@yahoo.com>

Stas Sergeev <stssppnn@yahoo.com> writes:

> Good investigation but actually you are hacking the wrong place.
> These instructions are handled in handle_vm86_fault() which is in
> /usr/src/linux/arch/i386/kernel/vm86.c The attached patch must be a
> good start for fixing the problem.

Ah, so the problem is that the kernel's emulation does not account for
multiple prefix bytes?

Will you submit your patch to Alan Cox?  It would be nice to get this
fixed in the long run.

One more thing.  How precise should the emuluation be?  According to
this:

  http://webster.cs.ucr.edu/Page_TechDocs/Doc386/popf.html

The popfd instruction should not modify the VM or RF bits.  (Not to
mention any bits which are reserved in the current revision of the
CPU.)  Or does the kernel already take care of these concerns?

> No, it tries to alter the AC flag which is a bit 2 of the higher
> word of eflags.

Yup, my mistake.

> But dosemu explicitly clears this flag because due to some unknown
> bugs it sometimes sets spuriously.  grep the do_vm86.c for the
> string "BUG:" and comment the relevant code, then winnt.exe will
> work.

Thank you!

I believe clearing those flags is a bad idea.  They are both used
routinely to detect the CPU version:

  http://people.freebsd.org/~kato/cpuident.html

(Similar sample code can be found all over the Web.)

I suggest removing the BUG: stuff from the dosemu source code, then
figuring out what the real problem is and fixing it properly.

What do you think?

 - Pat

  parent reply	other threads:[~2002-07-26 16:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-26 14:02 Using Linux+dosemu to install Windows Stas Sergeev
     [not found] ` <mit.lcs.mail.linux-msdos/3D41566B.5030903@yahoo.com>
2002-07-26 16:06   ` Patrick J. LoPresti [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-28  7:09 Stas Sergeev
2002-07-27 21:10 Stas Sergeev
2002-07-27 22:11 ` Bart Oldeman
2002-07-26 16:47 Stas Sergeev
     [not found] ` <mit.lcs.mail.linux-msdos/3D417D1E.50902@yahoo.com>
2002-07-27 15:02   ` Patrick J. LoPresti
2002-07-26  3:50 Patrick J. LoPresti

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=s5gznweh3sl.fsf@egghead.curl.com \
    --to=patl@curl.com \
    --cc=linux-msdos@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox