WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [HVM] Small fixes to mmio decoder/emulato

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Small fixes to mmio decoder/emulator.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 27 Nov 2006 11:40:16 +0000
Delivery-date: Mon, 27 Nov 2006 03:40:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID b0a86eda868a047e444da80291ab8755f2d62238
# Parent  97c55251047041c4636cee2290d5110e2aa0d609
[HVM] Small fixes to mmio decoder/emulator.

Remove a superfluous special case in xchg and fix word-size source
operand movzx.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/hvm/platform.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff -r 97c552510470 -r b0a86eda868a xen/arch/x86/hvm/platform.c
--- a/xen/arch/x86/hvm/platform.c       Mon Nov 27 10:03:35 2006 +0000
+++ b/xen/arch/x86/hvm/platform.c       Mon Nov 27 10:05:23 2006 +0000
@@ -506,13 +506,16 @@ static int mmio_decode(int realmode, uns
         GET_OP_SIZE_FOR_NONEBYTE(*op_size);
         return reg_mem(*op_size, opcode, mmio_op, rex);
 
-    case 0x87:  /* xchg {r/m16|r/m32}, {m/r16|m/r32} */
+    case 0x86:  /* xchg m8, r8 */
         mmio_op->instr = INSTR_XCHG;
-        GET_OP_SIZE_FOR_NONEBYTE(*op_size);
-        if ( ((*(opcode+1)) & 0xc7) == 5 )
-            return reg_mem(*op_size, opcode, mmio_op, rex);
-        else
-            return mem_reg(*op_size, opcode, mmio_op, rex);
+        *op_size = BYTE;
+        GET_OP_SIZE_FOR_BYTE(size_reg);
+        return reg_mem(size_reg, opcode, mmio_op, rex);
+
+    case 0x87:  /* xchg m16/32, r16/32 */
+        mmio_op->instr = INSTR_XCHG;
+        GET_OP_SIZE_FOR_NONEBYTE(*op_size);
+        return reg_mem(*op_size, opcode, mmio_op, rex);
 
     case 0x88: /* mov r8, m8 */
         mmio_op->instr = INSTR_MOV;
@@ -655,14 +658,11 @@ static int mmio_decode(int realmode, uns
         mmio_op->operand[1] = mk_operand(*op_size, index, 0, REGISTER);
         return DECODE_success;
 
-    case 0xB7: /* movzx m16/m32, r32/r64 */
+    case 0xB7: /* movzx m16, r32/r64 */
         mmio_op->instr = INSTR_MOVZX;
         GET_OP_SIZE_FOR_NONEBYTE(*op_size);
         index = get_index(opcode + 1, rex);
-        if ( rex & 0x8 )
-            mmio_op->operand[0] = mk_operand(LONG, 0, 0, MEMORY);
-        else
-            mmio_op->operand[0] = mk_operand(WORD, 0, 0, MEMORY);
+        mmio_op->operand[0] = mk_operand(WORD, 0, 0, MEMORY);
         mmio_op->operand[1] = mk_operand(*op_size, index, 0, REGISTER);
         return DECODE_success;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [HVM] Small fixes to mmio decoder/emulator., Xen patchbot-unstable <=