Skip to contentSkip to conversation

[6461] kvm-x86: Remove eflags conversion into emulator format (Jan Kiszka)

Qemu-devel Anthony Liguori 1 participant 1 message Jan 26, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6461

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6461
Author:   aliguori
Date:     2009-01-26 20:32:22 +0000 (Mon, 26 Jan 2009)

Log Message:
-----------
kvm-x86: Remove eflags conversion into emulator format (Jan Kiszka)

It seems that the conversion of the kernel-delivered eflags state into qemu's internal split representation was once needed in an older kvm design (register read-back may have taken place from inside cpu_exec). Today it is plain wrong and causes incorrect cpu state reporting (gdb, monitor) and should also corrupt its saving (savevm, migration). Drop the related lines.

Modified Paths:
--------------

    trunk/target-i386/kvm.c

Modified: trunk/target-i386/kvm.c
===================================================================

target-i386/kvm.c +0 -4
@@ -445,10 +445,6 @@
             }
     }
     env->hflags = (env->hflags & HFLAG_COPY_MASK) | hflags;
-    env->cc_src = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
-    env->df = 1 - (2 * ((env->eflags >> 10) & 1));
-    env->cc_op = CC_OP_EFLAGS;
-    env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
 
     return 0;
 }