[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix jmp im on x86_64 when executing 32-bit code
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH] Fix jmp im on x86_64 when executing 32-bit code |
Date: |
Tue, 09 Dec 2008 14:14:19 +0100 |
User-agent: |
Thunderbird 2.0.0.17 (X11/20080922) |
When running grub-install (32-bit) on an x86_64 Linux system in qemu, it
hangs on a pagefault forever, because an integer overflow occurs on the
IP on "jmp im". This patch masks overflows for 32 bit IPs on a 64 bit
system, just like it is done for 16 bit IPs already.
Using this patch, x86_64 openSUSE installation works again.
Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Index: target-i386/translate.c
===================================================================
--- target-i386/translate.c (revision 5959)
+++ target-i386/translate.c (working copy)
@@ -6165,6 +6165,8 @@
tval += s->pc - s->cs_base;
if (s->dflag == 0)
tval &= 0xffff;
+ else if(!CODE64(s))
+ tval &= 0xffffffff;
gen_jmp(s, tval);
break;
case 0xea: /* ljmp im */
- [Qemu-devel] [PATCH] Fix jmp im on x86_64 when executing 32-bit code,
Alexander Graf <=