Commit 3098c076 authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini
Browse files

KVM: x86: Swap the dst and src operand for MOVNTDQA



Swap the MOVNTDQA operands, as MOVNTDQA does NOT in fact have "the same
characteristics as 0F E7 (MOVNTDQ)"; MOVNTDQA loads from memory and stores
to registers, while MOVNTDQ loads from registers and stores to memory.

Per the SDM:

 MOVNTDQ - Move packed integer values in xmm1 to m128 using non-temporal
           hint.

 MOVNTDQA - Move double quadword from m128 to xmm1 using non-temporal hint
            if WC memory type.

Reported-by: default avatarJosh Eads <josheads@google.com>
Fixes: c57d9baf ("KVM: x86: Add support for emulating MOVNTDQA")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Message-ID: <20260506213514.2781948-1-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 6b72d057
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4481,7 +4481,7 @@ static const struct opcode opcode_map_0f_38[256] = {
	X16(N), X16(N),
	/* 0x20 - 0x2f */
	X8(N),
	X2(N), GP(SrcReg | DstMem | ModRM | Mov | Aligned, &pfx_0f_e7_0f_38_2a), N, N, N, N, N,
	X2(N), GP(SrcMem | DstReg | ModRM | Mov | Aligned, &pfx_0f_e7_0f_38_2a), N, N, N, N, N,
	/* 0x30 - 0x7f */
	X16(N), X16(N), X16(N), X16(N), X16(N),
	/* 0x80 - 0xef */