xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86emul: shifts/rotates don't allow LOCK prefix
@ 2017-07-04 10:32 Jan Beulich
  2017-07-04 10:54 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2017-07-04 10:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper

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

... just like e.g. SHLD/SHRD don't (see commit dee231b5a8 [x86emul:
improve LOCK handling]).

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
@@ -3853,6 +3853,7 @@ x86_emulate(
         break;
 
     case 0xc0 ... 0xc1: grp2: /* Grp2 */
+        generate_exception_if(lock_prefix, EXC_UD);
         switch ( modrm_reg & 7 )
         {
         case 0: /* rol */




[-- Attachment #2: x86emul-shift-no-lock.patch --]
[-- Type: text/plain, Size: 518 bytes --]

x86emul: shifts/rotates don't allow LOCK prefix

... just like e.g. SHLD/SHRD don't (see commit dee231b5a8 [x86emul:
improve LOCK handling]).

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
@@ -3853,6 +3853,7 @@ x86_emulate(
         break;
 
     case 0xc0 ... 0xc1: grp2: /* Grp2 */
+        generate_exception_if(lock_prefix, EXC_UD);
         switch ( modrm_reg & 7 )
         {
         case 0: /* rol */

[-- 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] 2+ messages in thread

end of thread, other threads:[~2017-07-04 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-04 10:32 [PATCH] x86emul: shifts/rotates don't allow LOCK prefix Jan Beulich
2017-07-04 10:54 ` Andrew Cooper

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).