public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: stable@kernel.org
Cc: linux-kernel@vger.kernel.org, kvm-devel@lists.sourceforge.net,
	Sheng Yang <sheng.yang@intel.com>, Avi Kivity <avi@qumranet.com>
Subject: [PATCH 01/10] KVM: x86 emulator: implement 'movnti mem, reg'
Date: Sun,  2 Dec 2007 13:18:38 +0200	[thread overview]
Message-ID: <11965943273722-git-send-email-avi@qumranet.com> (raw)
In-Reply-To: <1196594327338-git-send-email-avi@qumranet.com>

From: Sheng Yang <sheng.yang@intel.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@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.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


  reply	other threads:[~2007-12-02 11:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-02 11:18 [PATCH 00/10]: KVM updates for 2.6.23.9 (-stable) Avi Kivity
2007-12-02 11:18 ` Avi Kivity [this message]
2007-12-02 11:18 ` [PATCH 02/10] KVM: x86 emulator: fix access registers for instructions with ModR/M byte and Mod = 3 Avi Kivity
2007-12-02 11:18 ` [PATCH 03/10] KVM: x86 emulator: invd instruction Avi Kivity
2007-12-02 11:18 ` [PATCH 04/10] KVM: SVM: Intercept the 'invd' and 'wbinvd' instructions Avi Kivity
2007-12-02 11:18 ` [PATCH 05/10] KVM: x86 emulator: Use emulator_write_emulated and not emulator_write_std Avi Kivity
2007-12-02 11:18 ` [PATCH 06/10] KVM: Fix hang on uniprocessor Avi Kivity
2007-12-02 11:18 ` [PATCH 07/10] KVM: SVM: Fix FPU leak while emulating clts Avi Kivity
2007-12-02 11:18 ` [PATCH 08/10] KVM: Skip pio instruction when it is emulated, not executed Avi Kivity
2007-12-02 11:18 ` [PATCH 09/10] KVM: VMX: Force vm86 mode if setting flags during real mode Avi Kivity
2007-12-02 11:18 ` [PATCH 10/10] KVM: VMX: Reset mmu context when entering " Avi Kivity
2007-12-02 19:08 ` [stable] [PATCH 00/10]: KVM updates for 2.6.23.9 (-stable) Greg KH
2007-12-03  9:23   ` [kvm-devel] " Avi Kivity
2007-12-03 12:57     ` [stable] [kvm-devel] " Greg KH
2007-12-03 13:11       ` [kvm-devel] [stable] " Avi Kivity
2007-12-03 13:31         ` [stable] [kvm-devel] " Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11965943273722-git-send-email-avi@qumranet.com \
    --to=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sheng.yang@intel.com \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox