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 ESMTP id A8D0A3851C3A for ; Fri, 21 May 2021 16:19:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A8D0A3851C3A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-qYSbj5MvMNux4HU5wvqCEg-1; Fri, 21 May 2021 12:19:17 -0400 X-MC-Unique: qYSbj5MvMNux4HU5wvqCEg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B8546D4E0; Fri, 21 May 2021 16:19:15 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-228.ams2.redhat.com [10.36.113.228]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9302D5D6DC; Fri, 21 May 2021 16:19:11 +0000 (UTC) From: Florian Weimer To: Dave Hansen Cc: Dave Hansen via Libc-alpha , Len Brown , Rich Felker , Linux API , "Bae, Chang Seok" , X86 ML , LKML , Kyle Huey , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Keno Fischer , Arjan van de Ven , Willy Tarreau Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features References: <20210415044258.GA6318@zn.tnic> <20210415052938.GA2325@1wt.eu> <20210415054713.GB6318@zn.tnic> <20210419141454.GE9093@zn.tnic> <20210419191539.GH9093@zn.tnic> <20210419215809.GJ9093@zn.tnic> <874kf11yoz.ffs@nanos.tec.linutronix.de> <87k0ntazyn.ffs@nanos.tec.linutronix.de> <37833625-3e6b-5d93-cc4d-26164d06a0c6@intel.com> <9c8138eb-3956-e897-ed4e-426bf6663c11@intel.com> <87pmxk87th.fsf@oldenburg.str.redhat.com> <939ec057-3851-d8fb-7b45-993fa07c4cb5@intel.com> Date: Fri, 21 May 2021 18:19:09 +0200 In-Reply-To: <939ec057-3851-d8fb-7b45-993fa07c4cb5@intel.com> (Dave Hansen's message of "Fri, 21 May 2021 09:14:12 -0700") Message-ID: <87r1i06ow2.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Fri, 21 May 2021 16:19:22 -0000 * Dave Hansen: > On 5/21/21 7:44 AM, Florian Weimer wrote: >> * Dave Hansen via Libc-alpha: >>> Our system calls are *REALLY* fast. We can even do a vsyscall for this >>> if we want to get the overhead down near zero. Userspace can also cache >>> the "I did the prctl()" state in thread-local storage if it wants to >>> avoid the syscall. >> Why can't userspace look at XCR0 to make the decision? > > The thing we're trying to avoid is a #NM exception from XFD (the new > first-use detection feature) that occurs on the first use of AMX. > XCR0 will have XCR0[AMX]=1, even if XFD is "armed" and ready to > generate the #NM. I see. So essentially the hardware wants to offer transparent initialize-on-use, but Linux does not seem to want to implement it this way. Is there still a chance to bring the hardware and Linux into alignment? Thanks, Florian