[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11965943273722-git-send-email-avi@qumranet.com>
Date: Sun, 2 Dec 2007 13:18:38 +0200
From: Avi Kivity <avi@...ranet.com>
To: stable@...nel.org
Cc: linux-kernel@...r.kernel.org, kvm-devel@...ts.sourceforge.net,
Sheng Yang <sheng.yang@...el.com>,
Avi Kivity <avi@...ranet.com>
Subject: [PATCH 01/10] KVM: x86 emulator: implement 'movnti mem, reg'
From: Sheng Yang <sheng.yang@...el.com>
Implement emulation of instruction:
movnti m32/m64, r32/r64
opcode: 0x0f 0xc3
Needed to support Linux 2.6.16 as guest (used for mmio).
Signed-off-by: Sheng Yang <sheng.yang@...el.com>
Signed-off-by: Avi Kivity <avi@...ranet.com>
---
drivers/kvm/x86_emulate.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 4b8a0cc..804e86c 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -198,7 +198,8 @@ static u16 twobyte_table[256] = {
0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
DstReg | SrcMem16 | ModRM | Mov,
/* 0xC0 - 0xCF */
- 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, DstMem | SrcReg | ModRM | Mov, 0, 0, 0, ImplicitOps | ModRM,
+ 0, 0, 0, 0, 0, 0, 0, 0,
/* 0xD0 - 0xDF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0xE0 - 0xEF */
@@ -1324,6 +1325,10 @@ twobyte_insn:
dst.bytes = op_bytes;
dst.val = (d & ByteOp) ? (s8) src.val : (s16) src.val;
break;
+ case 0xc3: /* movnti */
+ dst.bytes = op_bytes;
+ dst.val = (op_bytes == 4) ? (u32) src.val : (u64) src.val;
+ break;
}
goto writeback;
--
1.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists