Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp26951pxf; Wed, 31 Mar 2021 15:32:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpYO8Yz+H/6JbiTqMN/gxsNqzDAjF92n6VgYQkOPrMGZLRoFmWX8CG0L9HfOF+Y9/muF4X X-Received: by 2002:a17:906:5949:: with SMTP id g9mr6214209ejr.518.1617229942966; Wed, 31 Mar 2021 15:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617229942; cv=none; d=google.com; s=arc-20160816; b=rzBlu8RrQTvspV4FoTKki19EiNJTLuZvF25nY/O2r1U0Ryeg5P4lRDOA1m1c/a29/l LpldjqCTcVtC1yZ3cNw/gd0Wyrea7uM7ult26y7f2Tc/YA2iJvXf7FkXjJaOirOPu1qK d4rAjjp0vgf/aFORzP9BDf9zm+JrOb8c9w23ZLq8qtWd+b1BfacDhZpYEOXLiTf7FnUg HxYivlCwdVsGG1E7FQRcfznTwOBNJ4ZoBG1EmGR5nEKNO74c/i1jTphVMo3pgj7M7Quw NRTuEkkv/qAqWk8SU9JOKgW2mA+PGVdjE56d+cgRykuPdc70ZMqA/yyQXhawFwGPI3RK YYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=IIgLZAjPtFxrcnI2I4VBSfeLHTTiRfrljftSDq8sd7M=; b=M5vc5pAJ5gACWDCKFtrvJI9AF5ONx5QQvSuV21V5Ml4KTRy2Duvmwv2ZfHS04V2ckJ X52qlYRklsQ6iUESnz11LDIiW4MiIlptYRVhEYWbngfqLcJVlDLC8sXUiSSpCwlFScjq XKAKe0prOJQ2kV2nD4EwRf6RQKhQGe6w1qo3D6ujtkHMbKVOzxg17b6GAlEB9eJzVZeu Ns56bXB3cJtCx9DH4nIdbT6AOp1s7K4u6J/gOKmyO6jiEx6FhyKO591DtOQVvAotHJF7 ppV8I0qfEA4dgLUZM54WEX1ZmS33ouOWDSb+71uYy2L2YtzKampHmuDW9orCO4kSltjO xeQg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c10si2729358edq.212.2021.03.31.15.32.00; Wed, 31 Mar 2021 15:32:22 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232493AbhCaW2u convert rfc822-to-8bit (ORCPT + 99 others); Wed, 31 Mar 2021 18:28:50 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:37676 "EHLO mail-ed1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232690AbhCaW2j (ORCPT ); Wed, 31 Mar 2021 18:28:39 -0400 Received: by mail-ed1-f51.google.com with SMTP id x21so24086316eds.4; Wed, 31 Mar 2021 15:28:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qO/MnGOAo2aKNNZIMFKn7K57e/u6m6J452MXAoHJnn0=; b=VxVbnybetLd06dvzjpOW7fRjTvptvQ0C9ydDaWd+Tj7B6saGjfrdIOPAL9/cUfjT5q o43IS5hAL25S7NS0tQiBZQcjlJScLBn435uQKeauFeCiH6kmTfOS2kFj1P3c08mrRtvW FMR9yfTsp9fdvEuWh0i1jfVK3CJXkPqReU5w2sJ168yg9xN+PSACNqeMZl/23JtOtRMy VONuR4SjF+wpHNyIl9GOk+9GSY5yydc4txbOF43bbnqcwnfIizBXyYq4etC40Thcx511 nJ12sjzTWOWMJ9p8cyrtts2xpCxhspdDJpBqhdx35CCjxDKOvSKyjej1ZjVx+QucSWu4 iPjg== X-Gm-Message-State: AOAM530u+z8xAahD2aaL/+bdJK+vwr7rs/MLqUeD6muOaQxINCP8BKOi kWkZQz/F2VZeeChIDZ5Mj0NZ3HjZZgc98F6rZV0= X-Received: by 2002:aa7:d917:: with SMTP id a23mr6502007edr.122.1617229718626; Wed, 31 Mar 2021 15:28:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Len Brown Date: Wed, 31 Mar 2021 18:28:27 -0400 Message-ID: Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features To: Andy Lutomirski Cc: David Laight , Dave Hansen , Andy Lutomirski , Greg KH , "Bae, Chang Seok" , X86 ML , LKML , libc-alpha , Florian Weimer , Rich Felker , Kyle Huey , Keno Fischer , Linux API Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 31, 2021 at 12:53 PM Andy Lutomirski wrote: > But this whole annotation thing will require serious compiler support. > We already have problems with compilers inlining functions and getting confused about attributes. We added compiler annotation for user-level interrupt handlers. I'm not aware of it failing, or otherwise being confused. Why would compiler support for fast-signals be any more "serious"? > An API like: > > if (get_amx()) { > use AMX; > } else { > don’t; > } > > Avoids this problem. And making XCR0 dynamic, for all its faults, at least helps force a degree of discipline on user code. dynamic XCR0 breaks the installed base, I thought we had established that. We've also established that when running in a VMM, every update to XCR0 causes a VMEXIT. I thought the goal was to allow new programs to have fast signal handlers. By default, those fast signal handlers would have a stable state image, and would not inherit large architectural state on their stacks, and could thus have minimal overhead on all hardware.