public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh-l3A5Bk7waGM@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
	Zwane Mwaikambo <zwane-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Justin Forbes <jmforbes-a5Mqy2EUIFVAfugRpC6u6w@public.gmane.org>,
	Domenico Andreoli
	<cavokz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Chris Wedgwood <reviews-vFB7bnJMxjixIvdkapsUdQ@public.gmane.org>,
	Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>,
	Michael Krufky <mkrufky-dJidKbW2IEtAfugRpC6u6w@public.gmane.org>,
	Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>,
	Chuck Ebbert <cebbert-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Dave Jones <davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Chuck Wolber <chuckw-lrwSPXAIdEw7YuNMryXyOw@public.gmane.org>,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org
Subject: [patch 17/60] KVM: x86 emulator: implement movnti mem, reg
Date: Wed, 12 Dec 2007 22:51:50 -0800	[thread overview]
Message-ID: <20071213065150.GR6867@kroah.com> (raw)
In-Reply-To: <20071213065039.GA6867-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: kvm-x86-emulator-implement-movnti-mem-reg.patch --]
[-- Type: text/plain, Size: 1770 bytes --]


2.6.23-stable review patch.  If anyone has any objections, please let us
know.

------------------
From: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

patch a012e65aee48379a7a87eadafa74f878b61522b9 in mainline.

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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>

---
 drivers/kvm/x86_emulate.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- 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;
 

-- 

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

       reply	other threads:[~2007-12-13  6:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071213064518.328162328@mini.kroah.org>
     [not found] ` <20071213065039.GA6867-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2007-12-13  6:51   ` Greg KH [this message]
2007-12-13  6:51   ` [patch 18/60] KVM: x86 emulator: fix access registers for instructions with ModR/M byte and Mod = 3 Greg KH
2007-12-13  6:51   ` [patch 19/60] KVM: x86 emulator: invd instruction Greg KH
2007-12-13  6:51   ` [patch 20/60] KVM: SVM: Intercept the invd and wbinvd instructions Greg KH
2007-12-13  6:52   ` [patch 24/60] KVM: Skip pio instruction when it is emulated, not executed Greg KH
2007-12-13  6:52   ` [patch 26/60] KVM: VMX: Reset mmu context when entering real mode Greg KH
     [not found] ` <20071213065039.GA6867@kroah.com>
2007-12-13  6:52   ` [patch 21/60] KVM: x86 emulator: Use emulator_write_emulated and not emulator_write_std Greg KH
2007-12-13  6:52   ` [patch 22/60] KVM: Fix hang on uniprocessor Greg KH
2007-12-13  6:52   ` [patch 23/60] KVM: SVM: Fix FPU leak while emulating clts Greg KH
2007-12-13  6:52   ` [patch 25/60] KVM: VMX: Force vm86 mode if setting flags during real mode 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=20071213065150.GR6867@kroah.com \
    --to=gregkh-l3a5bk7wagm@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=cavokz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=cebbert-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=chuckw-lrwSPXAIdEw7YuNMryXyOw@public.gmane.org \
    --cc=davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jmforbes-a5Mqy2EUIFVAfugRpC6u6w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mkrufky-dJidKbW2IEtAfugRpC6u6w@public.gmane.org \
    --cc=rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org \
    --cc=reviews-vFB7bnJMxjixIvdkapsUdQ@public.gmane.org \
    --cc=stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=tytso-3s7WtUTddSA@public.gmane.org \
    --cc=zwane-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.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