|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: fix emulation of indirect far calls and jumps
commit 5225a95577f71be633e490b729b2e157d4fa3208
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Nov 19 16:59:49 2013 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 19 16:59:49 2013 +0100
x86: fix emulation of indirect far calls and jumps
Commit 86781624 ("x86_emulate: PUSH <mem> must read source operand
just once") corrected the operands of those of the operations of opcode
extension group 5 that only read memory from SrcMem to DstMem, but
failed to also switch the use of "dst" here to "src".
Reported-by: Anthony Perard <anthony.perard@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Tested-by: Anthony Perard <anthony.perard@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---
xen/arch/x86/x86_emulate/x86_emulate.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c
b/xen/arch/x86/x86_emulate/x86_emulate.c
index e89035b..e833cdf 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3571,7 +3571,6 @@ x86_emulate(
_regs.eip = src.val;
src.val = dst.val;
goto push;
- break;
case 4: /* jmp (near) */
_regs.eip = src.val;
dst.type = OP_NONE;
@@ -3580,9 +3579,9 @@ x86_emulate(
case 5: /* jmp (far, absolute indirect) */ {
unsigned long sel;
- generate_exception_if(dst.type != OP_MEM, EXC_UD, -1);
+ generate_exception_if(src.type != OP_MEM, EXC_UD, -1);
- if ( (rc = read_ulong(dst.mem.seg, dst.mem.off+dst.bytes,
+ if ( (rc = read_ulong(src.mem.seg, src.mem.off + op_bytes,
&sel, 2, ctxt, ops)) )
goto done;
@@ -3600,7 +3599,7 @@ x86_emulate(
if ( (rc = load_seg(x86_seg_cs, sel, ctxt, ops)) != 0 )
goto done;
- _regs.eip = dst.val;
+ _regs.eip = src.val;
dst.type = OP_NONE;
break;
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |