x86emul: generalize vector length handling for AVX512/EVEX
authorJan Beulich <jbeulich@suse.com>
Mon, 29 Oct 2018 12:40:56 +0000 (13:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 29 Oct 2018 12:40:56 +0000 (13:40 +0100)
commit9254b0f5e93d11bbb9aceeaca48245c305e3bb39
tree44eff44b0e7eb3c75c91e45967f61591bd2f12db
parent079df73c0a5b4b09b71044091d65a986452d829c
x86emul: generalize vector length handling for AVX512/EVEX

To allow for some code sharing where possible, copy VEX.L into EVEX.LR
even for VEX (or XOP) encoded insns. Make operand size determination
use this right away, at the same time adding consistency checks for the
EVEX scalar insn cases (the non-scalar ones aren't uniform enough for
the checking to be done in a central place like this).

Note that the broadcast case is not handled here, but will be taken care
of elsewhere (in just a single place rather than at least two).

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