From nobody Mon Nov 25 05:37:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1717401156; cv=none; d=zohomail.com; s=zohoarc; b=RHNiWJBhszkTsAysuRUhHPum7/AWbAU7vsmAfMtCs5vcvNKtLGgkHl+Lkodtz5cxmNU6ZpRTfOQpJr+6+qNCI5MfGAy+vCeWHp15IkqBf9YhQcYCdjE/6cRQx7eu6f7HpDISVzFn0oeLN7quN+dpdNvEE086vBuuf8oUxfzdECM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717401156; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XYqVEKSuTVhdq4me51QuYeiej2WmIVXBq2Hro0h35O8=; b=l6BaAqWLu8VWyQt4TaJYz1+x/PF74Aknd3CocFOxXG3pQP96TSwiObwGJKOMTVqlEOfZELxKlve3CpjKt5RVe6j/63Jd9r3H5o1qrZKsSjzOuAKSrMtJs6um8MU3AZPWKcoU0KBjgZdtj2/8tb+56S6n9DM7pAtlHDyTOnvvzb4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717401156270643.0749310556772; Mon, 3 Jun 2024 00:52:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE2UI-0002Pt-Ai; Mon, 03 Jun 2024 03:52:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE2UH-0002Pl-C5 for qemu-devel@nongnu.org; Mon, 03 Jun 2024 03:52:13 -0400 Received: from mgamail.intel.com ([192.198.163.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE2UE-0001CG-64 for qemu-devel@nongnu.org; Mon, 03 Jun 2024 03:52:13 -0400 Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 00:52:04 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by orviesa003.jf.intel.com with ESMTP; 03 Jun 2024 00:52:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717401130; x=1748937130; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=w9YIIUf/5C7FHss0rgAraaR4ET4kMcP20VUjyG9Z30U=; b=LZSB4armBPhcNxf5SdXvSfcv8m+vylkcm6e6EBBnGb5dGuSSRNPbMn+/ HXdsfg04D40QJzc5wheVjnYOujwMk9KPry1P2/J2MJdUB/41GiHMs6HX0 wf+AjwuIBqPy1GL/PaCwAZjutUwciaNx2Oniq5I6up0y5TeZWqjirhCb1 AOoEjo6Bcl/Xlyuh2cofQrGMfIAsPcD04sBG0LGeFzsWsjIGDko+0y+c2 2vqJIsWt1s6td4JVBDLiGAM14f+YmTjNe9cZhuBrZjXP8y6DIaR+IzDYU YXzkcHuLpusEtOtFk9G43WpOab88R7CvqRDGPxBP6/mtb0GR5u4SzZniv Q==; X-CSE-ConnectionGUID: fytPHrPXRN2MK3Ec0VnTgg== X-CSE-MsgGUID: 2kTn6NOJSWmnCCO2ku6Luw== X-IronPort-AV: E=McAfee;i="6600,9927,11091"; a="17723555" X-IronPort-AV: E=Sophos;i="6.08,211,1712646000"; d="scan'208";a="17723555" X-CSE-ConnectionGUID: u+r/XwjITzG0FwPIp5jYsA== X-CSE-MsgGUID: BUb3ah6LTF6U3n1p1Og3Qg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,211,1712646000"; d="scan'208";a="41724308" From: Zhao Liu To: Paolo Bonzini , Richard Henderson , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu , Xinyu Li Subject: [PATCH] target/i386/tcg: Fix RDPID feature check Date: Mon, 3 Jun 2024 16:07:23 +0800 Message-Id: <20240603080723.1256662-1-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.198.163.12; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1717401157663100001 Content-Type: text/plain; charset="utf-8" DisasContext.cpuid_ext_features indicates CPUID.01H.ECX. Use DisasContext.cpuid_7_0_ecx_features field to check RDPID feature bit (CPUID_7_0_ECX_RDPID). Fixes: 6750485bf42a ("target/i386: implement RDPID in TCG") Inspired-by: Xinyu Li Signed-off-by: Zhao Liu --- target/i386/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 6dedfe94c04c..0486ab691120 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -3199,7 +3199,7 @@ static void disas_insn_old(DisasContext *s, CPUState = *cpu, int b) goto illegal_op; } if (s->prefix & PREFIX_REPZ) { - if (!(s->cpuid_ext_features & CPUID_7_0_ECX_RDPID)) { + if (!(s->cpuid_7_0_ecx_features & CPUID_7_0_ECX_RDPID)) { goto illegal_op; } gen_helper_rdpid(s->T0, tcg_env); --=20 2.34.1