]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86emul: unconditionally deliver #UD for LWP insns
authorJan Beulich <jbeulich@suse.com>
Tue, 23 Jul 2019 14:52:19 +0000 (16:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 23 Jul 2019 14:52:19 +0000 (16:52 +0200)
This is to accompany commit 91f86f8634 ("x86/svm: Drop support for AMD's
Lightweight Profiling").

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c

index a0e203f5aef89031f53dddb79101bb8d9955e52a..25436612436570477dc2a5409c7ef7d2956e933c 100644 (file)
@@ -10525,6 +10525,16 @@ x86_emulate(
         }
         goto unrecognized_insn;
 
+    case X86EMUL_OPC_XOP(09, 0x12): /* XOP Grp3 */
+        switch ( modrm_reg & 7 )
+        {
+        case 0: /* llwpcb r */
+        case 1: /* slwpcb r */
+            /* LWP is unsupported, so produce #UD unconditionally. */
+            generate_exception(EXC_UD);
+        }
+        goto unrecognized_insn;
+
     case X86EMUL_OPC_XOP(09, 0x82): /* vfrczss xmm/m128,xmm */
     case X86EMUL_OPC_XOP(09, 0x83): /* vfrczsd xmm/m128,xmm */
         generate_exception_if(vex.l, EXC_UD);
@@ -10609,6 +10619,16 @@ x86_emulate(
         break;
     }
 
+    case X86EMUL_OPC_XOP(0a, 0x12): /* XOP Grp4 */
+        switch ( modrm_reg & 7 )
+        {
+        case 0: /* lwpins $imm32,r/m,r */
+        case 1: /* lwpval $imm32,r/m,r */
+            /* LWP is unsupported, so produce #UD unconditionally. */
+            generate_exception(EXC_UD);
+        }
+        goto unrecognized_insn;
+
     default:
     unimplemented_insn:
         rc = X86EMUL_UNIMPLEMENTED;