From patchwork Wed Aug 14 08:53:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13763111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEA69C3DA4A for ; Wed, 14 Aug 2024 08:58:18 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.776972.1187176 (Exim 4.92) (envelope-from ) id 1se9pb-0000RO-BF; Wed, 14 Aug 2024 08:58:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 776972.1187176; Wed, 14 Aug 2024 08:58:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1se9pb-0000RH-8R; Wed, 14 Aug 2024 08:58:11 +0000 Received: by outflank-mailman (input) for mailman id 776972; Wed, 14 Aug 2024 08:58:09 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1se9kt-0003yE-OB for xen-devel@lists.xenproject.org; Wed, 14 Aug 2024 08:53:19 +0000 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [2a00:1450:4864:20::631]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a684e2b0-5a1a-11ef-8776-851b0ebba9a2; Wed, 14 Aug 2024 10:53:18 +0200 (CEST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a7a8553db90so756743566b.2 for ; Wed, 14 Aug 2024 01:53:18 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a80f3f4981dsm149376566b.18.2024.08.14.01.53.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Aug 2024 01:53:16 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a684e2b0-5a1a-11ef-8776-851b0ebba9a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1723625598; x=1724230398; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=D2/zh/bchaIimR3ZyxsWSS2VxTLjlJtCdjnQQPFRqsU=; b=H8sp6iE16iq4oO+XVI9PfmMfNjOTT5eluwBGWOsHUtS09QxEWQhuTPFWqp9+kkkop+ whTTInR+T6T6C6r2QliK7KqQHy34eopKF2gLt8dCVLfaeBvO49JRwqQvonn0fIR8Po3r woOHYCQZqcWUYHrkNxkrfF5+UqjHH8LNvX9U8O0zkvUTGBiPwVLdIIMYkERAA4XJeerX +6L6D4GiGtb46ezUvQXLK4eGmVtN7h4PWCNW9CT5xVasNgwn4AMoX8FeRwVi0OHitWlZ xSBbShN/IFVonFbo4L5v6v5EpK47PVmddymCUHxGTQYRXjzxbNEfSWko6xSZwbKIUujP UVcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723625598; x=1724230398; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D2/zh/bchaIimR3ZyxsWSS2VxTLjlJtCdjnQQPFRqsU=; b=RHjYUcVFwmixC9smjJR/5HB4jqzWCSGTY6BgYg+7n3Ked7fa2Zy49b5jnQeXyd05LT q5M5SnDuPqRroAzGPencay22hPH4FoRhfbEYbQGh+0VzUXE0njVDcCDC5AopipzVqNvc kgovv28E53JsK9i4t/hFhiQBkU6+HJ2BJ41XWaPW+TNjfH2KP12ZVjsGAORVCEkngp0S x0V5KybXS4G2QYe9F7+I7wuJInPaZZmcsmZg87xh0lc/b3zvWJhzSptOTaw+UZPBEhh/ wI0/Jzs0KOe8LvLg/fIk/6R29fKLtJulVsRgmJLZTgvNLblMVdMDrkp3mp2r8XXMohza xkMQ== X-Gm-Message-State: AOJu0YxzTwpkU7cbld4Wj3Vm/t7WCZyM7y3TVOnRjyYYQ5u6YM47Jhnt 2RLr6b32tnGrmiIF6yRv6l4TlC/gC5jWVE+N5deWrMITz6Bi2GzzrR2NLlar6is5pfwWTC9pvKY = X-Google-Smtp-Source: AGHT+IFgKj7V+kkgDhundAx9tQO+8VFSUIZ1P2ZCmJTPRhypVFYeDCV/UpjyI6VC3XW0M+lR87vQgg== X-Received: by 2002:a17:907:e20f:b0:a7a:9144:e256 with SMTP id a640c23a62f3a-a8366c388bamr133984966b.6.1723625597464; Wed, 14 Aug 2024 01:53:17 -0700 (PDT) Message-ID: <4480c5c4-9b97-4fee-b086-22fc1006b7ac@suse.com> Date: Wed, 14 Aug 2024 10:53:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 6/9] x86emul/test: drop cpu_has_avx512vl From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= References: Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptr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reg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: AVX512VL not being a standalone feature anyway, but always needing to be combined with some other AVX512*, replace uses of cpu_has_avx512vl by just the feature bit check. Signed-off-by: Jan Beulich --- v2: Re-base over dropping of Xeon Phi support. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -1000,7 +1000,8 @@ static void test_group(const struct test { for ( j = 0; j < nr_vl; ++j ) { - if ( vl[0] == VL_512 && vl[j] != VL_512 && !cpu_has_avx512vl ) + if ( vl[0] == VL_512 && vl[j] != VL_512 && + !cpu_policy.feat.avx512vl ) continue; switch ( tests[i].esz ) --- a/tools/tests/x86_emulator/test_x86_emulator.c +++ b/tools/tests/x86_emulator/test_x86_emulator.c @@ -131,7 +131,7 @@ static bool simd_check_avx512f(void) static bool simd_check_avx512f_vl(void) { - return cpu_has_avx512f && cpu_has_avx512vl; + return cpu_has_avx512f && cpu_policy.feat.avx512vl; } #define simd_check_avx512vl_sg simd_check_avx512f_vl @@ -143,7 +143,7 @@ static bool simd_check_avx512dq(void) static bool simd_check_avx512dq_vl(void) { - return cpu_has_avx512dq && cpu_has_avx512vl; + return cpu_has_avx512dq && cpu_policy.feat.avx512vl; } static bool simd_check_avx512bw(void) @@ -154,7 +154,7 @@ static bool simd_check_avx512bw(void) static bool simd_check_avx512bw_vl(void) { - return cpu_has_avx512bw && cpu_has_avx512vl; + return cpu_has_avx512bw && cpu_policy.feat.avx512vl; } static bool simd_check_avx512vbmi(void) @@ -164,7 +164,7 @@ static bool simd_check_avx512vbmi(void) static bool simd_check_avx512vbmi_vl(void) { - return cpu_has_avx512_vbmi && cpu_has_avx512vl; + return cpu_has_avx512_vbmi && cpu_policy.feat.avx512vl; } static bool simd_check_avx512vbmi2(void) @@ -260,7 +260,7 @@ static bool simd_check_avx512fp16(void) static bool simd_check_avx512fp16_vl(void) { - return cpu_has_avx512_fp16 && cpu_has_avx512vl; + return cpu_has_avx512_fp16 && cpu_policy.feat.avx512vl; } static void simd_set_regs(struct cpu_user_regs *regs) --- a/tools/tests/x86_emulator/x86-emulate.h +++ b/tools/tests/x86_emulator/x86-emulate.h @@ -159,7 +159,6 @@ void wrpkru(unsigned int val); #define cpu_has_avx512cd (cpu_policy.feat.avx512cd && xcr0_mask(0xe6)) #define cpu_has_sha cpu_policy.feat.sha #define cpu_has_avx512bw (cpu_policy.feat.avx512bw && xcr0_mask(0xe6)) -#define cpu_has_avx512vl (cpu_policy.feat.avx512vl && xcr0_mask(0xe6)) #define cpu_has_avx512_vbmi (cpu_policy.feat.avx512_vbmi && xcr0_mask(0xe6)) #define cpu_has_avx512_vbmi2 (cpu_policy.feat.avx512_vbmi2 && xcr0_mask(0xe6)) #define cpu_has_gfni cpu_policy.feat.gfni