From nobody Thu Nov 20 14:03:20 2025 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=1763621400; cv=none; d=zohomail.com; s=zohoarc; b=PuMBu5l+3usu3RDIcZZalM6EI5vY4J4pbnNwhmWSCHm+W9dxNQq8d/oDa0H5cP3PKdcGJ/7jMJAcbQy7tSHquaGzCZoHQOkBWVjbc8ydZTUkE0ynkOZnQmxoax/7lxk0gXQL+Fm9l9mv/5s17k1PWTnHKg8WpAk8Haf4r7Su+5E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763621400; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8Ar6GuirnVOYXPMTFqnp0bJENSp3MjwtBtWuMttp1RE=; b=HiXdPnk61fFRu7IUVQp1QZdLx5eMM/5pmHGWsPdeTq2mB03z0zg+hHCck5r2ODG/kyfxzr0g6H+UmHet9ztSZNjapvtxhDQmq/aHDBFF8UxNV8Y+SnWnwF2EaOFonAEP2AMr9MBQY3lPIGtI/0SyUzPpK4ZVXKZis4BCD10k+XQ= 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 1763621400469957.1631328125403; Wed, 19 Nov 2025 22:50:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vLyTA-0005Cl-E3; Thu, 20 Nov 2025 01:48:40 -0500 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 1vLyT0-00055I-5o for qemu-devel@nongnu.org; Thu, 20 Nov 2025 01:48:32 -0500 Received: from mgamail.intel.com ([192.198.163.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vLySu-0005r2-RU for qemu-devel@nongnu.org; Thu, 20 Nov 2025 01:48:29 -0500 Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2025 22:48:19 -0800 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by orviesa007.jf.intel.com with ESMTP; 19 Nov 2025 22:48:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1763621305; x=1795157305; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=487ITGVr9i8c/gw4YoNyHsP0ApJoxPWCX3AhdoyG/F8=; b=e7MvUt0xXTfVW7iIoYUVh4qLOq+cNOgcKJyuOIOcqQQIoHVn5pBXVx1D gd8C7qiKM0Z2BAKC2Tx/MnpC/s+wyMlAjv6UMjgdALC8gYkxnNlLjLhvY bGtTNXrRElOnT2FChGRyW20rxu10QnGQcUynQzefg75iO6dUvkjPXnbvY CQsefVp2p/H4cfv/Qpij6ue+fZXF1G1lApfRfLCOvOsSAwWk3X6cipLZg cIrccufYWuQgblfc1KBWPQ1tGnBxhQZNZzZh/5Hk0IHdhWeourFutMFi0 DZbPBSbOJ25t/0j2ZcHDDPRRsn24CbzNUkswrnBi8GyqK7iZ7UkWCS8ks Q==; X-CSE-ConnectionGUID: K2BcrqNXR/2NJfSS19ljHQ== X-CSE-MsgGUID: pH1JjFnpR9OhxzhbISUqzA== X-IronPort-AV: E=McAfee;i="6800,10657,11618"; a="65572528" X-IronPort-AV: E=Sophos;i="6.19,317,1754982000"; d="scan'208";a="65572528" X-CSE-ConnectionGUID: Q3YeRrSiSoiXgvEYsKThsg== X-CSE-MsgGUID: ZxhSNNFES9iWYFmf+CplDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,317,1754982000"; d="scan'208";a="191296105" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Cc: qemu-devel@nongnu.org, Xudong Hao , Zhao Liu Subject: [PATCH 01/10] i386/cpu: Add support for MOVRS in CPUID enumeration Date: Thu, 20 Nov 2025 15:10:21 +0800 Message-Id: <20251120071030.961230-2-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251120071030.961230-1-zhao1.liu@intel.com> References: <20251120071030.961230-1-zhao1.liu@intel.com> 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.17; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1763621401441018900 Content-Type: text/plain; charset="utf-8" MOVRS is a new set of instructions introduced in the Intel platform Diamond Rapids, to load instructions that carry a read-shared hint. Functionally, MOVRS family is equivalent to existing load instructions, but its read-shared hint indicates the source memory location is likely to become read-shared by multiple processors, i.e., read in the future by at least one other processor before it is written (assuming it is ever written in the future). It could optimize the behavior of the caches, especially shared caches, for this data for future reads by multiple processors. Additionally, MOVRS family also includes a software prefetch instruction, PREFETCHRST2, that carries the same read-shared hint. [*] MOVRS family is enumerated by CPUID single-bit (0x7.0x1.EAX[bit 31]). Add its enumeration support. [*]: Intel Architecture Instruction Set Extensions and Future Features (rev.059). Tested-by: Xudong Hao Signed-off-by: Zhao Liu --- Reference link: https://cdrdv2.intel.com/v1/dl/getContent/865891 --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0c954202cea8..1aae9cba13af 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1266,7 +1266,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] =3D { NULL, "fred", "lkgs", "wrmsrns", NULL, "amx-fp16", NULL, "avx-ifma", NULL, NULL, "lam", NULL, - NULL, NULL, NULL, NULL, + NULL, NULL, NULL, "movrs", }, .cpuid =3D { .eax =3D 7, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index d15a89f8c72e..7b50c0c04f6e 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1030,6 +1030,8 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *c= pu, FeatureWord w); #define CPUID_7_1_EAX_AVX_IFMA (1U << 23) /* Linear Address Masking */ #define CPUID_7_1_EAX_LAM (1U << 26) +/* MOVRS Instructions */ +#define CPUID_7_1_EAX_MOVRS (1U << 31) =20 /* The immediate form of MSR access instructions */ #define CPUID_7_1_ECX_MSR_IMM (1U << 5) --=20 2.34.1