Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp478448lqo; Wed, 8 May 2024 06:00:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVN3KspxA69nc5LzEvtb4su+B84rcm/B2FlPRBp2s/bvpeCs5F7xA2PdRp8fGdXqRRH9voXQHb5dmJlMQsaV4iwkEL6yJ0ZqlGLJce9Xg== X-Google-Smtp-Source: AGHT+IFAqVrtJ6roBgpl0TdokMPffUxHi1iPnQWTdDNawCpTb48UdoYD0vy0DTXiZwa3SCz3HC5V X-Received: by 2002:a25:ac60:0:b0:de5:d8d3:e288 with SMTP id 3f1490d57ef6-debb9d890c3mr2443850276.24.1715173228985; Wed, 08 May 2024 06:00:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715173228; cv=pass; d=google.com; s=arc-20160816; b=mpCYmkPFeETbqKRP7R49mAPJfjLhZU4KyXTUw6toEOzoV8NaYZTZyFHr9zugMHGuPg iuaLHz9nbwDpn5z0UFhYonbWcafS7yNLHP3dEabezFkJXUlwK+MMC26rLvK6MjneznqT hNFVBiMQs2IvYspKoILbAGZaFpaNIou0PVQi+uJFpJgzQdgh069MbbsJUGLYu3xI3eZS 7INrYaEXFlR2vMH5Dma5AnUZBJ9w0aHOWh2KqbHudb/5utfurD30yuAWvQMqZH1I/RvU vODD6EmMjZuK3sroqUI/5JfGf3hN0NcZlExb5+mge4vqGisx/UPUl7dtSXqUphAtWPO/ KmgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=uPhuL3UM5yIxpg2EhK/QKw4q/Os8hXdmW0AhRhBQxVo=; fh=K416oqi1sFQG7dxNXpxO6rHGDPulcPj9oXBw/gcl7OE=; b=GdDoIXoZ7Ce7dDY8w9Weh/zIex0ElBP1pXpOWCmWscI1BMe7OsSicU2V7FGmYL6saC aarzG5K+gTBP0VopEMuzsRAAdHhRkZFRI+/gZJ4bopbOVsEbfE5lLDWfcclCDkIKE5cJ zB8IERtCIPR40LvPkjaRMqtWEpm8vrA/bUlm7RJifty7X+406pNZj5DABD0b15TQ24vG bDr/kdUlHg3HGa7OF5bGnK4BgqIxH32jBhRtANLmSI/RGLvu0yqQYMCqkipJidkoelz/ 20RvX81f1wNwDcQwIQ7LRotnSJcCJxRR8DNITKg7thVgFcIPW48lnTEemOgAJyyM0d8x JaaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=RsIxO76q; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-173264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c2-20020ac87d82000000b004313889961dsi13782819qtd.557.2024.05.08.06.00.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 06:00:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=RsIxO76q; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-173264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7B0A71C21068 for ; Wed, 8 May 2024 13:00:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 368035F861; Wed, 8 May 2024 13:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RsIxO76q"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VILWxv3Y" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 172FD55E40; Wed, 8 May 2024 13:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715173222; cv=none; b=DbQ40hWofX3UV3paWxkmazEsMd98E4vbH4L1BVPjOIXd/lTR9XGHTlKodw2phLXkQkF1OuD4IP8IbAL43qLm+7Z0O5uMcl2TWKUznhRjAdyYvWuSQ2lyTBDkqFpZJfdpzHqNffhUUnkxcgEbSUwCbykrg97PMMZ+OErSJcGNCOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715173222; c=relaxed/simple; bh=VL/B/S5LHPg1SxdBK+Kgk3Vm5npaZzfKR8tx7ySUJDI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=rS5vOuCWdhtFGY6D8s6EQ7Fzepxs3aHgS4iZVI7mfy99t2QJnknjKjsCtVJ4SZEAEePito0ITIQ9kYYGRsjOcBFCxUJx0/fYzYlESTHcILPrQ7ioLfrpQ+isXcLK9Ofkd6qGupNm13ZoXgdFgfznc1VI/BAUOYl3VFFFeCXzsW0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=RsIxO76q; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VILWxv3Y; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1715173219; 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: in-reply-to:in-reply-to:references:references; bh=uPhuL3UM5yIxpg2EhK/QKw4q/Os8hXdmW0AhRhBQxVo=; b=RsIxO76qBJhkUwxYZzk0EZmrqcaXa6TGwgA9yhn1OFnCCiX+vM+Rjaet+sA3uKeW9jlZ/I YBMnet4OmVvC4HTj6h/wnH7MYzNejU6crko2WY9cTsYBBoXSculbnI6VxD5vuywJMLxB/U R/4qj7RNq2IEbkjCawwFidS20dNbgEVMAGAXFz/omasMc+CG083Isx332CmP43Jfadj9g9 TPSogDBLLteOTLyeXKBPzsuI7OQzFL1wh9HQQmLRIFcuWN2tJHQxMN2A+c2w2mWzrsmmTU ZDPHZzZd+FyBYF49M9X+4c8QLLYEuAF5274MdsPgJ9xbOMBsVZTqS/pSx4CeJQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1715173219; 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: in-reply-to:in-reply-to:references:references; bh=uPhuL3UM5yIxpg2EhK/QKw4q/Os8hXdmW0AhRhBQxVo=; b=VILWxv3YDTYeJXbdLujOFah1LUVELZzQ+nIsfI2L9cDhNN6gHXB3rv+AeLxvQ+tCbKQfk1 jIIj9Aev4bV2EzAw== To: "Chang S. Bae" , linux-kernel@vger.kernel.org Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, tony.luck@intel.com, ashok.raj@intel.com, jithu.joseph@intel.com, chang.seok.bae@intel.com Subject: Re: [PATCH v2 1/2] x86/fpu: Extend kernel_fpu_begin_mask() to initialize AMX state In-Reply-To: <20240507235344.249103-2-chang.seok.bae@intel.com> References: <20240430212508.105117-1-chang.seok.bae@intel.com> <20240507235344.249103-1-chang.seok.bae@intel.com> <20240507235344.249103-2-chang.seok.bae@intel.com> Date: Wed, 08 May 2024 15:00:18 +0200 Message-ID: <87y18ko3vh.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, May 07 2024 at 16:53, Chang S. Bae wrote: > diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c > index 1209c7aebb21..04cc6f14ca42 100644 > --- a/arch/x86/kernel/fpu/core.c > +++ b/arch/x86/kernel/fpu/core.c > @@ -440,6 +440,9 @@ void kernel_fpu_begin_mask(unsigned int kfpu_mask) > > if (unlikely(kfpu_mask & KFPU_387) && boot_cpu_has(X86_FEATURE_FPU)) > asm volatile ("fninit"); > + > + if (unlikely(kfpu_mask & KFPU_AMX) && boot_cpu_has(X86_FEATURE_AMX_TILE)) cpu_feature_enabled() please > + restore_fpregs_from_fpstate(&init_fpstate, XFEATURE_MASK_XTILE); > } > EXPORT_SYMBOL_GPL(kernel_fpu_begin_mask);