qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC] [PATCH] TSS ljmp issues (fwd)


From: malc
Subject: [Qemu-devel] [RFC] [PATCH] TSS ljmp issues (fwd)
Date: Mon, 19 Jun 2006 22:34:05 +0400 (MSD)


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:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]