Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp49395rwl; Tue, 28 Mar 2023 20:39:30 -0700 (PDT) X-Google-Smtp-Source: AK7set99NDwTU+DJ67IQZLT8w7w9tQIUDyiAzvLrERD+p32YM7fCcHp4GQvdbIbK/4QkZf97GGh0 X-Received: by 2002:a05:6a20:1b18:b0:da:368e:7c73 with SMTP id ch24-20020a056a201b1800b000da368e7c73mr14576050pzb.37.1680061170356; Tue, 28 Mar 2023 20:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680061170; cv=none; d=google.com; s=arc-20160816; b=NAvpB0phweZk5p6otVFdHa47e8/SUYoe+m1upacGbzoLQpAArtvQpNlO55ZLYzDj39 xFlIncAiBfyOwr2czUfD0vLwYW13tCW5dtsExGnmDPjqNaiJHydqtGywS7APFuJuU/GE Ztaa6PC4NnEwT0pkZnfKogDcgtgGihikBsSJyyjpWGgqTKNqP52sGQi155nyPONiVixv kh9D4K29XMLhY0tR+4s5g3DrNIBSz/1VJp+o9e1mnZT+ewhLM7O0G2P4iWLG5F1r/dMK faBWZ/gXRuS3gEhCww+UCwaXoUTr+8EoCva4gaWhw0OVYHRY9ZLgia8orzxlDoS+4xsV vUTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=IHPwcEpI/cezbaPeVRRHJUfF/FPret4qFL2LaUDtsJo=; b=sAel0l50VbcXtbJtkNqOGFim/bp+3g/42SYKw0Hk3leC0vQVcHq+x0H4raHa7EOVqX YKRH7kJlLzsct9EWeut1uSBKkUwTo8z7OUXzYh9MMcrIhRU1mcu2K2Z/4r42LryuAQZC wcLZQnIPF0yvtGLO0d52/0m//ODuS6RcVW05vMxQFKcMJxoA2KqmyoyFlQaOS4bZyTPa GExhfIiJaPUc32IOAl4stpTZxwg91qW+VCTrU/H7AwfwcqoNcvq4keee51yS57GsLqMv l9cq/oV848kZYjBQNoqrOBLXS12JEdbQBgNWC6opqqqbp6dZxfWzUR/PejWfQ3JwZmsA LjFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020aa79804000000b0062d7d3c6cadsi5966726pfl.333.2023.03.28.20.39.18; Tue, 28 Mar 2023 20:39:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230054AbjC2C77 (ORCPT + 99 others); Tue, 28 Mar 2023 22:59:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbjC2C76 (ORCPT ); Tue, 28 Mar 2023 22:59:58 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BD201BC1 for ; Tue, 28 Mar 2023 19:59:55 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=wuzongyong@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0VeuzKk5_1680058783; Received: from L-PF27918B-1352.localdomain(mailfrom:wuzongyong@linux.alibaba.com fp:SMTPD_---0VeuzKk5_1680058783) by smtp.aliyun-inc.com; Wed, 29 Mar 2023 10:59:52 +0800 From: Wu Zongyong To: tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Wu Zongyong , thomas.lendacky@amd.com, tony.luck@intel.com, kirill.shutemov@linux.intel.com, wutu.xq2@linux.alibaba.com Subject: [RFC PATCH] x86/insn: support decode MOVSXD instruction for MMIO Date: Wed, 29 Mar 2023 10:59:37 +0800 Message-Id: <1655f5dc49ab77f94e350ecbdc93e8d9b31acf61.1680058548.git.wuzongyong@linux.alibaba.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It seems MOVSXD which opcode is 0x63 is not handled, support to decode it in insn_decode_mmio(). Signed-off-by: Wu Zongyong --- arch/x86/lib/insn-eval.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/lib/insn-eval.c b/arch/x86/lib/insn-eval.c index 558a605929db..db6f93bad219 100644 --- a/arch/x86/lib/insn-eval.c +++ b/arch/x86/lib/insn-eval.c @@ -1607,6 +1607,10 @@ enum insn_mmio_type insn_decode_mmio(struct insn *insn, int *bytes) return INSN_MMIO_DECODE_FAILED; switch (insn->opcode.bytes[0]) { + case 0x63: /* MOVSXD r64, m32 */ + *bytes = 4; + type = INSN_MMIO_READ_SIGN_EXTEND; + break; case 0x88: /* MOV m8,r8 */ *bytes = 1; fallthrough; -- 2.34.3