Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1856173pxb; Mon, 12 Apr 2021 08:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZwJeLJPnX6TeTB/3/ZZeU0xpjROgMgfIJPJz57CABdnVwg2HzSLRUEo1TQTr3/rOyi9ea X-Received: by 2002:a63:d41:: with SMTP id 1mr28343460pgn.31.1618240415274; Mon, 12 Apr 2021 08:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618240415; cv=none; d=google.com; s=arc-20160816; b=hdafwMUaeLvZ7/wybBq3+NLywDOcOSS5Y5xgwu1OBT31BwPutzuTdTvRBTYk1K4Swa J4T0XuOKKqaeQrlbkYwWpZ23I8fLAxY+lcDK2EmRCzg35O6JT1lCIbQ1mf9PiwaA3Jvm AY12DKTXo/wKCHK5hUfG/bDb7jiTOJnjqg5hs+iuVym0BpivdACOrVYaBI523uq5YRdz s5alF7oqfE+kfFh3NPZVxIgANgkDpfZ/CEQDxYHcxLHzml/zlsHICk3cMHDUmRuHYxQV UY517bXCnUi+McFAEeFGmTS3jHWwE3ZOROthxxOJUOlpHKH7uBJBVbg0xsKwfogLpjOT 0HVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=li5yO3ci0EdtyivxU0FpvQYUbBKVnudD0U4lu+FaRh0=; b=bntTBnb1/+FggFWipF7bfrbsHOparowapHyWXgrHxJJEVc8IYaXMKlv1or5Uphbuz6 p+DLQIAmfYStv0r95PmF4MP/H9/CkaPbm94PhgTCMcWfyX0ImLzaprUr51vVGWynwBJH vftYvPZJcgKXmPALExgu5KueaYYlUxHnGKOvk6nGMr5wxLGG1xP3K1etzv7abwnA7taR iTD853g0A70SlwRM24lTN/IHyNV+Cs7vfUytCIblo984u5365sP9hsYTK/K7sXoTnkmA r4h83yBdbBxEpoWnEzdjF3ILm1m2ev9L1w4hCujAJwkla2JsYZXKXkXgBiyiCf8UPqZs 30Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=NGJFfwIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce15si15035974pjb.15.2021.04.12.08.13.22; Mon, 12 Apr 2021 08:13:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=NGJFfwIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242520AbhDLPKi (ORCPT + 99 others); Mon, 12 Apr 2021 11:10:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241009AbhDLPKg (ORCPT ); Mon, 12 Apr 2021 11:10:36 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4CEAC061574 for ; Mon, 12 Apr 2021 08:10:18 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id b17so9616567pgh.7 for ; Mon, 12 Apr 2021 08:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=li5yO3ci0EdtyivxU0FpvQYUbBKVnudD0U4lu+FaRh0=; b=NGJFfwIZyS0imURzuBF05ohtiBtg34GQq4kGYX/62PKwtlFdBEVYFNTa5Zi1/6cRZ6 or5SOK/xSJ5R4rD28Ua7hSopdjvFZpBFlkSJSDjecQxz+qvumCUF0IE6HAQ4UsItak7L IyQPPlA/1sXPoGklQurc7fLPFjUWYOeO68I1dwBY6zbOcAqMpZDk12f6oh0wkpWF152t jEsLmzCn+k2xMf6xA8Nxei9itkcnPnIfy6peNFiF3umtLXsTzXb9EHLBifvTLgMAxX/U xjoekDWz2ELRh/ysQ1cXZu51PhefpUH/jK+xOEDdcfxQvLUA7KxtemAcepmqfXVM0wPa 6BYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=li5yO3ci0EdtyivxU0FpvQYUbBKVnudD0U4lu+FaRh0=; b=AgZmz57ZNl+RzoUQIt8aBO/l5Kk04kpzqtcb9rs0PjN1Xo/2t6f0E8P47AuNicYSLE sEPQGplJ0y7ze03G0qZyQerxIn8BT5Rgft6Y1+E6e0i7khvJBIUbm1uclL7FNZywjiyd vNt2KNroIp6jaOC8QsHLUd0vUgCVWI0TuViSr8uvgHtwjvQXQZQNKlEInzRBM2QTdRWz Dx6HvY6IWJ202OtX7jL0ZPAzueozTslyaiDTb3dGMDO1oVFdvNnvPZ1Fee9nFG7eKWzD rDSe+6s+33Smm7r1Pc/jIqa10K43LyOmFmJ6d0tsLJKEBvhyjj+qYgXLHV/WMbExNKgo TRng== X-Gm-Message-State: AOAM530Rex2wA8bX25598kWt3Wr3IDRB1axVOeZzZCzE5Vdc7rHZjNXG rtyRuKu2xbHBFPg9xiJOcZiFBw== X-Received: by 2002:a63:3e06:: with SMTP id l6mr27221422pga.140.1618240218355; Mon, 12 Apr 2021 08:10:18 -0700 (PDT) Received: from ?IPv6:2601:646:c200:1ef2:3129:54c1:fe68:a222? ([2601:646:c200:1ef2:3129:54c1:fe68:a222]) by smtp.gmail.com with ESMTPSA id q14sm12798351pgt.54.2021.04.12.08.10.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Apr 2021 08:10:17 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features Date: Mon, 12 Apr 2021 08:10:15 -0700 Message-Id: <27CD4C77-E58A-4AC1-8415-3E57BE0F3663@amacapital.net> References: <878s5nk1pk.fsf@oldenburg.str.redhat.com> Cc: Borislav Petkov , Andy Lutomirski , "Bae, Chang Seok" , Dave Hansen , X86 ML , LKML , linux-abi@vger.kernel.org, libc-alpha@sourceware.org, Rich Felker , Kyle Huey , Keno Fischer In-Reply-To: <878s5nk1pk.fsf@oldenburg.str.redhat.com> To: Florian Weimer X-Mailer: iPhone Mail (18D70) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Apr 12, 2021, at 7:38 AM, Florian Weimer wrote: >=20 > =EF=BB=BF* Borislav Petkov: >=20 >>> On Mon, Apr 12, 2021 at 04:19:29PM +0200, Florian Weimer wrote: >>> Maybe we could have done this in 2016 when I reported this for the first= >>> time. Now it is too late, as more and more software is using >>> CPUID-based detection for AVX-512. >>=20 >> So as I said on another mail today, I don't think a library should rely >> solely on CPUID-based detection of features especially if those features >> need kernel support too. IOW, it should ask whether the kernel can >> handle those too, first. >=20 > Yes, that's why we have the XGETBV handshake. I was imprecise. It's > CPUID + XGETBV of course. Or even AT_HWCAP2 (for FSGSBASE). >=20 >> And the CPUID-faulting thing would solve stuff like that because then >> the kernel can *actually* get involved into answering something where it >> has a say in, too. >=20 > But why wouldn't we use a syscall or an entry in the auxiliary vector > for that? Why fault a potentially performance-critical instruction? >=20 CPUID is horrifically slow in various virt scenarios. If user code needs to s= erialize, use IRET or SERIALIZE.=