diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-04-09 11:40:00 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-04-16 19:36:15 -0400 |
commit | 49597d8116ad70aabb598e606b218ddd9315b0af (patch) | |
tree | a48b792af42f74867bb929716f84d62145847602 /arch/x86 | |
parent | 1c11b37669a5209bd11fb857a103634afef971e8 (diff) |
KVM: x86: emulate movdqa
An Ubuntu 9.10 Karmic Koala guest is unable to boot or install due to
missing movdqa emulation:
kvm_exit: reason EXCEPTION_NMI rip 0x7fef3e025a7b info 7fef3e799000 80000b0e
kvm_page_fault: address 7fef3e799000 error_code f
kvm_emulate_insn: 0:7fef3e025a7b: 66 0f 7f 07 (prot64)
movdqa %xmm0,(%rdi)
[avi: mark it explicitly aligned]
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/emulate.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6302e5c74341..b160fb1fc68b 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2818,7 +2818,7 @@ static int em_rdpmc(struct x86_emulate_ctxt *ctxt) | |||
2818 | 2818 | ||
2819 | static int em_mov(struct x86_emulate_ctxt *ctxt) | 2819 | static int em_mov(struct x86_emulate_ctxt *ctxt) |
2820 | { | 2820 | { |
2821 | ctxt->dst.val = ctxt->src.val; | 2821 | memcpy(ctxt->dst.valptr, ctxt->src.valptr, ctxt->op_bytes); |
2822 | return X86EMUL_CONTINUE; | 2822 | return X86EMUL_CONTINUE; |
2823 | } | 2823 | } |
2824 | 2824 | ||
@@ -2898,12 +2898,6 @@ static int em_mov_sreg_rm(struct x86_emulate_ctxt *ctxt) | |||
2898 | return load_segment_descriptor(ctxt, sel, ctxt->modrm_reg); | 2898 | return load_segment_descriptor(ctxt, sel, ctxt->modrm_reg); |
2899 | } | 2899 | } |
2900 | 2900 | ||
2901 | static int em_movdqu(struct x86_emulate_ctxt *ctxt) | ||
2902 | { | ||
2903 | memcpy(&ctxt->dst.vec_val, &ctxt->src.vec_val, ctxt->op_bytes); | ||
2904 | return X86EMUL_CONTINUE; | ||
2905 | } | ||
2906 | |||
2907 | static int em_invlpg(struct x86_emulate_ctxt *ctxt) | 2901 | static int em_invlpg(struct x86_emulate_ctxt *ctxt) |
2908 | { | 2902 | { |
2909 | int rc; | 2903 | int rc; |
@@ -3443,7 +3437,7 @@ static struct opcode group11[] = { | |||
3443 | }; | 3437 | }; |
3444 | 3438 | ||
3445 | static struct gprefix pfx_0f_6f_0f_7f = { | 3439 | static struct gprefix pfx_0f_6f_0f_7f = { |
3446 | N, N, N, I(Sse | Unaligned, em_movdqu), | 3440 | N, I(Sse | Aligned, em_mov), N, I(Sse | Unaligned, em_mov), |
3447 | }; | 3441 | }; |
3448 | 3442 | ||
3449 | static struct opcode opcode_table[256] = { | 3443 | static struct opcode opcode_table[256] = { |