* [Qemu-devel] [RFC] [PATCH] TSS ljmp issues (fwd)
@ 2006-06-19 18:34 malc
0 siblings, 0 replies; only message in thread
From: malc @ 2006-06-19 18:34 UTC (permalink / raw)
To: qemu-devel
Sorry about previous e-mail, my mail client decided to ambush me.
QEMU does not correctly handle jumps to TSS segments, the code in
switch_tss loads new eflags, but cc_op is never set to CC_OP_EFLAGS.
The problem manifests itself when trying to run DJGPP binaries
compressed with UPX. It goes something like this:
sub esi, 0FFFFFFFCh
adc ebx, ebx
loc_169: ; CODE XREF: start+1B
mov al, [edi] ; <-- exception
jb short loc_158
mov eax, 1
When using default DJGPPs DPMI provider (CWSDPMI) the following code
takes the wrong route in `jb' due to interrupt handler exiting via
jump to TSS (and QEMU not setting cc_op) properly.
Attached patch cures this, however i'm not sure that it's the best
way of doing that nor that it is comprehensive.
Sincerely,
malc
--
mailto:malc@pulsesoft.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-19 18:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-19 18:34 [Qemu-devel] [RFC] [PATCH] TSS ljmp issues (fwd) malc
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).