xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86emul: simplify prefix handling for VMFUNC
@ 2016-09-05  9:13 Jan Beulich
  2016-09-05  9:52 ` Andrew Cooper
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Beulich @ 2016-09-05  9:13 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

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@suse.com>

--- 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;




[-- Attachment #2: x86emul-VMFUNC-prefixes.patch --]
[-- Type: text/plain, Size: 740 bytes --]

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 <jbeulich@suse.com>

--- 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;

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-09-30 18:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <8CA46881B83C354B99AD61C20C93EB1BE6C082@ORSMSX109.amr.corp.intel.com>
     [not found] ` <57E176D70200007800110C54@prv-mh.provo.novell.com>
2016-09-20 22:35   ` [Patch] x86emul: simplify prefix handling for VMFUNC Lai, Paul
2016-09-21  8:39     ` Jan Beulich
2016-09-21 17:22       ` Lai, Paul
2016-09-26 18:13         ` Lai, Paul
2016-09-27  8:26           ` Jan Beulich
2016-09-27 17:43             ` Lai, Paul
2016-09-28  7:47               ` Jan Beulich
2016-09-30 18:13                 ` Lai, Paul
2016-09-05  9:13 [PATCH] " Jan Beulich
2016-09-05  9:52 ` Andrew Cooper
2016-09-05 10:13   ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).