From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id BBDF3387090A for ; Wed, 5 Apr 2023 21:03:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BBDF3387090A 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-ej1-x630.google.com with SMTP id a640c23a62f3a-9476e2fa157so70358366b.3 for ; Wed, 05 Apr 2023 14:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680728616; 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=N4pebEoG+81lD7RImNyO7NBQ5ZHI5w7+eUdl9csPvv8=; b=aLlvYqbtSIAYJAyeUR6U8NnKJ3hYY1CMvPOR9fxfO8yWQaoYYXdS1elp7ilk4An9MH SiZwAW3mowLGsSGXkRm9Bp5meQ01UBk20TFcNlFwfGfNaNraSCiQZNtRRfH3wsvo2C8w faxjNKP25h74/FikJ00AxBboS68re2o42aPh/IczUeOVGMAQxa2aedS2CreUwG+WyeXN 7xFFDTe7UsnxwaK5brNS6cSOsb7XhWr+8vU0AMygU1ipqz9f+SvlCldDZgF8mTh6mZXr SNdJYzMKMexu/uSLj9Z5phlcWhsYaYlDNsyfoiRgxJQNrvyIdqrpghk0lXkkSCD07u7M PZIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680728616; 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=N4pebEoG+81lD7RImNyO7NBQ5ZHI5w7+eUdl9csPvv8=; b=ndCQeF0COe5vE80ighMmSop1/vCypKFkTU9tKJ5YqH3ZP/LhD7e/rsEBo/unLBARDU zifC0exOBcFfop9osp7BNMLcJQ+RsLmG5MSRzd3L0Z5iSd2H6dfvGq5uhK4g2I8q87wX fbW6jaU2y5dMq/k4kAbt9jQv7kHObAMo3MrZPzK6h333Ljl5VDhbHIwmZ0y/twHfb/iO pReaLeycGe7KXwADE8DkpVsCQrfKCZ6K8CX6W5vmdw/DgGDgMRpEST400TUid/z7M6aK B2GMisEQK9WV9Jk08edSVRLsmW+QgX4Wu9ofUELJXhTBuuiC1ismIz1aDq5LvPcCEcgi /qvA== X-Gm-Message-State: AAQBX9f2VtfosGq0xO41ADd4D5Xcjt1j01k4FG3DiOVKvmjs70Kngydp 51ElUimZopwjbS93N13NmHpWRMu7p9FvQzyOAQa7OazqHdI= X-Google-Smtp-Source: AKy350bgWO9wYSxy9wj4v/0RXS+GDxMCQh++k+RIR/ypyGY4nlj/Pjmwsm100MhMhLj0BVr9YOz6Tp38dLyZjigsuTE= X-Received: by 2002:a50:ba8e:0:b0:4fb:9f5:b994 with SMTP id x14-20020a50ba8e000000b004fb09f5b994mr1650475ede.0.1680728616437; Wed, 05 Apr 2023 14:03:36 -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: Noah Goldstein Date: Wed, 5 Apr 2023 16:03:25 -0500 Message-ID: Subject: Re: [PATCH 05/19] : Add SGX-KEYS support To: "H.J. Lu" Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.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 List-Id: On Wed, Apr 5, 2023 at 1:40=E2=80=AFPM H.J. Lu wrote: > > 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/platf= orm/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= -cpu-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. > > > -- > H.J. LGTM Reviewed-by: Noah Goldstein