From patchwork Wed Mar 22 20:14:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 73665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2561293wrt; Wed, 22 Mar 2023 13:44:48 -0700 (PDT) X-Google-Smtp-Source: AK7set+vKGSLOFnFW8JeS24bnzFWWcEJ9wcGFA6z9HG+Jp1XFHiWboZTr1fvH46gIOP4jQ9uQh+K X-Received: by 2002:a17:906:55ca:b0:933:1b05:8851 with SMTP id z10-20020a17090655ca00b009331b058851mr8697953ejp.16.1679517888747; Wed, 22 Mar 2023 13:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679517888; cv=none; d=google.com; s=arc-20160816; b=h3vF0q1YBBWSaeeQMj6by0ivEByp7KBoKwQ/3oxzPCWz6KO9NqpHBX9gWaJkZeKNUz pR/kIToQcsMdwy+YBwPlbrV+FwZxgb4hBXtcMlaRbZ3AjYYOKPY2t2/zQ1KAWcWWyU1U t0NqxvhdgiXdqMIX96AKsQzoz56MW2yHtunwPonxfV4xZ8vctEQS7jqVrgJU56FDnbIT SFv8pRC8F/Nzs1CYG0bNcLEG+zuU2u2h4KXXGWDDaCW6vEGdH/Dg8K8xGhWocMqmUw7e 52T1rn0qXSv/0H6QSc38gmbsfEN/FC9hog1jY8l4/keko9MEqhr0CszdlxYTsCodYAMv fz3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=TErJKltRRstNh1nsERKmjUwCIWoOFhKcp8MuDg4CLfI=; b=cG1+Rg8CB72vzV3PEiQUE1dOqFoTuHzXtYIjUzABpkNw49DVsxYXLnmkU62NXF+4f2 u5NjBmhdoSIBnxJvnP+bHifboDBmpHcmqvGGPaZ5R7v+mhaeq0DVnZvMnBgdAbQKtxhf 9aeoWql1Zz6ThNRHQiJjYVuYd21ndqI56m5uRIHeZwtzxLiD57/B51Q0fj1bmh3T4mKd vubmwnTAhc0Feo0oainqMl+iQrj8aH33mJgGoxH5zRGrtu3EPP1CvMfy7XwYNxwMKeKC pj/9AFIEJK681eIOanNcNE4e78E42AQmu0T6gShwEOVuxn3h7gg4Y2LkUuLFxUzrFQyN ZdnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Kgg7TCMU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a170906688d00b00926f64a9e55si134015ejr.898.2023.03.22.13.44.24; Wed, 22 Mar 2023 13:44:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Kgg7TCMU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231614AbjCVU00 (ORCPT + 99 others); Wed, 22 Mar 2023 16:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231571AbjCVU0J (ORCPT ); Wed, 22 Mar 2023 16:26:09 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF5D75AB74; Wed, 22 Mar 2023 13:16:14 -0700 (PDT) Date: Wed, 22 Mar 2023 20:14:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1679516094; h=from:from:sender:sender:reply-to: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; bh=TErJKltRRstNh1nsERKmjUwCIWoOFhKcp8MuDg4CLfI=; b=Kgg7TCMUj05ZnWczCzjkfiokximoI9V8+46Lx+ASSnZpAUZq9A+VYpdqdpXgoiNEPQ7qH1 MuLnzq1f6h3K1zwRME3tQOoEUY9gY4hImGylCbpQWBPB3fXAc81I80UbkyjJzymOUTo7jo gjYrl4raU0JUEfOIbOxNStjEP274vAUrJOGhDDWGrlGKuR3ciL+Ne+zrBTl3N5lAnoetpC s2gsN8KzbwX+YnFCICmFbhivlPm7ivBhpUpp96Tqd067HP0xPSwv4edK6EW/+aB02rasbi sDIwJpCubWB59HtDBFjZvgkzu62qTXFbNQKn+7gQ2ZZb8UfYF6IPTPvygo1s3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1679516094; h=from:from:sender:sender:reply-to: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; bh=TErJKltRRstNh1nsERKmjUwCIWoOFhKcp8MuDg4CLfI=; b=BR3Se9awzv0EntM16dQ5Q4RMpZiUowgzlacasZwrm0AGCYznWJlgkwtXu+asjjIIdb0/cY iKTN+dh2nGXz2KDg== From: "tip-bot2 for Chang S. Bae" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/fpu] x86/arch_prctl: Add AMX feature numbers as ABI constants Cc: "Chang S. Bae" , Dave Hansen , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <167951609395.5837.17233221474519558802.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761102149844475190?= X-GMAIL-MSGID: =?utf-8?q?1761102149844475190?= The following commit has been merged into the x86/fpu branch of tip: Commit-ID: a03c376ebaf38394a63a75292329f38a47520c2c Gitweb: https://git.kernel.org/tip/a03c376ebaf38394a63a75292329f38a47520c2c Author: Chang S. Bae AuthorDate: Fri, 20 Jan 2023 16:18:58 -08:00 Committer: Dave Hansen CommitterDate: Wed, 22 Mar 2023 13:02:33 -07:00 x86/arch_prctl: Add AMX feature numbers as ABI constants Each distinct XSAVE feature has a number assigned to it. Among other things, the number determines the ordering of features in the XSAVE buffer and is also used to generate XSAVE bitmasks like the value for XCR0. AMX state is dynamically enabled by the architecture-specific prctl(). This prctl() takes one XSAVE feature number as an argument. However, the feature numbers are not defined in any readily available userspace headers. The means that each userspace app trying to use dynamic feature prctl()s will likely end up defining their own constants for each feature. Since these feature numbers are a part of the uabi, expose them in the prctl() uabi header. Save everyone the trouble of looking them up and defining their own. [ dhansen: expand changelog a bit ] Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Reviewed-by: Tony Luck Link: https://lore.kernel.org/all/20230121001900.14900-3-chang.seok.bae%40intel.com --- arch/x86/include/uapi/asm/prctl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/include/uapi/asm/prctl.h b/arch/x86/include/uapi/asm/prctl.h index 500b96e..f298c77 100644 --- a/arch/x86/include/uapi/asm/prctl.h +++ b/arch/x86/include/uapi/asm/prctl.h @@ -16,6 +16,9 @@ #define ARCH_GET_XCOMP_GUEST_PERM 0x1024 #define ARCH_REQ_XCOMP_GUEST_PERM 0x1025 +#define ARCH_XCOMP_TILECFG 17 +#define ARCH_XCOMP_TILEDATA 18 + #define ARCH_MAP_VDSO_X32 0x2001 #define ARCH_MAP_VDSO_32 0x2002 #define ARCH_MAP_VDSO_64 0x2003