From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1xSL-0002Ne-Eb for qemu-devel@nongnu.org; Wed, 14 Apr 2010 03:56:17 -0400 Received: from [140.186.70.92] (port=45484 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1xSE-0002M2-CJ for qemu-devel@nongnu.org; Wed, 14 Apr 2010 03:56:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1xSC-0002fj-Fa for qemu-devel@nongnu.org; Wed, 14 Apr 2010 03:56:10 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:44773) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1xSC-0002fa-3Z for qemu-devel@nongnu.org; Wed, 14 Apr 2010 03:56:08 -0400 Message-ID: <4BC57515.3030009@web.de> Date: Wed, 14 Apr 2010 09:56:05 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20100413232056.GA21321@shareable.org> In-Reply-To: <20100413232056.GA21321@shareable.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig885814342EE59A2D9ED0CB9E" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: Problem with DOS application and 286 DOS Extender application List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier , Gerhard Wiesinger Cc: qemu-devel@nongnu.org, Roy Tam This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig885814342EE59A2D9ED0CB9E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jamie Lokier wrote: > Gerhard Wiesinger wrote: >> It is a non public, proprietary application which uses the Ergo Comput= ing=20 >> 286 DOS Extender. I guess some other application which use the same DO= S=20 >> extender have the same problem. So best thing is to find another=20 >> application which uses the Ergo Computing 286 DOS Extender, too. >=20 > The 286 was obsolete 20 years ago, although code depending on it > persisted for some years after. >=20 > I'm fairly sure the number of people using (or trying to use) Qemu > with 286-specific code is very small indeed, so unfortunately for a > 286 problem, you will need to help reproduce it as much as you can for > it to be fixed. In some scenarios, we use QEMU in emulation mode for such a legacy guest (16-bit protected mode), but we mostly run it in KVM mode these days. It works fairly well under QEMU, but also we did not explore all corner case= s. >=20 > Note that Qemu doesn't emulate segments properly even for 32-bit x86 > code, and 16-bit (286) code depends on that all the more. That may be > the problem. More precisely: QEMU does not check for segment limits. This can be a problem with buggy or pedantic guests, but usually one tried to avoid triggering this anyway. I once wrote a crude patch to add this, but it had significant performance impact and did not properly make use of the TCG to optimize the checks. You'll find it in the archives (but I guess it no longer applies). >=20 > Or it may be the "reset using keyboard controller and BIOS" method > used to switch from protected mode to real mode on a 286 is not > implemented properly, or is not supported by the BIOS properly. >=20 > Or it may simply be a bug in 16-bit task segment switching or > something like that, which is quite complex and so rarely used that it > might never have been properly tested. Task switching looks fairly stable in QEMU (in contrast to KVM where we just ran into some more corner cases). >=20 > Did you try running the application under Bochs, which has a more > accurate emulation of very old x86 CPUs? >=20 > -- Jamie >=20 That said, having some test case to reproduce the issue is essential. I'm willing to have a look if you can provide such thing (publicly or privately). Before that, you could already try building QEMU with --enable-debug and run it with "-d exec,int". The generated /tmp/qemu.log may point out where things go wrong (usually where faults starts to occur). Jan --------------enig885814342EE59A2D9ED0CB9E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkvFdRYACgkQitSsb3rl5xSr6gCgklaIIv+0PLH57E7qo5HWwoI1 eb4AoOkQ/14qEQLoU5ie5KzMWpoRhJWi =a1LD -----END PGP SIGNATURE----- --------------enig885814342EE59A2D9ED0CB9E--