From patchwork Wed Apr 5 16:21:37 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: 67405 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EBC63385042F for ; Wed, 5 Apr 2023 16:22:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBC63385042F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680711777; bh=TRi2yqt1bv5DpczpCcSaFhw22ZXHFScWLKAzbE2G+lA=; 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=ENSvDT6Fc7ydUOGQ65EqPkaOekUhslTDV/sHj5QjVrNgbYHfffYo8MhhuJf148xvT Ppbg/farYmuWPZst+N6IACuMMcrta7dnM/d9m/glKnVq49SpttdD8TZAOoE9lDpfZp W8kWIctzPfLOpoTOWDKz8zfax+n/xjIqmUmMazZA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id BA7653858436 for ; Wed, 5 Apr 2023 16:21:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA7653858436 Received: by mail-pj1-x1030.google.com with SMTP id x15so34499932pjk.2 for ; Wed, 05 Apr 2023 09:21:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680711710; 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=TRi2yqt1bv5DpczpCcSaFhw22ZXHFScWLKAzbE2G+lA=; b=g7/ZT1vsunjsDy0E87K8v9Gj4T8DZ63hQE33/mCVChTzKLutztKMIZe0GQmtlVUg89 9IyGg+RZsRKjX+PtCq7oXPGSksgMBmUwJrL7nbHyTK0prGiPVfyW8NAzJq4KYk5t0Jpw mxTCBdwF8oXsQHVEeOUkXb+R0NleCPVaLP196Qlv6fMk640U8UsUnT/9pzb9dCEPRijk wsFwhRuK/bS5PgDKopWXzx0Yd0R/ZjenkUgDqA+AP0uq0pyq0gZvmusnqSkf7IDBoUID xgQ3ZZzQuEtUSEuUxktpoboJ3xWBkXKCNrudrmn4m1hTF5AOUUV3tlYa+etSX73q6U+t 4UiQ== X-Gm-Message-State: AAQBX9dBBheTmq9xObTCID0rJdIn0fmt76oe0zzJlZ/uLjKt9tFJPx9B KvRHTBOOjAN/OI7RThFnA+TYKtEjQXo= X-Google-Smtp-Source: AKy350Yncm5lyxKaGFxyb4L2dqYGGuPQxE8t4kvR95S0X/NYByijiYNNZeTXt7N5mJ2JwmpPB3Bo4Q== X-Received: by 2002:a17:903:22c1:b0:1a0:42c0:b2a5 with SMTP id y1-20020a17090322c100b001a042c0b2a5mr7948287plg.24.1680711710453; Wed, 05 Apr 2023 09:21:50 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.161.240]) by smtp.gmail.com with ESMTPSA id g15-20020a170902868f00b0019b0afc24e8sm10305179plo.250.2023.04.05.09.21.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 09:21:48 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id EF4F4740144 for ; Wed, 5 Apr 2023 09:21:44 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 12/19] : Add WRMSRNS support Date: Wed, 5 Apr 2023 09:21:37 -0700 Message-Id: <20230405162144.984598-13-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+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Add WRMSRNS support to . Reviewed-by: Noah Goldstein --- manual/platform.texi | 3 +++ sysdeps/x86/bits/platform/x86.h | 1 + sysdeps/x86/tst-get-cpu-features.c | 1 + 3 files changed, 5 insertions(+) diff --git a/manual/platform.texi b/manual/platform.texi index ecee3a7b39..af79f5eb4d 100644 --- a/manual/platform.texi +++ b/manual/platform.texi @@ -679,6 +679,9 @@ using a TSC deadline value. @item @code{WIDE_KL} -- AES wide Key Locker instructions. +@item +@code{WRMSRNS} -- WRMSRNS instruction. + @item @code{X2APIC} -- x2APIC. diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platform/x86.h index 74b7f951e1..2a15ad937a 100644 --- a/sysdeps/x86/bits/platform/x86.h +++ b/sysdeps/x86/bits/platform/x86.h @@ -297,6 +297,7 @@ enum x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10, x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11, x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12, + x86_cpu_WRMSRNS = x86_cpu_index_7_ecx_1_eax + 19, x86_cpu_HRESET = x86_cpu_index_7_ecx_1_eax + 22, x86_cpu_LAM = x86_cpu_index_7_ecx_1_eax + 26, diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c index 329d4aafb4..9c436eaa64 100644 --- a/sysdeps/x86/tst-get-cpu-features.c +++ b/sysdeps/x86/tst-get-cpu-features.c @@ -209,6 +209,7 @@ do_test (void) CHECK_CPU_FEATURE_PRESENT (FZLRM); CHECK_CPU_FEATURE_PRESENT (FSRS); CHECK_CPU_FEATURE_PRESENT (FSRCS); + CHECK_CPU_FEATURE_PRESENT (WRMSRNS); CHECK_CPU_FEATURE_PRESENT (HRESET); CHECK_CPU_FEATURE_PRESENT (LAM); CHECK_CPU_FEATURE_PRESENT (AESKLE);