x86emul: simplify prefix handling for VMFUNC
PATCH v2 1/1 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.
---
v2: Retain explicit generation of #UD.
---
Note: The SDM doesn't indicate 66, F2, and F3 to be invalid; Intel
meanwhile half-way indicated the SDM to be wrong here, and Andrew (thanks!) has verified this in practice.
xen/arch/x86/x86_emulate/x86_emulate.c +1 -2
@@ -4679,8 +4679,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;
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.
---
v2: Retain explicit generation of #UD.
---
Note: The SDM doesn't indicate 66, F2, and F3 to be invalid; Intel
meanwhile half-way indicated the SDM to be wrong here, and Andrew (thanks!) has verified this in practice.
xen/arch/x86/x86_emulate/x86_emulate.c +1 -2
@@ -4679,8 +4679,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;
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 4 lines · Jan Beulich
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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel