From patchwork Wed Apr 5 16:21:40 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: 1765653 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=8.43.85.97; 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=G0sFp28B; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 4Ps91v19qjz1yZT for ; Thu, 6 Apr 2023 02:24:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0D0E7383D667 for ; Wed, 5 Apr 2023 16:24:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D0E7383D667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680711857; bh=pAkFcHaS94B8XuA/Hsl+Rs14VQ9AH8YdYEDonqHyJqc=; 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=G0sFp28BlXAP7Bsh3TN/wnowWRdNy143VYr7F3N0m0e+K/6brQ4U84PaxButEFkzs l50sfN1LQslOxcZpORJoIh06eypzmnU3ms8nqxvOWy/uW9ECzYbcd0Pl2RTIOeBihR VM70gCbXw+xIYLCWazTy+2ORCjttt09yJZc9trvA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 324AC385770E for ; Wed, 5 Apr 2023 16:21:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 324AC385770E Received: by mail-pl1-x62a.google.com with SMTP id c18so34878180ple.11 for ; Wed, 05 Apr 2023 09:21:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680711712; 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=pAkFcHaS94B8XuA/Hsl+Rs14VQ9AH8YdYEDonqHyJqc=; b=VqZNOtfY/dLsvBQ0i8KxlF/575Gngf7CEhBr9RqvFLM+3HFuevgJyKjBw0UqyI5cc7 bAtmChWCaCPhtBHv6mmaobmvugYm5m9ikeGka9vv5rrpaUQeqZc6nR3ymPzYlzEqrYuc dgsZXBC6AalvgEiJN+47cEbemcaCbg3oknIVGQLh5nDLtUaf9aJfRUYI7DUSYpPJVuyI VDyTqDf9HAqZL3GsLghT/qWvuEWINqiNqOYbXjXjY1b/bg4EwejpDeuvI7/IKVeT6MS6 kU6bzFERskNL5HfdaJGPUheABPFlNj9KoJz8Zm8sR2DZqvaIOqllMeAt3axKoxcsF79Z ffhA== X-Gm-Message-State: AAQBX9dLyjKXPbtVbnbkPgUYFY4G1fhi4NiECFEchN3mYG2G36PSg+eq 3D8cmU+joiEGpV1/uBf7O1+nyg6OM2A= X-Google-Smtp-Source: AKy350bqyqaQT/nCRj/UkUyqeGl2o5ku0GqMskKWGD7a32NRz9NAmm8o48YR3ONogOTntmjg1LI3jw== X-Received: by 2002:a17:902:e5d0:b0:1a1:b238:d1a5 with SMTP id u16-20020a170902e5d000b001a1b238d1a5mr7913497plf.4.1680711712007; Wed, 05 Apr 2023 09:21:52 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.161.240]) by smtp.gmail.com with ESMTPSA id p4-20020a170902eac400b001a2806ae2f7sm10389281pld.83.2023.04.05.09.21.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 09:21:50 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 1EAD674015C for ; Wed, 5 Apr 2023 09:21:45 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 15/19] : Add MSRLIST support Date: Wed, 5 Apr 2023 09:21:40 -0700 Message-Id: <20230405162144.984598-16-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.6 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 MSRLIST support to . Reviewed-by: Noah Goldstein --- manual/platform.texi | 4 ++++ sysdeps/x86/bits/platform/x86.h | 1 + sysdeps/x86/tst-get-cpu-features.c | 1 + 3 files changed, 6 insertions(+) diff --git a/manual/platform.texi b/manual/platform.texi index af75e5c413..bfccd024a5 100644 --- a/manual/platform.texi +++ b/manual/platform.texi @@ -464,6 +464,10 @@ the indirect branch predictor barrier (IBPB). @item @code{MSR} -- Model Specific Registers RDMSR and WRMSR instructions. +@item +@code{MSRLIST} -- RDMSRLIST/WRMSRLIST instructions and IA32_BARRIER +MSR. + @item @code{MTRR} -- Memory Type Range Registers. diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platform/x86.h index abc0116607..57973e9a6c 100644 --- a/sysdeps/x86/bits/platform/x86.h +++ b/sysdeps/x86/bits/platform/x86.h @@ -302,6 +302,7 @@ enum x86_cpu_HRESET = x86_cpu_index_7_ecx_1_eax + 22, x86_cpu_AVX_IFMA = x86_cpu_index_7_ecx_1_eax + 23, x86_cpu_LAM = x86_cpu_index_7_ecx_1_eax + 26, + x86_cpu_MSRLIST = x86_cpu_index_7_ecx_1_eax + 27, x86_cpu_index_19_ebx = (CPUID_INDEX_19 * 8 * 4 * sizeof (unsigned int) diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c index 3a2d4671ec..0c948c2b04 100644 --- a/sysdeps/x86/tst-get-cpu-features.c +++ b/sysdeps/x86/tst-get-cpu-features.c @@ -214,6 +214,7 @@ do_test (void) CHECK_CPU_FEATURE_PRESENT (HRESET); CHECK_CPU_FEATURE_PRESENT (AVX_IFMA); CHECK_CPU_FEATURE_PRESENT (LAM); + CHECK_CPU_FEATURE_PRESENT (MSRLIST); CHECK_CPU_FEATURE_PRESENT (AESKLE); CHECK_CPU_FEATURE_PRESENT (WIDE_KL); CHECK_CPU_FEATURE_PRESENT (PTWRITE);