From nobody Mon Nov 25 01:47:39 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=1718888680; cv=none; d=zohomail.com; s=zohoarc; b=RyIc8TuIB4l3I+yTx5xGXqdkyB7uQ5yv+tl6VpB6iGpA4FWLnN7dqWipG4Un57UNK2ygWAt92drYMJ4ggUeF5rlf5FoiBuJAtQ3A32fB/xN/CC9kmohQHK41f7UdSjf88y9zhBRpAGKjRpg/Rjl/fpzGtlZpOdns5MvZahLo5bs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718888680; h=Content-Type: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=LuxMfRanQpqIe+rAUiRiqqmIxZ2Dd4XmJCnCNtxApfk=; b=dAYVwTh8TaD3jeroA8U5hSOU63ap61MHabnXY31EJMwr7DfgSnYnhpJ5btzeElqiZvKLeOCjASQmdeOS6RnKW5DV5wv3Fy/W2b5k16PXkC8fNCJGiEz0wqivV7qCv3FjkS+C2rKPy16imp0eIKEvU7H/d+BWw2U4r69ZtMEMkLY= 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 1718888680014892.0113611739202; Thu, 20 Jun 2024 06:04:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKHRZ-0001Qv-6E; Thu, 20 Jun 2024 09:03:13 -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 1sKHRX-0001QX-HU for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKHRV-0006Wo-Ot for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:11 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-126-FBHZiCqUPp2fdx3FT8e4yg-1; Thu, 20 Jun 2024 09:03:03 -0400 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-57cdc3f0410so458793a12.2 for ; Thu, 20 Jun 2024 06:03:03 -0700 (PDT) Received: from avogadro.local ([151.62.196.71]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d21df986esm860455a12.72.2024.06.20.06.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 06:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718888588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LuxMfRanQpqIe+rAUiRiqqmIxZ2Dd4XmJCnCNtxApfk=; b=MhXLm+7FghTej6orLIU9LVeDVkqiL/YNeBda0c/mIlrUPBxxnKhtJyTBA5fSoFMu0+VP+0 sctyiZaiMZ3P3p9wTjQ8ZbxdjnzhjToWGHeuxxwalW553jQ/X/TV603lyY7J7PULCrQ35D bBZZ9FG+EHWt5aPmDRx3AOlHwLLGoKQ= X-MC-Unique: FBHZiCqUPp2fdx3FT8e4yg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718888581; x=1719493381; 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=LuxMfRanQpqIe+rAUiRiqqmIxZ2Dd4XmJCnCNtxApfk=; b=LSj/bR9I7E3MTPRi2vLF7ihxBCGJ1O5NtQreIdtTzPpCFw/APwvigiL8LVRM+GbzDi 9ZVBscPA06d/5TzdcFEi5xndhG42PKQmeDY12XraGZmkv6Sk3XJRPqBh36V4BeR2RFpB hnvLqhCVZjaVx9WDPjyBOnXzmbUp5/5ZOA+AtGxf6jc3n2DnhC3WPinElFrBaH26ztiM N3eR3AR1W8KWq4J0ReuulS35o1Kj9b67iXVEp206mSXJDLMd1s0qfiZn7aZTROLrmWJW FXdC6ZUiaQ23jMAu2/S50Zsn+q4cEq+eY1xxZWURYl1Ifth3+jvRwUH3ROL6nhuAN5Xe 8W0A== X-Gm-Message-State: AOJu0Yyo85HJI0tIGcUUmi5mhwivTcLH1GtlRD8J/nHD4iGtGyxhzdf9 6RbbRUhK9ji3X6LVq7CMPGMC5nnskmpJEDyGPwlFNYO9Axn4S0XjyeEwm0V4H2G1IgF5fAyMG5D hLvywkQ922Fk8dq9YoIgvMYTdBNiIg1Mh0XMCZ1xqLJAtEsp4LbogU13Np3KiPQ1h4G1k+0ABXN uYd7DzqrzvUio8xiGPlBTQ17Om5fu+XfXuIKNm X-Received: by 2002:a50:d707:0:b0:57c:5fca:ab25 with SMTP id 4fb4d7f45d1cf-57d07e84bf2mr3389304a12.25.1718888581680; Thu, 20 Jun 2024 06:03:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHr6TmoysP21cnHNMxklPhbR8DW1eELX2UPuk1Q/bseUyUSNPxkRMEAAsVIYq+a7NaLoUE5Mg== X-Received: by 2002:a50:d707:0:b0:57c:5fca:ab25 with SMTP id 4fb4d7f45d1cf-57d07e84bf2mr3389285a12.25.1718888581227; Thu, 20 Jun 2024 06:03:01 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , amonakov@ispras.ru Subject: [PATCH 1/6] Revert "host/i386: assume presence of POPCNT" Date: Thu, 20 Jun 2024 15:02:49 +0200 Message-ID: <20240620130254.415699-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240620130254.415699-1-pbonzini@redhat.com> References: <20240620130254.415699-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.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.152, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1718888682194100011 Content-Type: text/plain; charset="utf-8" This reverts commit 45ccdbcb24baf99667997fac5cf60318e5e7db51. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro. Signed-off-by: Paolo Bonzini --- host/include/i386/host/cpuinfo.h | 1 + tcg/i386/tcg-target.h | 5 +++-- util/cpuinfo-i386.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/host/include/i386/host/cpuinfo.h b/host/include/i386/host/cpui= nfo.h index c1e94d75ce1..72f6fad61e5 100644 --- a/host/include/i386/host/cpuinfo.h +++ b/host/include/i386/host/cpuinfo.h @@ -11,6 +11,7 @@ #define CPUINFO_ALWAYS (1u << 0) /* so cpuinfo is nonzero */ #define CPUINFO_MOVBE (1u << 2) #define CPUINFO_LZCNT (1u << 3) +#define CPUINFO_POPCNT (1u << 4) #define CPUINFO_BMI1 (1u << 5) #define CPUINFO_BMI2 (1u << 6) #define CPUINFO_AVX1 (1u << 9) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index ecc69827287..2f67a97e059 100644 --- a/tcg/i386/tcg-target.h +++ b/tcg/i386/tcg-target.h @@ -111,6 +111,7 @@ typedef enum { #endif =20 #define have_bmi1 (cpuinfo & CPUINFO_BMI1) +#define have_popcnt (cpuinfo & CPUINFO_POPCNT) #define have_avx1 (cpuinfo & CPUINFO_AVX1) #define have_avx2 (cpuinfo & CPUINFO_AVX2) #define have_movbe (cpuinfo & CPUINFO_MOVBE) @@ -142,7 +143,7 @@ typedef enum { #define TCG_TARGET_HAS_nor_i32 0 #define TCG_TARGET_HAS_clz_i32 1 #define TCG_TARGET_HAS_ctz_i32 1 -#define TCG_TARGET_HAS_ctpop_i32 1 +#define TCG_TARGET_HAS_ctpop_i32 have_popcnt #define TCG_TARGET_HAS_deposit_i32 1 #define TCG_TARGET_HAS_extract_i32 1 #define TCG_TARGET_HAS_sextract_i32 1 @@ -177,7 +178,7 @@ typedef enum { #define TCG_TARGET_HAS_nor_i64 0 #define TCG_TARGET_HAS_clz_i64 1 #define TCG_TARGET_HAS_ctz_i64 1 -#define TCG_TARGET_HAS_ctpop_i64 1 +#define TCG_TARGET_HAS_ctpop_i64 have_popcnt #define TCG_TARGET_HAS_deposit_i64 1 #define TCG_TARGET_HAS_extract_i64 1 #define TCG_TARGET_HAS_sextract_i64 0 diff --git a/util/cpuinfo-i386.c b/util/cpuinfo-i386.c index 8f2694d88f2..6d474a6259a 100644 --- a/util/cpuinfo-i386.c +++ b/util/cpuinfo-i386.c @@ -35,6 +35,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) __cpuid(1, a, b, c, d); =20 info |=3D (c & bit_MOVBE ? CPUINFO_MOVBE : 0); + info |=3D (c & bit_POPCNT ? CPUINFO_POPCNT : 0); info |=3D (c & bit_PCLMUL ? CPUINFO_PCLMUL : 0); =20 /* NOTE: our AES support requires SSSE3 (PSHUFB) as well. */ --=20 2.45.2 From nobody Mon Nov 25 01:47:39 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=1718888643; cv=none; d=zohomail.com; s=zohoarc; b=g+GQMSy/TYx+SOS3+oEuq5lJ9QUYI8MaH181WoTDcPQ0X5BdrokONpWAe0pcj4g4366USuKG1aHK1UfL0D5uydMamaBW1H5K/taIMQPulrL56Kud29qm4OkyzDLoxbsZ2GaD9wuRou3d0setoxpftBFHnNLGzlQNJya9JuuC0Z4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718888643; h=Content-Type: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=i1Dd/q0yvFV1Rcm+rk+YwoeGVJGUNMen0d4jeqopdXw=; b=gdixVOX27CAXkart34MMC+Qy0QMqmbLnO6x0PHmwvKhO95PkpMSA/v2WBUwf+3If73m298PcwBdJxvUFNVkQLdpHUD2g1xBOi0WsmsVrslrNXTH8YkdvtF8m/7j331HPemxeGt1QvKFUWAyL7Uj99k4Z9vu9eUDYRRrPNFNLQu8= 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 1718888643791620.4839210624564; Thu, 20 Jun 2024 06:04:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKHRY-0001Qt-5h; Thu, 20 Jun 2024 09:03:12 -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 1sKHRV-0001QF-Q3 for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:09 -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 1sKHRU-0006Wk-1S for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:09 -0400 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-79-rRws4LMSNFqBVquPjpmL8Q-1; Thu, 20 Jun 2024 09:03:05 -0400 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a6efbb08949so36771166b.0 for ; Thu, 20 Jun 2024 06:03:05 -0700 (PDT) Received: from avogadro.local ([151.62.196.71]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56fa415dsm772240266b.220.2024.06.20.06.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 06:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718888587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i1Dd/q0yvFV1Rcm+rk+YwoeGVJGUNMen0d4jeqopdXw=; b=QkhEdI6rCHFBYbj8ZcBmgbNzhY+BH2FpZAReDH/nR/8JS45KWXky8cBO65XvCJnO1eXq+O HPql0YLO8Ui16TLSH+eLqkRdSbdztrQ8+VGwnPJgUH2MOCwsm9m/ruC4k7YbwOVmp6htug tf3sMKaS47XinbNw3REY8yHAZGIErAI= X-MC-Unique: rRws4LMSNFqBVquPjpmL8Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718888584; x=1719493384; 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=i1Dd/q0yvFV1Rcm+rk+YwoeGVJGUNMen0d4jeqopdXw=; b=s3wn/Tn+yq4ok/sKwqjoJPtZupUxzmxJFqKDBFGvnPNZEKNJHBRBCeVgfs7S+2z0fO 390Pu6t4dY1Wa6hBgbNHescyCDc92hUkxFkGl80UiTBMu/qZw+dkrGotcKgd/voxVpkD XHxxM3QXnnsdM4XbmSBV5IxGPgeRCA9Ly42JjOjH8odD6RPiDiFCwSqE86NEEcpYEjQA kuz0Y+aiv4m8OGYYpzLirMBUunDOm63quAQoOXpV6buQqvmaERX+i/+peENhoDjfZlxo IgX2Wu8wE2ejX4mS64A8/9WiLZ29KHni7TgZKKjiM9HKZWVgixbM+oh3HvMy/J7r6ydj nfWw== X-Gm-Message-State: AOJu0YyWL1H4lDEZACXtrtcL7lW7JaXKu2AyDrUbOK8Sf6ielH7YiBsl J1+BHaIA2HnccXjNi2CiiDF5lI5xH1Bs4GLsKPG4cJ1NLPhVdGF0ZzsfMYh6qaepD+xT6eYR6AL yqeGQAqcFLD85BsIzMms3CjV+ZUSHt5ReWOPF7vlmyMOP64CYh/b0Ns3q/X5XPIGRoQ60pEVMEf mVY1sJnC8JOQ+fKrv1JvzeYpaDQmVawsoPfGJ0 X-Received: by 2002:a17:907:d30c:b0:a6f:b1fa:aa24 with SMTP id a640c23a62f3a-a6fb1faaa8dmr371966366b.5.1718888584329; Thu, 20 Jun 2024 06:03:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHRVK/lLtA1fciNUQY7dGRTNR3lwYErop8nKJa0PTh/upPFcXV3U1WntbRveVeG1j0iC0pOA== X-Received: by 2002:a17:907:d30c:b0:a6f:b1fa:aa24 with SMTP id a640c23a62f3a-a6fb1faaa8dmr371963766b.5.1718888583928; Thu, 20 Jun 2024 06:03:03 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , amonakov@ispras.ru Subject: [PATCH 2/6] Revert "host/i386: assume presence of SSSE3" Date: Thu, 20 Jun 2024 15:02:50 +0200 Message-ID: <20240620130254.415699-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240620130254.415699-1-pbonzini@redhat.com> References: <20240620130254.415699-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: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.152, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1718888646818100006 Content-Type: text/plain; charset="utf-8" This reverts commit 433cd6d94a8256af70a5200f236dc8047c3c1468. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro. Signed-off-by: Paolo Bonzini --- util/cpuinfo-i386.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/cpuinfo-i386.c b/util/cpuinfo-i386.c index 6d474a6259a..ca74ef04f54 100644 --- a/util/cpuinfo-i386.c +++ b/util/cpuinfo-i386.c @@ -38,8 +38,8 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info |=3D (c & bit_POPCNT ? CPUINFO_POPCNT : 0); info |=3D (c & bit_PCLMUL ? CPUINFO_PCLMUL : 0); =20 - /* NOTE: our AES support requires SSSE3 (PSHUFB) as well. */ - info |=3D (c & bit_AES) ? CPUINFO_AES : 0; + /* Our AES support requires PSHUFB as well. */ + info |=3D ((c & bit_AES) && (c & bit_SSSE3) ? CPUINFO_AES : 0); =20 /* For AVX features, we must check available and usable. */ if ((c & bit_AVX) && (c & bit_OSXSAVE)) { --=20 2.45.2 From nobody Mon Nov 25 01:47:39 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=1718888679; cv=none; d=zohomail.com; s=zohoarc; b=HmHwIQFtOd54ah/jgSyPPrFc9p3/SRW+BcQVkdzNlSJASuw07V184VnVVYUVUWzQ/0O2LYLp0YuokgcLgZdB4lKa9Z33Z+u1ONC+pmfrHq24oOzgGsD4hZ0ltTHYm0n8MPSNITHjYFYjLfLjyndq8H1/yfv6ZCK2EZYtlrajAlI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718888679; h=Content-Type: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=GlW/705FWiMprOSUKjNiwJlL+EDmg1xNJ9taeoREqJs=; b=LjCrx3iv4jeYev0Ovlq5C4M6POcDUTxm/8gIagyddQB7VaMfEFLF4oVOpCO7uh9dN7Vh6UDoH98S2i4TIbHGs620DjzGz8/hDASydYlUxC03eBg1f44CnK0G+7AGhXsPJFpeKK/tauNqqbGmkcBmt5+GmfJKhk/ojUoBMCIl4OY= 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 1718888679877959.7397174847256; Thu, 20 Jun 2024 06:04:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKHRa-0001SC-Im; Thu, 20 Jun 2024 09:03: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 1sKHRY-0001Qw-Rj for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:13 -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 1sKHRX-0006X0-3F for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:12 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-265-oVZwD-QpPWWS4cUbJ3Jheg-1; Thu, 20 Jun 2024 09:03:09 -0400 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-57cad6e94e5so378407a12.3 for ; Thu, 20 Jun 2024 06:03:08 -0700 (PDT) Received: from avogadro.local ([151.62.196.71]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb743ade6sm9648218a12.95.2024.06.20.06.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 06:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718888590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GlW/705FWiMprOSUKjNiwJlL+EDmg1xNJ9taeoREqJs=; b=MXuYIQWEQuEnk5pGiVj4dSs0n9GIXvWfAaMncDZXx8HdQnLqLhw+4gQqMXdGPQb1gynK/M ITYvIIWvpfxJGRn8wzxWIUuvPFn7kVenMPPK9vrr8L9zc1h3GXZfdq5hGu7sNc6Zh8P9Ij mUkZCJnLd7pP40HxkUaEf9dlt1uHqVM= X-MC-Unique: oVZwD-QpPWWS4cUbJ3Jheg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718888587; x=1719493387; 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=GlW/705FWiMprOSUKjNiwJlL+EDmg1xNJ9taeoREqJs=; b=adKpWgdLFATOnJMaJBI8BODrY1I9tWFGX+Z91BbHPvgmVx0Kv7EH7/OV4EGVuXH1Va 8O1JamVjqmehQMHNJJda+sSNVZIErTR1hacnnQDacAGe/3CiLVYC/u6QNWi6zQ9o2AS3 dICpLu+lSqTTgsqqkATg+rcCA/xl5f3xqHk30lRHGPABfZ3G9RzyQVguh0uhCQhCiZt/ TdWMcVlM24yOUG67Ch/IyIhSQoOGcUoAeZ1JVoz/7KvylCySmnwqW8mcWc2deYicKAxH YLJehDkA6mb+hD8lKmbWVMKXSAHlVzGBeq+xbRhqSdhg+en6G3EWynhCIcQsTiSurX/P thYg== X-Gm-Message-State: AOJu0Yw6+ny+/H6yRwSL9RLwz0PCf6mxM/fYlReqy1FZukyy/bKs2Jsz mHhkZ8cxKY7w5SgUg0Kvf2okB7YCPbv/HXw+SzBStrQQWXWc4uPN50DpyK0VcpezLzi6TIRezY4 65vgiWuIdFloXQUhknIptQmhBiij8DhZNFBhKfvtdb5S/CmqLMkSgxBRoN0JcWbm1uzPvwnQq2g kXPVLnMn51x+e71BJmbMHGawiYITB2CRLC5a2S X-Received: by 2002:a50:d504:0:b0:57c:6861:d72b with SMTP id 4fb4d7f45d1cf-57d272db7a2mr437978a12.9.1718888587115; Thu, 20 Jun 2024 06:03:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFR4aHAZ6xt/O21ytBNlhtOAmUXMvL4bQH78obqORQ5BeT0L4sxIm03+Svx1Ww1wtCwUHFd3w== X-Received: by 2002:a50:d504:0:b0:57c:6861:d72b with SMTP id 4fb4d7f45d1cf-57d272db7a2mr437956a12.9.1718888586636; Thu, 20 Jun 2024 06:03:06 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , amonakov@ispras.ru Subject: [PATCH 3/6] Revert "host/i386: assume presence of SSE2" Date: Thu, 20 Jun 2024 15:02:51 +0200 Message-ID: <20240620130254.415699-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240620130254.415699-1-pbonzini@redhat.com> References: <20240620130254.415699-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: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.152, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1718888680119100002 Content-Type: text/plain; charset="utf-8" This reverts commit b18236897ca15c3db1506d8edb9a191dfe51429c. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro. Signed-off-by: Paolo Bonzini --- host/include/i386/host/cpuinfo.h | 1 + util/bufferiszero.c | 4 ++-- util/cpuinfo-i386.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/host/include/i386/host/cpuinfo.h b/host/include/i386/host/cpui= nfo.h index 72f6fad61e5..81771733eaa 100644 --- a/host/include/i386/host/cpuinfo.h +++ b/host/include/i386/host/cpuinfo.h @@ -14,6 +14,7 @@ #define CPUINFO_POPCNT (1u << 4) #define CPUINFO_BMI1 (1u << 5) #define CPUINFO_BMI2 (1u << 6) +#define CPUINFO_SSE2 (1u << 7) #define CPUINFO_AVX1 (1u << 9) #define CPUINFO_AVX2 (1u << 10) #define CPUINFO_AVX512F (1u << 11) diff --git a/util/bufferiszero.c b/util/bufferiszero.c index 11c080e02cf..74864f7b782 100644 --- a/util/bufferiszero.c +++ b/util/bufferiszero.c @@ -188,14 +188,14 @@ static biz_accel_fn const accel_table[] =3D { =20 static unsigned best_accel(void) { -#ifdef CONFIG_AVX2_OPT unsigned info =3D cpuinfo_init(); =20 +#ifdef CONFIG_AVX2_OPT if (info & CPUINFO_AVX2) { return 2; } #endif - return 1; + return info & CPUINFO_SSE2 ? 1 : 0; } =20 #elif defined(__aarch64__) && defined(__ARM_NEON) diff --git a/util/cpuinfo-i386.c b/util/cpuinfo-i386.c index ca74ef04f54..90f92a42dc8 100644 --- a/util/cpuinfo-i386.c +++ b/util/cpuinfo-i386.c @@ -34,6 +34,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) if (max >=3D 1) { __cpuid(1, a, b, c, d); =20 + info |=3D (d & bit_SSE2 ? CPUINFO_SSE2 : 0); info |=3D (c & bit_MOVBE ? CPUINFO_MOVBE : 0); info |=3D (c & bit_POPCNT ? CPUINFO_POPCNT : 0); info |=3D (c & bit_PCLMUL ? CPUINFO_PCLMUL : 0); --=20 2.45.2 From nobody Mon Nov 25 01:47:39 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=1718888654; cv=none; d=zohomail.com; s=zohoarc; b=XgogrMpT8EoMB9EtAmvylocaFhsx9YqHJ6BBP+dmq75FNUmt8tFgz/zp66R35LUrccRfMbVxKeE9jUZVW6z6PSGTOOfLOmsPkBMIS6lmAIV8JLvkEY0kRzVM4Q/0PkhPUjxsP+/VkcKPVD4XiUniFCAMrFJoUmNGgsW3N8Dwy0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718888654; h=Content-Type: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=Iwf7E6c/3J88Z/SA0VCe8inq5N9r0YamgWdaOJEaKjI=; b=HVgTuVN9WOMnXASKMPfy+yN/Pwphcx1qJ33cF+Qr4J0UkSsFmDSmM4V6GH9ibx9NAN5OtxQlZcudJ++Kgb/lHxyRe2wMm48caYV50AwT6Yfqon4SJ4ZypvzriXkPlVxVbcIwYwPCEJzQ3nl1y+XG0ioLKrdxCU3YYjm7FXTBxlg= 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 1718888654487122.3264067792054; Thu, 20 Jun 2024 06:04:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKHRh-0001dg-4G; Thu, 20 Jun 2024 09:03:21 -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 1sKHRf-0001ZN-FF for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:19 -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 1sKHRd-0006XX-Nw for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:19 -0400 Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-HT4FkgtSOBqficcKj9nQlA-1; Thu, 20 Jun 2024 09:03:14 -0400 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a6f381ea95dso95997866b.0 for ; Thu, 20 Jun 2024 06:03:10 -0700 (PDT) Received: from avogadro.local ([151.62.196.71]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ecdd2asm778117266b.141.2024.06.20.06.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 06:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718888596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Iwf7E6c/3J88Z/SA0VCe8inq5N9r0YamgWdaOJEaKjI=; b=L5t2z541jz3njR7hqht4/0R4goSJspAvJg7z4baSikS5tPT58OQrW82cklj/rAxRpx/MN9 k1Qb7jXM7ZEx1L3SrYGRzRFc4WLcG0ZnZWKPQit2U1YfBcgnsMH/+8ATpPkF3AvLp7BVBV vwHwlVgW80dlBjpC5pHaHCI2ODjmhxU= X-MC-Unique: HT4FkgtSOBqficcKj9nQlA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718888589; x=1719493389; 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=Iwf7E6c/3J88Z/SA0VCe8inq5N9r0YamgWdaOJEaKjI=; b=XCks3BOdljWVWllBsKCwxc8V6E8JiIISLv02whCEcSlxoL+aQ9KHq4jRZlpcR6lqKp DjgeXx0kLRq6C3f7mmY46/894BeeXbLqUU4BCY8FTlfNl9ij5aW7QI58oJum8HvGpDrT +aBrq4giDhV0tyLmTH6TQRqQMrDtq0Yp2tlqSnilPYFNtAfDQAo8jrwaJPZQz6g2YwD8 mJ3ua3hE5LI/NUkuS52DQOgP8hK0z/HEvy9u/MDGrwca7ob1NSicn8E5aFupnLq8sXnK M6GzjLrZOzJ96VyYNbYcjqR5/gFa+5yB3oGs/+py91eai5Z/vS4Hgu0EuM0kZXRfombN jaZQ== X-Gm-Message-State: AOJu0Yx1VhRQtiVWmjor2+0d+XVvdLHmEaDaj0fkpfWixEGMm/4MhWgU Cg+ClMemTRYNREUYlNTe8kfQbp/joGxa93ucSg0IQmYnxJ2KnwcENGL2NKCs2BwXTnFfx0zqjfd 3wnkEQJ3XlVFYcOPJ2aB8az7FmZU/HnP7NSnrMOVgJZSRBTgHGiZXWkkciIwq/lKglmXNRpEObp Baify9TfLtK4ZZjXxAdLAxgJyHK3FooWpDpGOH X-Received: by 2002:a17:907:d406:b0:a6f:b3d3:fed1 with SMTP id a640c23a62f3a-a6fb3d3ff9amr349855966b.10.1718888589526; Thu, 20 Jun 2024 06:03:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiSJLs3cJDkV1a8dXVrEgjyYHTGJQZ9qlBvN3pTMTX7278kHPx4iAieDTnOiF58k34uOGKkA== X-Received: by 2002:a17:907:d406:b0:a6f:b3d3:fed1 with SMTP id a640c23a62f3a-a6fb3d3ff9amr349853266b.10.1718888589199; Thu, 20 Jun 2024 06:03:09 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , amonakov@ispras.ru Subject: [PATCH 4/6] meson: allow configuring the x86-64 baseline Date: Thu, 20 Jun 2024 15:02:52 +0200 Message-ID: <20240620130254.415699-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240620130254.415699-1-pbonzini@redhat.com> References: <20240620130254.415699-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: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.152, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1718888655959100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Acked-by: Richard Henderson --- meson.build | 41 ++++++++++++++++++++++++++++------- meson_options.txt | 3 +++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 97e00d6f59b..6e694ecd9fe 100644 --- a/meson.build +++ b/meson.build @@ -336,15 +336,40 @@ if host_arch =3D=3D 'i386' and not cc.links(''' qemu_common_flags =3D ['-march=3Di486'] + qemu_common_flags endif =20 -# Assume x86-64-v2 (minus CMPXCHG16B for 32-bit code) -if host_arch =3D=3D 'i386' - qemu_common_flags =3D ['-mfpmath=3Dsse'] + qemu_common_flags -endif +# Pick x86-64 baseline version if host_arch in ['i386', 'x86_64'] - qemu_common_flags =3D ['-mpopcnt', '-msse4.2'] + qemu_common_flags -endif -if host_arch =3D=3D 'x86_64' - qemu_common_flags =3D ['-mcx16'] + qemu_common_flags + if get_option('x86_version') =3D=3D '0' and host_arch =3D=3D 'x86_64' + error('x86_64-v1 required for x86-64 hosts') + endif + + # add flags for individual instruction set extensions + if get_option('x86_version') >=3D '1' + if host_arch =3D=3D 'i386' + qemu_common_flags =3D ['-mfpmath=3Dsse'] + qemu_common_flags + else + # present on basically all processors but technically not part of + # x86-64-v1, so only include -mneeded for x86-64 version 2 and above + qemu_common_flags =3D ['-mcx16'] + qemu_common_flags + endif + endif + if get_option('x86_version') >=3D '2' + qemu_common_flags =3D ['-mpopcnt'] + qemu_common_flags + qemu_common_flags =3D cc.get_supported_arguments('-mneeded') + qemu_co= mmon_flags + endif + if get_option('x86_version') >=3D '3' + qemu_common_flags =3D ['-mmovbe', '-mabm', '-mbmi1', '-mbmi2', '-mfma'= , '-mf16c'] + qemu_common_flags + endif + + # add required vector instruction set (each level implies those below) + if get_option('x86_version') =3D=3D '1' + qemu_common_flags =3D ['-msse2'] + qemu_common_flags + elif get_option('x86_version') =3D=3D '2' + qemu_common_flags =3D ['-msse4.2'] + qemu_common_flags + elif get_option('x86_version') =3D=3D '3' + qemu_common_flags =3D ['-mavx2'] + qemu_common_flags + elif get_option('x86_version') =3D=3D '4' + qemu_common_flags =3D ['-mavx512f', '-mavx512bw', '-mavx512cd', '-mavx= 512dq', '-mavx512vl'] + qemu_common_flags + endif endif =20 if get_option('prefer_static') diff --git a/meson_options.txt b/meson_options.txt index 7a79dd89706..6065ed2d352 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -370,3 +370,6 @@ option('qemu_ga_version', type: 'string', value: '', =20 option('hexagon_idef_parser', type : 'boolean', value : true, description: 'use idef-parser to automatically generate TCG code fo= r the Hexagon frontend') + +option('x86_version', type : 'combo', choices : ['0', '1', '2', '3', '4'],= value: '1', + description: 'tweak required x86_64 architecture version beyond com= piler default') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 58d49a447d5..62842d47e88 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -82,6 +82,8 @@ meson_options_help() { printf "%s\n" ' --with-suffix=3DVALUE Suffix for QEMU data/modules= /config directories' printf "%s\n" ' (can be empty) [qemu]' printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' + printf "%s\n" ' --x86-version=3DCHOICE tweak required x86_64 archit= ecture version beyond' + printf "%s\n" ' compiler default [1] (choices:= 0/1/2/3)' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if av= ailable' @@ -552,6 +554,7 @@ _meson_option_parse() { --disable-werror) printf "%s" -Dwerror=3Dfalse ;; --enable-whpx) printf "%s" -Dwhpx=3Denabled ;; --disable-whpx) printf "%s" -Dwhpx=3Ddisabled ;; + --x86-version=3D*) quote_sh "-Dx86_version=3D$2" ;; --enable-xen) printf "%s" -Dxen=3Denabled ;; --disable-xen) printf "%s" -Dxen=3Ddisabled ;; --enable-xen-pci-passthrough) printf "%s" -Dxen_pci_passthrough=3Denab= led ;; --=20 2.45.2 From nobody Mon Nov 25 01:47:39 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=1718888645; cv=none; d=zohomail.com; s=zohoarc; b=TeovvxV0ksY6Uz4QauHW6Oj1z9E99l4E6ShCHKMM2AUi8ktUnKnPQ5uDD/okj1jprO1f4JM4k/CVgkry0GyagvSfQe0ckjPzC7OBjL9RFXyXWijtbttWpu8CnEUnpsPsg8OOl3GH9Vvz8+CSjL8S4tv+muCXCkV8MOUNITWYR9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718888645; h=Content-Type: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=ggQxI/ZZR6ZKzmd07qXaus7hQHvI+R15IGE2EWs6qMQ=; b=Xx+lqh+QwXuSUHMAI4FXhsNw5FlSoXo1R8KsKiudtwRDGKlM9YzrBqTtP7z4x6xWZqx8306iTY5vpOCUh8Gy3E/9K2WOo174sPNKQuDA9PXbYauKJQWHHTDuYI0BIQz1w2LpghHzMdD4Gd2Qgnxxn/HZWgO+Tg8SZljAhOpvWow= 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 1718888645593289.98499321654356; Thu, 20 Jun 2024 06:04:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKHRi-0001ha-T4; Thu, 20 Jun 2024 09:03:22 -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 1sKHRg-0001be-CO for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKHRe-0006Xd-Pm for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:20 -0400 Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-630-KHoSSO_EPxqDvmxsLgTwcA-1; Thu, 20 Jun 2024 09:03:15 -0400 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-52bc1e919deso638387e87.0 for ; Thu, 20 Jun 2024 06:03:14 -0700 (PDT) Received: from avogadro.local ([151.62.196.71]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56da3f50sm777493166b.14.2024.06.20.06.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 06:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718888597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ggQxI/ZZR6ZKzmd07qXaus7hQHvI+R15IGE2EWs6qMQ=; b=BvySuifaaRRcTusFyJwhtwEo5W7DZkhu0xZhRNRZbQl32k2rSaPgZal+8+/0UQ7mc1kDQS 8Ui37NmiEF6/MXXor4k4jAMb7VLK58xsdhAmzuFxarp9wdM1snAVPC+4DP6heFsFxS3H5e v8yasXi8wDFQyPCFgRVC7n8U+uZL/I8= X-MC-Unique: KHoSSO_EPxqDvmxsLgTwcA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718888592; x=1719493392; 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=ggQxI/ZZR6ZKzmd07qXaus7hQHvI+R15IGE2EWs6qMQ=; b=V1QCWGbU+Xy8Xij2uG6upmdpLl8ae+IfxRSCqNYlv/Z0A0KWbn1huSAbZMo7A1qpKi K5cEkZrU/Aemq2xfJF8qN+EvI5PsxUFakKJVBZFqqp/whHoCss489UmvtdZPcZXVgiYO XpbAWauPXbGOCPZJ2PVvDVWt86G9YDPkxfecxuLefU9fGkaEM6LgT7D3jEEYJQG+dRy3 xwWuuJRho91LWTnpenA/KdtBEG4nbQ3bUxAFubBbGTGpXL/bYHeCAlrzT0MCWlGXHOQ/ fp8hFsxcOjJyrpGZS9U2IYjrrUAj7GqNPexxotI3MCoxSoHGcuX4+aNuaJTi9T8yYoM1 sTDA== X-Gm-Message-State: AOJu0YwxFKXfEAqRZOT5o6CMsAPU8IYQd/Kt5CPRrqQ/PbR9lvDLiV7P lBtCgmy7wJ4oav59n4njeFoZL7TPJduR9JjoAC2snYqoVE/Q8HmIIhMhL+UqFq1mCFXLF240lD/ ziKmR57z9RtEVk5fw2k4xdw9frvt9q9XkBeQGjo+9/yQOeaFOj91tO2fvqS1K/rP3EweWgAR7E7 VjCiIZS9434NHuWPho9MOZ0IxPj8zbv8UZFqZI X-Received: by 2002:a05:6512:3d04:b0:52b:c262:99b3 with SMTP id 2adb3069b0e04-52ccaa5693emr3925100e87.11.1718888592564; Thu, 20 Jun 2024 06:03:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhv6hS4JyNuePMtR5yTE+SnK7i8YyUretc3E0b4KyrxqA7rxfJPgVzSU6GzYbMyUwE5+zVCg== X-Received: by 2002:a05:6512:3d04:b0:52b:c262:99b3 with SMTP id 2adb3069b0e04-52ccaa5693emr3925070e87.11.1718888592095; Thu, 20 Jun 2024 06:03:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , amonakov@ispras.ru Subject: [PATCH 5/6] meson: remove dead optimization option Date: Thu, 20 Jun 2024 15:02:53 +0200 Message-ID: <20240620130254.415699-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240620130254.415699-1-pbonzini@redhat.com> References: <20240620130254.415699-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.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.152, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1718888646841100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- meson.build | 13 ------------- meson_options.txt | 2 -- 2 files changed, 15 deletions(-) diff --git a/meson.build b/meson.build index 6e694ecd9fe..54e6b09f4fb 100644 --- a/meson.build +++ b/meson.build @@ -2874,18 +2874,6 @@ config_host_data.set('CONFIG_AVX2_OPT', get_option('= avx2') \ int main(int argc, char *argv[]) { return bar(argv[argc - 1]); } '''), error_message: 'AVX2 not available').allowed()) =20 -config_host_data.set('CONFIG_AVX512F_OPT', get_option('avx512f') \ - .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot ena= ble AVX512F') \ - .require(cc.links(''' - #include - #include - static int __attribute__((target("avx512f"))) bar(void *a) { - __m512i x =3D *(__m512i *)a; - return _mm512_test_epi64_mask(x, x); - } - int main(int argc, char *argv[]) { return bar(argv[argc - 1]); } - '''), error_message: 'AVX512F not available').allowed()) - config_host_data.set('CONFIG_AVX512BW_OPT', get_option('avx512bw') \ .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot ena= ble AVX512BW') \ .require(cc.links(''' @@ -4283,7 +4271,6 @@ summary_info +=3D {'mutex debugging': get_option('d= ebug_mutex')} summary_info +=3D {'memory allocator': get_option('malloc')} summary_info +=3D {'avx2 optimization': config_host_data.get('CONFIG_AVX2_= OPT')} summary_info +=3D {'avx512bw optimization': config_host_data.get('CONFIG_A= VX512BW_OPT')} -summary_info +=3D {'avx512f optimization': config_host_data.get('CONFIG_AV= X512F_OPT')} summary_info +=3D {'gcov': get_option('b_coverage')} summary_info +=3D {'thread sanitizer': get_option('tsan')} summary_info +=3D {'CFI support': get_option('cfi')} diff --git a/meson_options.txt b/meson_options.txt index 6065ed2d352..0269fa0f16e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -119,8 +119,6 @@ option('membarrier', type: 'feature', value: 'disabled', =20 option('avx2', type: 'feature', value: 'auto', description: 'AVX2 optimizations') -option('avx512f', type: 'feature', value: 'disabled', - description: 'AVX512F optimizations') option('avx512bw', type: 'feature', value: 'auto', description: 'AVX512BW optimizations') option('keyring', type: 'feature', value: 'auto', --=20 2.45.2 From nobody Mon Nov 25 01:47:39 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=1718888679; cv=none; d=zohomail.com; s=zohoarc; b=TmvhzZs1CnDaKMB6zt6M/15f36oreQ/UtKi1sfKegXwuzVpSSlDiIn2aanp4Oo/tkp2efhS1wDn9s8gIaEZSEVUoSpEE070pfpV7kl+IwOo57m6Y/3pUCRbWheq9+acVvpur88RF7pLI3aHiMrKbZ7X37uJjRFsg4Xb7KAy7w1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718888679; h=Content-Type: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=W6tnGmP8UAqa4G+onMQE8JTTdn8pIGx/VV2/Iv84CZc=; b=IziNAjyPXMAWu5vqzeulqRghC6deOH96XPMQlyxTJqwUO6ysPzUCKA3bmzAN7LDDrr2fyp+ZesZaP8IHfXvlI9cHwHMqFPHFD4tmcU5au/9DDiVNKHYZKMODP2g799AR1bnWyqXxx62zwR5kEE2IWRPJTCp5halUXJxl+NhVez8= 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 1718888679399625.6703900541777; Thu, 20 Jun 2024 06:04:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKHRj-0001jD-GG; Thu, 20 Jun 2024 09:03:23 -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 1sKHRi-0001fc-3D for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03: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 1sKHRg-0006Xt-Lq for qemu-devel@nongnu.org; Thu, 20 Jun 2024 09:03:21 -0400 Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-287-afH1yldQO9WsZEOkO10R0Q-1; Thu, 20 Jun 2024 09:03:17 -0400 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-52ca8a3448eso649078e87.0 for ; Thu, 20 Jun 2024 06:03:17 -0700 (PDT) Received: from avogadro.local ([151.62.196.71]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f939296d8sm248435866b.35.2024.06.20.06.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 06:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718888599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W6tnGmP8UAqa4G+onMQE8JTTdn8pIGx/VV2/Iv84CZc=; b=LYW7HDCMEwWVEVxADfBbITx5yvthyZK1ucg2ndKM9ZwWZhbywQ4sChHFG5g0upw9ExEX+n cIl88fasVtQHb6UHV9Asqzw9IUaRHg7GGo9ZK4otlBTcuR+/mGJdMXyG3ft/dCtws6Nxb9 cbGBELKtctIUdOpkVK0Q4RJJ7Imxadc= X-MC-Unique: afH1yldQO9WsZEOkO10R0Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718888595; x=1719493395; 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=W6tnGmP8UAqa4G+onMQE8JTTdn8pIGx/VV2/Iv84CZc=; b=BE4JyUpRwvOLCZTs23vqFJe6RT7g1s0Q1Vw25yJOCTL39jOFNG/9u47S1wAVFeET8f tELBphppr1qCTiRxUcEZxRXjVCTk9PjEa0GXx+BIiYIdQf+fJaYf5e8XnlDOk3aKEiHn tcuHQOB098jNwJWi+VTHvGByTXY4L4SjStaJblSrN51+I5hSaEjlT0qmQGU2xFVacea1 w9rIm35El7WcfajRjWKgkUhaePuo1exna/aryxigVD+Me8b91YUxiiV7CoWPNof0vs+B 3gIu3hJIrPPUTCGT2fBxDQGfdcnvVkymkLfJMNPASljO5LkR4OJtviOz1XFnOF3diHzS T7wA== X-Gm-Message-State: AOJu0Yya8WrxgSDq6zl+6heq8Nzl7t0Ee52/mNKxXb4dHtHdYjTTG7VJ KYHziWGOi4gFB1yLIqH2dNiz+UT71yIZSCEeVsmARYcvMQ3Mmk5LomBYXsJKUq+hxDFoSe31Vuv U9GRt4ar/84riFJ2+rzVO2bPVePecs1vp5s9FT+xpsjPXYQ9NHMJfh7cCM7eghZZLhbomREofg5 pB4ACuLIK1LyLH02iDplmcIcaTnFJh6il37g4W X-Received: by 2002:a05:6512:2252:b0:52c:8289:e891 with SMTP id 2adb3069b0e04-52ccaa2a86emr4908286e87.6.1718888595035; Thu, 20 Jun 2024 06:03:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6w9f30q/hsffICkeJ4Q2+BFb7ayRlH0zqxsnrJL2YMk9kd59EDpZqD/RJXcC8nzuwt9gEtg== X-Received: by 2002:a05:6512:2252:b0:52c:8289:e891 with SMTP id 2adb3069b0e04-52ccaa2a86emr4908271e87.6.1718888594749; Thu, 20 Jun 2024 06:03:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , amonakov@ispras.ru Subject: [PATCH 6/6] meson: require compiler support for chosen x86-64 instructions Date: Thu, 20 Jun 2024 15:02:54 +0200 Message-ID: <20240620130254.415699-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240620130254.415699-1-pbonzini@redhat.com> References: <20240620130254.415699-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: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.152, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 @redhat.com) X-ZM-MESSAGEID: 1718888680111100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 54e6b09f4fb..c5360fbd299 100644 --- a/meson.build +++ b/meson.build @@ -2863,6 +2863,7 @@ have_cpuid_h =3D cc.links(''' config_host_data.set('CONFIG_CPUID_H', have_cpuid_h) =20 config_host_data.set('CONFIG_AVX2_OPT', get_option('avx2') \ + .enable_auto_if(get_option('x86_version') >=3D '3') \ .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot ena= ble AVX2') \ .require(cc.links(''' #include @@ -2875,6 +2876,7 @@ config_host_data.set('CONFIG_AVX2_OPT', get_option('a= vx2') \ '''), error_message: 'AVX2 not available').allowed()) =20 config_host_data.set('CONFIG_AVX512BW_OPT', get_option('avx512bw') \ + .enable_auto_if(get_option('x86_version') >=3D '4') \ .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot ena= ble AVX512BW') \ .require(cc.links(''' #include --=20 2.45.2