From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Patrick J. LoPresti" Subject: Re: Using Linux+dosemu to install Windows Date: 26 Jul 2002 12:06:34 -0400 Sender: linux-msdos-owner@vger.kernel.org Message-ID: References: <3D41566B.5030903@yahoo.com> Mime-Version: 1.0 Return-path: In-Reply-To: List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-msdos@vger.kernel.org Stas Sergeev 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