From nobody Sat Nov 23 20:10:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1730215264; cv=none; d=zohomail.com; s=zohoarc; b=BTTI7l6+ZLhtmA5ZTRzy+bwNVSAwfEOi1oXbwO3SGdt86vdFqmWOPzLfHx6XrT4ru48VOP3jtWR4cqt2wS5NLGG5I+WdPAYEhD3MoxcWhs5rB7QWvskGLoXVfWo2e2k2jkxeWp1UGzh2bs3VWnXeOWf4xgYZekbLaFgweaGFRyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730215264; 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=Iqwu/d/vVs0Cnefe08Zu3g6DyPdDcSfsVDU4s2l0BtY=; b=Erm5+B+CNtyjZw69/Po1RjUyRvuCgK2tGHO5XoxfWXV6iPFR6xIhuYjRmZVmjI1wjJ2+kEgYklzaKFy3xVmQkFS1UM7qx21LTTsic6DppNt13I97ZBw5aKXtMACzQu47ulk6jmcoPm6H9aH4uZ6D7S+GRuLqjN8mKfU21VA0rlg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1730215264558865.8676205433756; Tue, 29 Oct 2024 08:21:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5o0i-0007ct-W5; Tue, 29 Oct 2024 11:19:57 -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 1t5o08-0005l8-6t for qemu-devel@nongnu.org; Tue, 29 Oct 2024 11:19:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5o05-0000Ql-Gq for qemu-devel@nongnu.org; Tue, 29 Oct 2024 11:19:19 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-55-p1Nrhv3PNeykDaP9DZ3K6w-1; Tue, 29 Oct 2024 11:19:14 -0400 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d52ca258eso2984244f8f.3 for ; Tue, 29 Oct 2024 08:19:14 -0700 (PDT) Received: from [192.168.10.3] ([151.49.226.83]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b4ad08sm12792202f8f.64.2024.10.29.08.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 08:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730215156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Iqwu/d/vVs0Cnefe08Zu3g6DyPdDcSfsVDU4s2l0BtY=; b=eWLC2UPagQIpftiHtIxK5shMco5nIWpqPxBGNrgPqQlmwgWhJRU2fmRv6F71GPXf5R25Zt HWMJe3d7RyBdlQbt4wPxm/+ILbAS3m4xwxRmqNNvyOLLVtLH2gdovHiCKOqfTOvUkuOy3M 5sz9dVADVYZb3QDmR8p8HmUU/ILCZ7I= X-MC-Unique: p1Nrhv3PNeykDaP9DZ3K6w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730215153; x=1730819953; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Iqwu/d/vVs0Cnefe08Zu3g6DyPdDcSfsVDU4s2l0BtY=; b=vxZy3wo1xa5lCMyt3Vvr/Ig2aFPZVK3ePdLBUtRV6pDRxf+Xxn7d38YxCIAE5oL+Lp 10bOHt526xIHh0lVPg6GpvtKqhpQQ3fyd+sWpj/UYTert4lcS9nFqhkkFj7rgvPmFeKw DLDO8UHP86BlvOj9O//nJLUcR8EXbbeAaQZP/3vBIvSgteBHgXr1j1akDiVTFfyac7Z6 Y7hKhdJ3j7PlJGvmo7TCmNN/c9PGDxbJwl2KkYwzfH43wS4HhoKS1jXTQipR6x8nQTeM uGEKkUzjiM0o0917V1eBFYRomTZVrB2fCAxah8ZpKflAJEYAG6wo0ODik8HY8OL3tKz/ txvA== X-Gm-Message-State: AOJu0Yz0u6RBOvvduZmldRcUu1U7Y0xCOrFIa4PKbql5s2X7daWz0Tkc QMzT5sKyidv/ocv9HsMmcJo6/fUoocFutm/aNZGo8T1as3Pq/1OnXj2D24Ob5A1sKoxSbA0I/G5 SUGwqjgbqHdyADVPIMWQY/K0PabJelaAPP/HrK27jfSZW5uvd3xYLmiTkeAecCZXB3NaNNpSKTc rt7V2BrNIihB9JN8w1EdLoydjpGno+H7S3LrCn0Pw= X-Received: by 2002:a05:6000:ac1:b0:37d:3280:203a with SMTP id ffacd0b85a97d-381b7057644mr33351f8f.10.1730215152842; Tue, 29 Oct 2024 08:19:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGyRkkN3T57Xw3R83w57A719dOnWaF70XOz5sMw1ShQMcHHQ/15AinK0icAmoal8xCmkPUdJA== X-Received: by 2002:a05:6000:ac1:b0:37d:3280:203a with SMTP id ffacd0b85a97d-381b7057644mr33331f8f.10.1730215152425; Tue, 29 Oct 2024 08:19:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: tao1.su@linux.intel.com, zhao1.liu@intel.com, xiaoyao.li@intel.com Subject: [PATCH 5/8] target/i386: add CPUID.24 features for AVX10 Date: Tue, 29 Oct 2024 16:18:55 +0100 Message-ID: <20241029151858.550269-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029151858.550269-1-pbonzini@redhat.com> References: <20241029151858.550269-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.302, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1730215264960116600 Content-Type: text/plain; charset="utf-8" From: Tao Su Introduce features for the supported vector bit lengths. Signed-off-by: Tao Su Link: https://lore.kernel.org/r/20241028024512.156724-3-tao1.su@linux.intel= .com Link: https://lore.kernel.org/r/20241028024512.156724-4-tao1.su@linux.intel= .com Reviewed-by: Zhao Liu --- target/i386/cpu.h | 8 ++++++++ target/i386/cpu.c | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 72e98b25114..f8f97fe9330 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -665,6 +665,7 @@ typedef enum FeatureWord { FEAT_XSAVE_XSS_HI, /* CPUID[EAX=3D0xd,ECX=3D1].EDX */ FEAT_7_1_EDX, /* CPUID[EAX=3D7,ECX=3D1].EDX */ FEAT_7_2_EDX, /* CPUID[EAX=3D7,ECX=3D2].EDX */ + FEAT_24_0_EBX, /* CPUID[EAX=3D0x24,ECX=3D0].EBX */ FEATURE_WORDS, } FeatureWord; =20 @@ -993,6 +994,13 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cp= u, FeatureWord w); /* Packets which contain IP payload have LIP values */ #define CPUID_14_0_ECX_LIP (1U << 31) =20 +/* AVX10 128-bit vector support is present */ +#define CPUID_24_0_EBX_AVX10_128 (1U << 16) +/* AVX10 256-bit vector support is present */ +#define CPUID_24_0_EBX_AVX10_256 (1U << 17) +/* AVX10 512-bit vector support is present */ +#define CPUID_24_0_EBX_AVX10_512 (1U << 18) + /* RAS Features */ #define CPUID_8000_0007_EBX_OVERFLOW_RECOV (1U << 0) #define CPUID_8000_0007_EBX_SUCCOR (1U << 1) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index fdbfcc59da4..3f7fed8e485 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -901,6 +901,7 @@ void x86_cpu_vendor_words2str(char *dst, uint32_t vendo= r1, #define TCG_SGX_12_0_EAX_FEATURES 0 #define TCG_SGX_12_0_EBX_FEATURES 0 #define TCG_SGX_12_1_EAX_FEATURES 0 +#define TCG_24_0_EBX_FEATURES 0 =20 #if defined CONFIG_USER_ONLY #define CPUID_8000_0008_EBX_KERNEL_FEATURES (CPUID_8000_0008_EBX_IBPB | \ @@ -1166,6 +1167,20 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] =3D= { }, .tcg_features =3D TCG_7_2_EDX_FEATURES, }, + [FEAT_24_0_EBX] =3D { + .type =3D CPUID_FEATURE_WORD, + .feat_names =3D { + [16] =3D "avx10-128", + [17] =3D "avx10-256", + [18] =3D "avx10-512", + }, + .cpuid =3D { + .eax =3D 0x24, + .needs_ecx =3D true, .ecx =3D 0, + .reg =3D R_EBX, + }, + .tcg_features =3D TCG_24_0_EBX_FEATURES, + }, [FEAT_8000_0007_EDX] =3D { .type =3D CPUID_FEATURE_WORD, .feat_names =3D { --=20 2.47.0