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

[Xen-devel] [PATCH RFC] x86emul: unconditionally deliver #UD for LWP insns


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Wed, 17 Jul 2019 06:42:09 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qVGzK+ypBm+kCW0PvXnLpmzCpMEFk3n1ds0PHpR/l/8=; b=noWpSvGzR5JwqSVg9dUlhvr8lL4n2Kg9UxE9pkJSnPZqeXPCimQD0r9AUKC/QV9/weR+Sbaro7xAuZNg2ZBT2qJ/0TSL/JexUgY/Gf24IfU8Jbe5A+mLYis/CJOQwRmnLvdbZ0IKVmj3U5vbydwxW6ZkjYs4FDzWqI3JSpeX3fUNDwOThnV0ui4Y5jqkqCfktanxkRBaXXE5dH6lIlLNaD7QK6ulmFPkdnMRjzS1UsXrlyXgUYoZMT+s8zppwLGhXEvbwHhjrMidjdIPi2RV1IibwTzzXnCvdGlq1AprBt2yl/ZzHdnw6rvV/v/IK4ZIW4RnP1xgkD3mUbQikfMjBg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WDhO9m3UGT5Gac/780qf6AY37Sxj3xdDcKhlpwdD1HfubgBmXzwNbolrNon1pvYLDlK47j329U3TPJUM5xHvC2pukLkUROnxqODrz20WBWyvm09jmqQ6t1YdNcSB/r57QH95k1u+wqLtWJhZY1IF2VOIMVqbT1HawkdfXGt8iPZdyo3zhJII6d9RWiQAZpL1FJys1LsVlf3t7BDLjwO2ZQG1XuoS0IQ3sBbd913ITOTPjaWJsX3aaETWwm8q5Aja2uF0BEH4a67tQGNQpc9qGS5MYT+Ylr6ZA5Hpp08Zbl/bymngJZEwZscve7zEtl94ivED6giK/5tvusXJ5LRdTw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 17 Jul 2019 06:42:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVPGrBPWLzciEO+UWYWtF8DkKtbQ==
  • Thread-topic: [PATCH RFC] x86emul: unconditionally deliver #UD for LWP insns

This is to accompany commit  ("x86/svm: Drop support for AMD's
Lightweight Profiling").

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
With AMD apparently having abandoned XOP encoded insns, another option
would seem to be to simply wire all unrecognized ones into #UD (rather
then returning UNIMPLEMENTED/UNRECOGNIZED).
---
TODO/RFC: Insert commit ID of referenced commit.

--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -10367,6 +10367,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);
@@ -10451,6 +10461,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;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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