From nobody Wed May 15 05:06:29 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=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1693381479; cv=none; d=zohomail.com; s=zohoarc; b=HYOUCBYUQXPxTH0bfwI08Hf/pLjkrg1BexN/Y9ip8anq1glDs4N9kxwuYVH2B6CHsQz4xkASnOgXTdXb0WGdlLIwWfd9Zf51N6cvPJVHbfw6r3sk8Hg++leXv8GymOfZ8QNrfd0lnwmsohl8DJodLpOqgyaBQufr9Qpl005Et+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693381479; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=nBTQyAzMdPfj2fKqE4RGYjGJBEb+bCpN2nLZ5UN9a8s=; b=lc+aBJZsvkYVv6Owg2A+/7aSM/kC47ly0wdmx1TAAStFx/m20svoS4XF9uG5mftrIbf/3f7J+Jq0hNqgtFFM/+MtOkgeFvuOJngK2vlcQOtuetCQ1ZYDXtZWAoP02AAMDaeGxL6U1NNEFN0p7DUuHK8zn7VZFWwjMw7NU5uR2TQ= 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 1693381479888657.7861672521019; Wed, 30 Aug 2023 00:44:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbFrf-0007iD-R5; Wed, 30 Aug 2023 03:43:48 -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 1qbFrd-0007i5-En for qemu-devel@nongnu.org; Wed, 30 Aug 2023 03:43:45 -0400 Received: from mgamail.intel.com ([192.55.52.120]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbFra-0003NR-M5 for qemu-devel@nongnu.org; Wed, 30 Aug 2023 03:43:45 -0400 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2023 00:43:36 -0700 Received: from st-server.bj.intel.com ([10.240.193.102]) by fmsmga004.fm.intel.com with ESMTP; 30 Aug 2023 00:43:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693381422; x=1724917422; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FRaUx7ks4KWShp+iZDmtc1kxKAj9MJEgz0diyhGQ83k=; b=dfguh9O2qbHizYVI7dLQ6XHi+A9AnHZsAztOLDjauOgU80p5rtQ1NQ+V GZhRjq51BpIjHALMyLjgK/rGm8Ad5m2DLGD9hhwSl8y0Xn1PyeZFgZ5pf 4tDQFFLRUVsbXCgqGSIzz+LYb5Q6wc0VKzgFQNmYisb+8nBC2D9HJ2UCf DwnV1by5vIXCVuPC/ufCK5YmrwGubfqENM/uLFF2VNiDxLd0Jw7d/KPz7 /3Vmw+HLd4kijY/kv+/hnLGgRSK7L2DX4MJGJ5uyrVohLSi7hoegFA1+2 vlw+1VtSQkwS+q8qQE2WgHsNPVn0AtaoimXBuaes/uW/FLU2ZUKAl7GuQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10817"; a="374480057" X-IronPort-AV: E=Sophos;i="6.02,212,1688454000"; d="scan'208";a="374480057" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10817"; a="809027339" X-IronPort-AV: E=Sophos;i="6.02,212,1688454000"; d="scan'208";a="809027339" From: Tao Su To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, xiaoyao.li@intel.com, tao1.su@linux.intel.com Subject: [PATCH] target/i386: Add support for AMX-COMPLEX in CPUID enumeration Date: Wed, 30 Aug 2023 15:43:24 +0800 Message-Id: <20230830074324.84059-1-tao1.su@linux.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: none client-ip=192.55.52.120; envelope-from=tao1.su@linux.intel.com; helo=mgamail.intel.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: 1693381482314100001 Content-Type: text/plain; charset="utf-8" Latest Intel platform GraniteRapids-D introduces AMX-COMPLEX, which adds two instructions to perform matrix multiplication of two tiles containing complex elements and accumulate the results into a packed single precision tile. AMX-COMPLEX is enumerated via CPUID.(EAX=3D7,ECX=3D1):EDX[bit 8]. Add the C= PUID definition for AMX-COMPLEX, AMX-COMPLEX will be enabled automatically when using '-cpu host' and KVM advertises AMX-COMPLEX to userspace. Signed-off-by: Tao Su Reviewed-by: Xiaoyao Li --- KVM part of advertising AMX-COMPLEX CPUID bit already has been applied to kvm-x86 misc. [1/1] KVM: x86: Advertise AMX-COMPLEX CPUID to userspace https://github.com/kvm-x86/linux/commit/99b668545356 --- 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 00f913b638..24ee67b42d 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -980,7 +980,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] =3D { .feat_names =3D { NULL, NULL, NULL, NULL, "avx-vnni-int8", "avx-ne-convert", NULL, NULL, - NULL, NULL, NULL, NULL, + "amx-complex", NULL, NULL, NULL, NULL, NULL, "prefetchiti", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index a6000e93bd..fbb05eace5 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -930,6 +930,8 @@ uint64_t x86_cpu_get_supported_feature_word(FeatureWord= w, #define CPUID_7_1_EDX_AVX_VNNI_INT8 (1U << 4) /* AVX NE CONVERT Instructions */ #define CPUID_7_1_EDX_AVX_NE_CONVERT (1U << 5) +/* AMX COMPLEX Instructions */ +#define CPUID_7_1_EDX_AMX_COMPLEX (1U << 8) /* PREFETCHIT0/1 Instructions */ #define CPUID_7_1_EDX_PREFETCHITI (1U << 14) =20 base-commit: 813bac3d8d70d85cb7835f7945eb9eed84c2d8d0 --=20 2.34.1