From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by sourceware.org (Postfix) with ESMTPS id 985093858D20 for ; Wed, 5 Apr 2023 18:40:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 985093858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb33.google.com with SMTP id p15so43678006ybl.9 for ; Wed, 05 Apr 2023 11:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680720008; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jEOPdOmRub3RT3jUBJbbyCoRYsKpT4q80eV56GfiSMI=; b=jIUyO+oBAmKDm+YTZQBOaUhCGnYkUicthuddGVKyfGTtLhL59sw9twiyihWEwgTaqa eMNCH3lwVc7wMRviR4QtCvtJ1Pv07NpY0tQwa3nvh/BPaOH/Vi0+DhWyxP3sMbqo4v7n pxLWUgS5nfmUFWG1ZJJ2zkkIcoWPoYTXSUa2lQqOqczTKdrgwLmHCOoxOsCT85Ir2cGY 1045h2B2RGWiGcgiXkNk1bFim5JGbN9nM6ze2wZ1RsXnhOujfZgVNVH3IgntyPyUa+Sw Wx4bwM8Zro2E9z2O0kiB9ZXVXhIozHmu+al1QbPgl8ChfGrsgeU3zC2/mFiNRfukytTP DN7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680720008; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jEOPdOmRub3RT3jUBJbbyCoRYsKpT4q80eV56GfiSMI=; b=ZcUjacvDX7R5LgkZxfpaA1ACSmfVZCbC1NO4+HkIKgf87lUTrvReb0HJuuKSZcB6bU WfReoozqY/4wD7auH23wjOEb1dq8GK9nvC1mtBhfnOqKgOcNGrJkXUAXU9SzP2NbwbRN hCiu0QZ8D9aWUenYdHeBGBXISsVkHBM+x03K+X9gC7Qa8wyTZz0PXLagvY9O5eHlVzMa JJu7xRcf6R9pJ8HV8S0YwwnyCUKvJNRl7l5VcNSHuKp6rC39cWRnAjv7zuLHVnYUnVZe hDGoqC+JOx+MDjUJDDPZCdJX97luMmZL/BG/eXVYblEeogpEhkMxeY27aDcfBOd+9PwI F3Tw== X-Gm-Message-State: AAQBX9d5EjxyoAWtB5rL2vsgRRgIpyssfREpCswDOD8ZOoUGiuJsBxZe WMt6MaNN+ADHf0n5y9imXnhgNsEAvyk6fZPGwmM= X-Google-Smtp-Source: AKy350buWU3YCx54e/9DfrtWd5n5w1Hzlb7QpxP+nSWiHQQpWW2MhJaaNO5VtvaHbAzYmxE4fPoFAGrDk9eYvFZFLCQ= X-Received: by 2002:a25:7685:0:b0:b77:676c:773c with SMTP id r127-20020a257685000000b00b77676c773cmr215822ybc.2.1680720008029; Wed, 05 Apr 2023 11:40:08 -0700 (PDT) MIME-Version: 1.0 References: <20230405162144.984598-1-hjl.tools@gmail.com> <20230405162144.984598-6-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Wed, 5 Apr 2023 11:39:32 -0700 Message-ID: Subject: Re: [PATCH 05/19] : Add SGX-KEYS support To: Noah Goldstein Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3022.0 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 List-Id: On Wed, Apr 5, 2023 at 11:21=E2=80=AFAM Noah Goldstein wrote: > > On Wed, Apr 5, 2023 at 11:25=E2=80=AFAM H.J. Lu via Libc-alpha > wrote: > > > > Add SGX-KEYS support to . > > --- > > 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 78ee39f650..4453f6e1f4 100644 > > --- a/manual/platform.texi > > +++ b/manual/platform.texi > > @@ -551,6 +551,9 @@ capability. > > @item > > @code{SGX} -- Intel Software Guard Extensions. > > > > +@item > > +@code{SGX_KEYS} -- Attestation Services for SGX. > > + > > @item > > @code{SGX_LC} -- SGX Launch Configuration. > > > > diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platfor= m/x86.h > > index e25f1ac53c..ee5be8190f 100644 > > --- a/sysdeps/x86/bits/platform/x86.h > > +++ b/sysdeps/x86/bits/platform/x86.h > > @@ -201,7 +201,7 @@ enum > > + cpuid_register_index_edx * 8 * sizeof (unsigned int)), > > > > x86_cpu_INDEX_7_EDX_0 =3D x86_cpu_index_7_edx, > > - x86_cpu_INDEX_7_EDX_1 =3D x86_cpu_index_7_edx + 1, > > + x86_cpu_SGX_KEYS =3D x86_cpu_index_7_edx + 1, > > x86_cpu_AVX512_4VNNIW =3D x86_cpu_index_7_edx + 2, > > x86_cpu_AVX512_4FMAPS =3D x86_cpu_index_7_edx + 3, > > x86_cpu_FSRM =3D x86_cpu_index_7_edx + 4, > > diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-c= pu-features.c > > index dcb735ddd6..1979da2174 100644 > > --- a/sysdeps/x86/tst-get-cpu-features.c > > +++ b/sysdeps/x86/tst-get-cpu-features.c > > @@ -154,6 +154,7 @@ do_test (void) > > CHECK_CPU_FEATURE_PRESENT (ENQCMD); > > CHECK_CPU_FEATURE_PRESENT (SGX_LC); > > CHECK_CPU_FEATURE_PRESENT (PKS); > > + CHECK_CPU_FEATURE_PRESENT (SGX_KEYS); > > CHECK_CPU_FEATURE_PRESENT (AVX512_4VNNIW); > > CHECK_CPU_FEATURE_PRESENT (AVX512_4FMAPS); > > CHECK_CPU_FEATURE_PRESENT (FSRM); > > -- > > 2.39.2 > > > > Rename 'bit_cpu_INDEX_7_EDX_1' in cpu-features.h? > Likewise for all other patches that don't rename the new index. They can't be removed since they aren't used by CPU_FEATURE_SET_ACTIVE. --=20 H.J.