x86emul: support RDPKRU/WRPKRU
authorJan Beulich <jbeulich@suse.com>
Mon, 3 May 2021 13:31:43 +0000 (15:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 May 2021 13:31:43 +0000 (15:31 +0200)
commitd26c277826dbbd64b3e3cb57159e1ecbfad33bc8
tree4eba77075cb21c07194e907249969e4bfe340958
parent705f7b55be551b9d39b5ab52689a330d73f9c8eb
x86emul: support RDPKRU/WRPKRU

Since we support PKU for HVM guests, the respective insns should also be
recognized by the emulator.

In emul_test_read_cr() instead of further extending the comment to
explain the hex numbers, switch to using X86_CR4_* values.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/test_x86_emulator.c
tools/tests/x86_emulator/x86-emulate.c
xen/arch/x86/x86_emulate/x86_emulate.c
xen/include/asm-x86/processor.h