[precise] [PATCH] SRU: KVM: x86: emulate movdqa
Anton Nayshtut
anton at swortex.com
Sun Jun 15 11:54:24 UTC 2014
BugLink: https://bugs.launchpad.net/bugs/1330177
(backported from commit 49597d8116ad70aabb598e606b218ddd9315b0af
linux-stable)
The commit 49597d8116ad70aabb598e606b218ddd9315b0af cherry-picked with
small changes: Aligned and Unaligned macros removed.
[SRU Justification]
[Explanation]
movdqa emulation is not supported in kernel 3.2, so the patch is only
relevant for Precise 3.2 kernels.
[Impact]
Without movdqa emulation the MS SVVP "PCI Hardware Compliance Test for
Systems" fails for Windows 2012 VM.
This test fails and hangs the VM to the point that the VM becomes unusable.
[Test Case]
Windows 2012 Guest VMs running "PCI Hardware Compliance Test for
Systems" SVVP test.
Signed-off-by: Stefan Hajnoczi <stefanha at linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi at redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti at redhat.com>
(backported from commit 49597d8116ad70aabb598e606b218ddd9315b0af
linux-stable)
Signed-off-by: Anton Nayshtut <anton at swortex.com>
Conflicts:
arch/x86/kvm/emulate.c
---
arch/x86/kvm/emulate.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index f5302da..bc3648f 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2675,7 +2675,7 @@ static int em_rdtsc(struct x86_emulate_ctxt *ctxt)
static int em_mov(struct x86_emulate_ctxt *ctxt)
{
- ctxt->dst.val = ctxt->src.val;
+ memcpy(ctxt->dst.valptr, ctxt->src.valptr, ctxt->op_bytes);
return X86EMUL_CONTINUE;
}
@@ -2703,12 +2703,6 @@ static int em_mov_sreg_rm(struct x86_emulate_ctxt
*ctxt)
return load_segment_descriptor(ctxt, sel, ctxt->modrm_reg);
}
-static int em_movdqu(struct x86_emulate_ctxt *ctxt)
-{
- memcpy(&ctxt->dst.vec_val, &ctxt->src.vec_val, ctxt->op_bytes);
- return X86EMUL_CONTINUE;
-}
-
static int em_invlpg(struct x86_emulate_ctxt *ctxt)
{
int rc;
@@ -3162,7 +3156,7 @@ static struct opcode group11[] = {
};
static struct gprefix pfx_0f_6f_0f_7f = {
- N, N, N, I(Sse, em_movdqu),
+ N, I(Sse, em_mov), N, I(Sse, em_mov),
};
static struct opcode opcode_table[256] = {
--
1.7.9.5
More information about the kernel-team
mailing list