[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] restoring eflags after iret on x86
From: |
Cohn, Robert S |
Subject: |
[Qemu-devel] restoring eflags after iret on x86 |
Date: |
Sun, 7 Sep 2008 07:02:45 -0700 |
I am working with 0.9.1 sources and have seen a problem with restoring
eflags during an iret.
helper_ret_protected Does this:
if (is_iret) {
/* NOTE: 'cpl' is the _old_ CPL */
eflags_mask = TF_MASK | AC_MASK | ID_MASK | RF_MASK | NT_MASK;
if (cpl == 0)
eflags_mask |= IOPL_MASK;
iopl = (env->eflags >> IOPL_SHIFT) & 3;
if (cpl <= iopl)
eflags_mask |= IF_MASK;
if (shift == 0)
eflags_mask &= 0xffff;
load_eflags(new_eflags, eflags_mask);
}
My understanding is that it also needs to do:
env->cc_op = CC_OP_EFLAGS
Or else it will continue to use the old value of cc_op, which will not
be consistent with the value that was just stored into cc_src.
I looked at the trunk on svn and it appears to have the same problem. It
is strange that iret is broken in this way and no one else is seeing the
problem. Am I missing something?
Robert
- [Qemu-devel] restoring eflags after iret on x86,
Cohn, Robert S <=