From be832fdc089af84f393f1c8d234c5944d5a2b4e3 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 19 Jan 2017 10:34:21 +0100 Subject: [PATCH] x86emul: simplify prefix handling for VMFUNC LOCK prefixes get dealt with elsewhere, and 66, F2, and F3 can all be checked for in one go by looking at vex.pfx. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/x86_emulate/x86_emulate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index d264d5951f..880d565eb9 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -4690,8 +4690,7 @@ x86_emulate( #endif case 0xd4: /* vmfunc */ - generate_exception_if(lock_prefix | rep_prefix() | (vex.pfx == vex_66), - EXC_UD); + generate_exception_if(vex.pfx, EXC_UD); fail_if(!ops->vmfunc); if ( (rc = ops->vmfunc(ctxt)) != X86EMUL_OKAY ) goto done; -- 2.30.2