]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
x86emul: add missing EVEX.R' checks
authorJan Beulich <jbeulich@suse.com>
Thu, 22 Feb 2024 10:54:07 +0000 (11:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Feb 2024 10:54:07 +0000 (11:54 +0100)
commitcb319824bfa8d3c9ea0410cc71daaedc3e11aa2a
tree294c57795be80adba2eafb69a55c72047f5e8305
parent54557ee9b4ad8f2ed708c3dd222ee0db74d4c83b
x86emul: add missing EVEX.R' checks

EVEX.R' is not ignored in 64-bit code when encoding a GPR or mask
register. While for mask registers suitable checks are in place (there
also covering EVEX.R), they were missing for the few cases where in
EVEX-encoded instructions ModR/M.reg encodes a GPR. While for VPEXTRW
the bit is replaced before an emulation stub is invoked, for
VCVT{,T}{S,D,H}2{,U}SI this actually would have led to #UD from inside
an emulation stub, in turn raising #UD to the guest, but accompanied by
log messages indicating something's wrong in Xen nevertheless.

Fixes: 001bd91ad864 ("x86emul: support AVX512{F,BW,DQ} extract insns")
Fixes: baf4a376f550 ("x86emul: support AVX512F legacy-equivalent scalar int/FP conversion insns")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c