[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86emul: simplify prefix handling for VMFUNC



On 05/09/16 10:13, Jan Beulich wrote:
> 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 <jbeulich@xxxxxxxx>

As far as subsuming the checks goes, this is fine.  However, is the code
actually correct?  The manual makes no indication that the use of these
prefixes is prohibited.

~Andrew

>
> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
> @@ -3942,8 +3942,8 @@ x86_emulate(
>              goto rdtsc;
>          }
>          case 0xd4: /* vmfunc */
> -            generate_exception_if(lock_prefix | rep_prefix() | (vex.pfx == 
> vex_66),
> -                                  EXC_UD, -1);
> +            if ( vex.pfx )
> +                break;
>              fail_if(ops->vmfunc == NULL);
>              if ( (rc = ops->vmfunc(ctxt) != X86EMUL_OKAY) )
>                  goto done;
>
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.