x86emul: correct EVEX decoding
authorJan Beulich <jbeulich@suse.com>
Fri, 26 Oct 2018 15:50:01 +0000 (17:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Oct 2018 15:50:01 +0000 (17:50 +0200)
commit5d91b689dde48522a591ad3cac7c0520b4dec30c
tree0ba638c33b6bf8c2e341a8e4dc00f10d90897edf
parent9f36c692845267be7846632d7d5f744d6a5b7f84
x86emul: correct EVEX decoding

Fix an inverted pair of checks, drop an incorrect instance of #UD
raising for non-64-bit mode, and add further generic checks.

Note: Despite what SDM Vol 2 rev 067 states, EVEX.V' is _not_ ignored
      outside of 64-bit mode when the field does not encode a register.
      Just like EVEX.VVVV is required to be 0b1111 in that case, EVEX.V'
      is required to be 1 there.

Also rename the bcst field to br, as #UD generation for individual insns
will need to consider both of its possible meanings.

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