x86emul: fix PINSRW and adjust other {,V}PINSR*
authorJan Beulich <jbeulich@suse.com>
Fri, 23 Oct 2020 16:03:18 +0000 (18:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Oct 2020 16:03:18 +0000 (18:03 +0200)
commit06f0598b41f23c9e4cf7d8c5a05b282de92f3a35
treead8ba3335844f977f8c80568e9d0cdb4ffc03a42
parent9af5e2b31b4e6f3892b4614ecd0a619af5d64d7e
x86emul: fix PINSRW and adjust other {,V}PINSR*

The use of simd_packed_int together with no further update to op_bytes
has lead to wrong signaling of #GP(0) for PINSRW without a 16-byte
aligned memory operand. Use simd_none instead and override it after
general decoding with simd_other, like is done for the B/D/Q siblings.

While benign, for consistency also use DstImplicit instead of DstReg
in x86_decode_twobyte().

PINSR{B,D,Q} also had a stray (redundant) get_fpu() invocation, which
gets dropped.

For further consistency also
- use src.bytes instead of op_bytes in relevant memcpy() invocations,
- avoid the pointless updating of op_bytes (all we care about later is
  that the value be less than 16).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c