From: "Jan Beulich" Subject: [PATCH] x86emul: simplify prefix handling for VMFUNC Date: Mon, 05 Sep 2016 03:13:12 -0600 Message-ID: <57CD5348020000780010BA3F@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartFDCB6A38.1__=" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgpxu-0004DX-KK for xen-devel@lists.xenproject.org; Mon, 05 Sep 2016 09:13:18 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel Cc: Andrew Cooper List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartFDCB6A38.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 --- 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 = =3D=3D vex_66), - EXC_UD, -1); + if ( vex.pfx ) + break; fail_if(ops->vmfunc =3D=3D NULL); if ( (rc =3D ops->vmfunc(ctxt) !=3D X86EMUL_OKAY) ) goto done; --=__PartFDCB6A38.1__= Content-Type: text/plain; name="x86emul-VMFUNC-prefixes.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86emul-VMFUNC-prefixes.patch" x86emul: simplify prefix handling for VMFUNC=0A=0ALOCK prefixes get dealt = with elsewhere and 66, F2, and F3 can all be=0Achecked for in one go by = looking at vex.pfx.=0A=0ASigned-off-by: Jan Beulich =0A= =0A--- a/xen/arch/x86/x86_emulate/x86_emulate.c=0A+++ b/xen/arch/x86/x86_em= ulate/x86_emulate.c=0A@@ -3942,8 +3942,8 @@ x86_emulate(=0A = goto rdtsc;=0A }=0A case 0xd4: /* vmfunc */=0A- = generate_exception_if(lock_prefix | rep_prefix() | (vex.pfx =3D=3D = vex_66),=0A- EXC_UD, -1);=0A+ = if ( vex.pfx )=0A+ break;=0A fail_if(ops->vmfunc= =3D=3D NULL);=0A if ( (rc =3D ops->vmfunc(ctxt) !=3D = X86EMUL_OKAY) )=0A goto done;=0A --=__PartFDCB6A38.1__= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --=__PartFDCB6A38.1__=--