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:[EMAIL PROTECTED]


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to