From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5403] Do not use load_seg_vm to load CS in real mode iret handling
Date: Thu, 02 Oct 2008 20:02:28 +0000 [thread overview]
Message-ID: <E1KlUNY-0003Wm-DI@cvs.savannah.gnu.org> (raw)
Revision: 5403
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5403
Author: malc
Date: 2008-10-02 20:02:27 +0000 (Thu, 02 Oct 2008)
Log Message:
-----------
Do not use load_seg_vm to load CS in real mode iret handling
load_seg_vm calls cpu_x86_load_seg_cache which updates hflags of
current env, real hardware doesn't do this, nor the code that handles
real mode lret/lcall/ljmp.
This unbreaks "unreal mode" and makes QEMU the first emulator being
able to run Project Angel demo by IMPACT Studios. (Not that there are
many physical machines out there capable of doing the same)
Modified Paths:
--------------
trunk/target-i386/op_helper.c
Modified: trunk/target-i386/op_helper.c
===================================================================
--- trunk/target-i386/op_helper.c 2008-10-02 19:55:50 UTC (rev 5402)
+++ trunk/target-i386/op_helper.c 2008-10-02 20:02:27 UTC (rev 5403)
@@ -2651,7 +2651,8 @@
POPW(ssp, sp, sp_mask, new_eflags);
}
ESP = (ESP & ~sp_mask) | (sp & sp_mask);
- load_seg_vm(R_CS, new_cs);
+ env->segs[R_CS].selector = new_cs;
+ env->segs[R_CS].base = (new_cs << 4);
env->eip = new_eip;
if (env->eflags & VM_MASK)
eflags_mask = TF_MASK | AC_MASK | ID_MASK | IF_MASK | RF_MASK | NT_MASK;
reply other threads:[~2008-10-02 20:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1KlUNY-0003Wm-DI@cvs.savannah.gnu.org \
--to=av1474@comtv.ru \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).