From patchwork Wed Apr 5 16:21:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1765648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=sHVNLI8J; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ps90J19kDz1yZT for ; Thu, 6 Apr 2023 02:22:56 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D4AD3855599 for ; Wed, 5 Apr 2023 16:22:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D4AD3855599 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680711774; bh=tIHiY8L95MI0Q0zAXe9PX3THzFiqq4/Wzzp5zDWRYyw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sHVNLI8JzI10pnHASRYmMYZHlPDgZ81E7AOiOq4nSqDxwSnBX/iIseyBrygdSwx01 7+BQ0oZ+VmOr8zo6wCBlHmwnq+v8jCc8Q0F8b8R9TO5wJq+SMQIeb4p+vBeKK6YnkM RsmuA0eWzToiJ4IxFLn1o+dwFhS4qf9X1eaetXbI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 2A4073858C5E for ; Wed, 5 Apr 2023 16:21:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A4073858C5E Received: by mail-pj1-x102d.google.com with SMTP id e15-20020a17090ac20f00b0023d1b009f52so40030477pjt.2 for ; Wed, 05 Apr 2023 09:21:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680711708; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tIHiY8L95MI0Q0zAXe9PX3THzFiqq4/Wzzp5zDWRYyw=; b=uZuO0YQKKMytSA0xUdIF+Ac3375Fvxudn1bozJcpCZmnV899ozX9vh8bXgx6Z1y2u4 3kURfKAPOCTD9f0CSAzG1lMZoo+RjWf4gkOUCFN4+dbUYXzoX6yQmFkjjJjjr4Zulpzc FDiz55nGhFMQiae4DAkb3Z7srMop6fP0f21ft8+uhCTOP5p+jgAoCqm1baqn5epvlB1r HHSpmLwyL//tKWjROI7+WLMWYCb6zI9ogvzSOMUnThUvtCqQKp/v7fvNHEpN8nFtKlzf +fZGDKlwEDhrwcRla9G6leNstujAr9x6wlpVYnsieuu3ZvIb2BO+gS8xjoRfrajdhQXo q3Kg== X-Gm-Message-State: AAQBX9dRdAI4WYAD2d3yVmEpxDkUs1iPia8FXFdAOAsfwWfKLth1bQEA BwcIxW2xveOnIte2aw08Jby06koBYko= X-Google-Smtp-Source: AKy350Z4auT4hGfPlIaMM9OW5oS/PjY7rUmFdusALkv6mkkAynwRB7mtrdZBG7Yg717um09qdWFjrg== X-Received: by 2002:a17:90b:2250:b0:237:d59d:5f89 with SMTP id hk16-20020a17090b225000b00237d59d5f89mr7441139pjb.4.1680711708010; Wed, 05 Apr 2023 09:21:48 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.161.240]) by smtp.gmail.com with ESMTPSA id p11-20020a1709026b8b00b001a22f9087e8sm10332511plk.51.2023.04.05.09.21.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 09:21:47 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id A88C8740120 for ; Wed, 5 Apr 2023 09:21:44 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 06/19] : Add RTM_FORCE_ABORT support Date: Wed, 5 Apr 2023 09:21:31 -0700 Message-Id: <20230405162144.984598-7-hjl.tools@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230405162144.984598-1-hjl.tools@gmail.com> References: <20230405162144.984598-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3025.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Add RTM_FORCE_ABORT support to . Reviewed-by: Noah Goldstein --- manual/platform.texi | 3 +++ sysdeps/x86/bits/platform/x86.h | 2 +- sysdeps/x86/tst-get-cpu-features.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/manual/platform.texi b/manual/platform.texi index 4453f6e1f4..2ab687cbba 100644 --- a/manual/platform.texi +++ b/manual/platform.texi @@ -539,6 +539,9 @@ capability. @item @code{RTM_ALWAYS_ABORT} -- Transactions always abort, making RTM unusable. +@item +@code{RTM_FORCE_ABORT} -- TSX_FORCE_ABORT MSR. + @item @code{SDBG} -- IA32_DEBUG_INTERFACE MSR for silicon debug. diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platform/x86.h index ee5be8190f..6d9dd6dacf 100644 --- a/sysdeps/x86/bits/platform/x86.h +++ b/sysdeps/x86/bits/platform/x86.h @@ -213,7 +213,7 @@ enum x86_cpu_MD_CLEAR = x86_cpu_index_7_edx + 10, x86_cpu_RTM_ALWAYS_ABORT = x86_cpu_index_7_edx + 11, x86_cpu_INDEX_7_EDX_12 = x86_cpu_index_7_edx + 12, - x86_cpu_INDEX_7_EDX_13 = x86_cpu_index_7_edx + 13, + x86_cpu_RTM_FORCE_ABORT = x86_cpu_index_7_edx + 13, x86_cpu_SERIALIZE = x86_cpu_index_7_edx + 14, x86_cpu_HYBRID = x86_cpu_index_7_edx + 15, x86_cpu_TSXLDTRK = x86_cpu_index_7_edx + 16, diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c index 1979da2174..8b7e70aee1 100644 --- a/sysdeps/x86/tst-get-cpu-features.c +++ b/sysdeps/x86/tst-get-cpu-features.c @@ -162,6 +162,7 @@ do_test (void) CHECK_CPU_FEATURE_PRESENT (AVX512_VP2INTERSECT); CHECK_CPU_FEATURE_PRESENT (MD_CLEAR); CHECK_CPU_FEATURE_PRESENT (RTM_ALWAYS_ABORT); + CHECK_CPU_FEATURE_PRESENT (RTM_FORCE_ABORT); CHECK_CPU_FEATURE_PRESENT (SERIALIZE); CHECK_CPU_FEATURE_PRESENT (HYBRID); CHECK_CPU_FEATURE_PRESENT (TSXLDTRK);