From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30496A034F for ; Fri, 8 Oct 2021 14:07:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17DC6410EE; Fri, 8 Oct 2021 14:07:49 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 95A77410E1 for ; Fri, 8 Oct 2021 14:07:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633694866; 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=5lb3mRW2qCesO7mobicjf58d4HyvIHOhR1Oh5yj3wfY=; b=I5r2HHBMHFPpTfHOxlYPXy0/i2IdzZ2J3geJ80qwWfc0VbX/NsmiesOW829crPzXjVUKBo Evb1IqjN+R+8eHNokxQHK3eQNkZc6zNf2PyTVk8qBW+++3gE3UmiH28QCxg2cSumAcLm93 GjUz3rkWcBX23QQDOLWid9a0BRyoqWc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-558-1NhO6x8-PyKr2LS8-zRlhA-1; Fri, 08 Oct 2021 08:07:33 -0400 X-MC-Unique: 1NhO6x8-PyKr2LS8-zRlhA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F6CF101AFBA; Fri, 8 Oct 2021 12:07:32 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.195.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DCC019724; Fri, 8 Oct 2021 12:07:30 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Bruce Richardson , Konstantin Ananyev Date: Fri, 8 Oct 2021 14:07:14 +0200 Message-Id: <20211008120715.17810-1-david.marchand@redhat.com> In-Reply-To: <20211006192008.23369-1-david.marchand@redhat.com> References: <20211006192008.23369-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] [PATCH v2 1/2] eal/x86: fix some CPU extended features definitions X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Caught while checking CPUID related stuff in OVS. According to [1], for Structured Extended Feature Flags Enumeration Leaf (EAX = 0x07H, ECX = 0): - BMI1 is associated to EBX, bit 3 (was incorrectly 2), - SMEP is associated to EBX, bit 7 (was incorrectly 6), - BMI2 is associated to EBX, bit 8 (was incorrectly 7), - ERMS is associated to EBX, bit 9 (was incorrectly 8), 1: https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Bruce Richardson --- lib/eal/x86/rte_cpuflags.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/eal/x86/rte_cpuflags.c b/lib/eal/x86/rte_cpuflags.c index d339734a8c..378fc95396 100644 --- a/lib/eal/x86/rte_cpuflags.c +++ b/lib/eal/x86/rte_cpuflags.c @@ -100,12 +100,12 @@ const struct feature_entry rte_cpu_feature_table[] = { FEAT_DEF(ENERGY_EFF, 0x00000006, 0, RTE_REG_ECX, 3) FEAT_DEF(FSGSBASE, 0x00000007, 0, RTE_REG_EBX, 0) - FEAT_DEF(BMI1, 0x00000007, 0, RTE_REG_EBX, 2) + FEAT_DEF(BMI1, 0x00000007, 0, RTE_REG_EBX, 3) FEAT_DEF(HLE, 0x00000007, 0, RTE_REG_EBX, 4) FEAT_DEF(AVX2, 0x00000007, 0, RTE_REG_EBX, 5) - FEAT_DEF(SMEP, 0x00000007, 0, RTE_REG_EBX, 6) - FEAT_DEF(BMI2, 0x00000007, 0, RTE_REG_EBX, 7) - FEAT_DEF(ERMS, 0x00000007, 0, RTE_REG_EBX, 8) + FEAT_DEF(SMEP, 0x00000007, 0, RTE_REG_EBX, 7) + FEAT_DEF(BMI2, 0x00000007, 0, RTE_REG_EBX, 8) + FEAT_DEF(ERMS, 0x00000007, 0, RTE_REG_EBX, 9) FEAT_DEF(INVPCID, 0x00000007, 0, RTE_REG_EBX, 10) FEAT_DEF(RTM, 0x00000007, 0, RTE_REG_EBX, 11) FEAT_DEF(AVX512F, 0x00000007, 0, RTE_REG_EBX, 16) -- 2.23.0