KVM: x86 emulator: implement MMX MOVQ (opcodes 0f 6f, 0f 7f)
Needed by some framebuffer drivers. See
https://bugzilla.kernel.org/show_bug.cgi?id=42779
Signed-off-by: Avi Kivity <avi@redhat.com>
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 19aec76..5997513 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2929,6 +2929,12 @@
return X86EMUL_CONTINUE;
}
+static int em_movq(struct x86_emulate_ctxt *ctxt)
+{
+ ctxt->dst.mm_val = ctxt->src.mm_val;
+ return X86EMUL_CONTINUE;
+}
+
static int em_invlpg(struct x86_emulate_ctxt *ctxt)
{
int rc;
@@ -3468,7 +3474,7 @@
};
static struct gprefix pfx_0f_6f_0f_7f = {
- N, N, N, I(Sse, em_movdqu),
+ I(Mmx, em_movq), N, N, I(Sse, em_movdqu),
};
static struct opcode opcode_table[256] = {