]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/i386: fix width of third operand of VINSERTx128
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jul 2025 23:10:12 +0000 (01:10 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 29 Jul 2025 17:15:11 +0000 (20:15 +0300)
commit489a0714bf1894ceaa341f271382d38e9b8598b3
tree3955dbf487d93978a3835eb21fe732efd5183ce1
parent9e9172ffb48e5402f95ce6a4a69faf04ae486448
target/i386: fix width of third operand of VINSERTx128

Table A-5 of the Intel manual incorrectly lists the third operand of
VINSERTx128 as Wqq, but it is actually a 128-bit value.  This is
visible when W is a memory operand close to the end of the page.

Fixes the recently-added poly1305_kunit test in linux-next.

(No testcase yet, but I plan to modify test-avx2 to use memory
close to the end of the page.  This would work because the test
vectors correctly have the memory operand as xmm2/m128).

Reported-by: Eric Biggers <ebiggers@kernel.org>
Tested-by: Eric Biggers <ebiggers@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: qemu-stable@nongnu.org
Fixes: 79068477686 ("target/i386: reimplement 0x0f 0x3a, add AVX", 2022-10-18)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit feea87cd6b645d5166bdd304aac88f47f63dc2ef)
(Mjt: adjust for 7.2.x due to lack of v8.1.0-2167-ge000687f12
 "target/i386: validate VEX.W for AVX instructions")
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/i386/tcg/decode-new.c.inc