|
| From: | Alexander Graf |
| Subject: | Re: [Qemu-devel] [PATCH] Bug in AMD64 emulation Was: [AMD64] Possible problem with the DF flag during the SYSCALL instruction |
| Date: | Tue, 25 Mar 2008 21:26:12 +0100 |
Hi, On Mar 25, 2008, at 8:45 PM, Jakub Jermar wrote:
as no one has picked my previous report up yet, I am resending my patch again. The patch fixes a bug in the way QEMU emulates AMD64 instruction called SYSCALL. The problem appears to be stale DF variable.
Sorry I didn't have a look at it before. Good catch though!
Jakub
--- helper.c 2008-01-06 20:38:45.000000000 +0100
+++ helper.c.new 2008-03-20 22:39:17.000000000 +0100
@@ -1008,6 +1008,7 @@
DESC_S_MASK |
DESC_W_MASK | DESC_A_MASK);
env->eflags &= ~env->fmask;
+ DF = 1 - (2 * ((env->eflags >> 10) & 1));
I believe you're searching for load_eflags(), which automatically updates the DF flag. Take a look at the SVM code for that issue as well (helper.c:helper_vmrun).
if (code64)
env->eip = env->lstar;
else
Alex
| [Prev in Thread] | Current Thread | [Next in Thread] |