Re: Using Linux+dosemu to install Windows

Stas Sergeev
2002-07-26T16:47:26Z

Hello.

Patrick J. LoPresti wrote:
>> /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?
Yep, that was the problem.

> Will you submit your patch to Alan Cox? It would be nice to get this
> fixed in the long run.
Yes, I'll try to submit this one.

> One more thing. How precise should the emuluation be?
Hmm, 100%? :)

> 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?
Yes, see how the thread.v86mask gets
initialised in do_sys_vm86().

> I believe clearing those flags is a bad idea. They are both used
> routinely to detect the CPU version:
I agree:(
The only good thing here is that the
amount of progs that works on 486 but
not on 386 is very minor...

> I suggest removing the BUG: stuff from the dosemu source code, then
> figuring out what the real problem is and fixing it properly.
This was suggested several times before
but still noone figured out the real
problem so all that suggestions failed.

> What do you think?
Currently the "BUG" cannot be removed.
Just set the $_cpu=(80486) and try to
run FoxPro after removing the "BUG" from
dpmi.c and sigsegv.c (there are 3 places
where the AC gets cleared) and it will
crash.
Furthermore somehow it happens that if the
signal was received while AC is set,
dosemu itself executes with AC set and
crashs somewhere in glibc functions due
to exception 0x11.
If you can find the roots of the problem,
the "BUG" will be removed, thats for sure...
My guess is that the problem is somewhere
in the kernel/vm86() because when CPU-emu
is used, the "BUG" doesn't occure.