From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7B8F23858CD1 for ; Wed, 26 Jul 2023 04:59:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B8F23858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690347546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xim/cE6/Owafhc5L7HXSPArfyKSU5ExNapwIBq31AT8=; b=If3Zzzx2iAIDbO37f1OuiEXMS6Q5Iu9h18bMG+6SVVVpe5vNFuxnhR9hakvRh/Zfmhfs6s Rb98GLwDD13BP6dSUSczkOjn04oMKo/70Gj1tz+zW3axTriy2hYhnWL6SnQT3ij4bD93Ed Pp8/fAmI+N6BIZOm37uhx8eWP/m/vSk= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-438-J400veuMMey8ba34HcYEJg-1; Wed, 26 Jul 2023 00:59:02 -0400 X-MC-Unique: J400veuMMey8ba34HcYEJg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2244A3C0F675; Wed, 26 Jul 2023 04:59:02 +0000 (UTC) Received: from oldenburg3.str.redhat.com (unknown [10.2.16.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 880691454147; Wed, 26 Jul 2023 04:59:01 +0000 (UTC) From: Florian Weimer To: Noah Goldstein Cc: "H.J. Lu" , "H.J. Lu via Libc-alpha" Subject: Re: [PATCH] : Add APX support References: <20230725190411.2192265-1-hjl.tools@gmail.com> <87ila73gvq.fsf@oldenburg3.str.redhat.com> Date: Wed, 26 Jul 2023 06:59:00 +0200 In-Reply-To: (Noah Goldstein's message of "Tue, 25 Jul 2023 21:46:36 -0500") Message-ID: <87lef346az.fsf@oldenburg3.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: * Noah Goldstein: > On Tue, Jul 25, 2023 at 3:17=E2=80=AFPM H.J. Lu via Libc-alpha > wrote: >> >> On Tue, Jul 25, 2023 at 12:55=E2=80=AFPM Florian Weimer wrote: >> > >> > * H. J. Lu via Libc-alpha: >> > >> > > diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c >> > > index 9ac195810f..376e3c7501 100644 >> > > --- a/sysdeps/x86/cpu-features.c >> > > +++ b/sysdeps/x86/cpu-features.c >> > > @@ -226,6 +226,10 @@ update_active (struct cpu_features *cpu_feature= s) >> > > CPU_FEATURE_SET_ACTIVE (cpu_features, AMX_COMPLEX); >> > > } >> > > >> > > + /* Is AVX state usable? */ >> > > + if ((xcrlow & bit_AVX_state) !=3D 0) >> > > + CPU_FEATURE_SET_ACTIVE (cpu_features, APX_F); >> > > + > > Isn't the APX state bigger than the AVX state? There is this: | =E2=80=A2 EBX (Offset in bytes in XSAVE/XRSTOR area for this feature) | =E2=80=93 960 (0x3C0). | * Intel=C2=AE APX is feature index 19 in XCR0. | * Intel=C2=AE APX is architected to re-use the deprecated area of Int= el=C2=AE MPX. But the =E2=80=9CAVX=E2=80=9D is really a typo for APX here=E2=80=94bit_AVX= _state is bit 19, the APX bit. Thanks, Florian