From patchwork Fri Oct 15 01:15:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12559639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5ACEC433EF for ; Fri, 15 Oct 2021 01:15:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0D82611CE for ; Fri, 15 Oct 2021 01:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbhJOBSC (ORCPT ); Thu, 14 Oct 2021 21:18:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232040AbhJOBSB (ORCPT ); Thu, 14 Oct 2021 21:18:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42DE8C061570; Thu, 14 Oct 2021 18:15:56 -0700 (PDT) Message-ID: <20211015011411.304289784@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1634260553; 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: content-transfer-encoding:content-transfer-encoding; bh=Gpcv+9WEhV29vUM+2+8FV2exABfnYFtsORbVPtdlE/A=; b=gTs4apZg4243x1+jDiccYwtxvqfm/DBh14lm5i2JKqJ3f9v8wsk1GANDkL8s25orXI3CSd r8aGS7C32d/igkryNiMsmLZlw1gUfSMMHdO2EXw1EKzMAxFifF+3MD+K+9vNoOCVT+FEBS hksCYFyIdJYz/qRp4kzjFGr1gmIlqjqfm8pTda7zReOZwmLucnukuU1iWkmXccMoP1L5GG ULDst54P59dQph0y/JtqQRaCEOeN+7TONkfGvBDgEIYVonBgOUXnq1K4F5uSZlFUuqEwOu PUaSAeJsf0vMMouQBunDw521kx7i5etQyriG6xWLF6g8FhL24W6iHjA+GNFYdA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1634260553; 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: content-transfer-encoding:content-transfer-encoding; bh=Gpcv+9WEhV29vUM+2+8FV2exABfnYFtsORbVPtdlE/A=; b=BoyR+p/glWR/6NZF9c751BO3Oi+zQ776UlZVLNsAxdhfQ7lxr92NRLjbecdBEwI7JQ8fzI xeRDNb3WUypCv6DA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, "Chang S. Bae" , Dave Hansen , Arjan van de Ven , kvm@vger.kernel.org, Paolo Bonzini , "Liu, Jing2" , Sean Christopherson , Xiaoyao Li Subject: [patch V2 00/30] x86/fpu: Preparatory cleanups for AMX support (part 1) MIME-Version: 1.0 Date: Fri, 15 Oct 2021 03:15:53 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This is the rework of the V1 part-1 series of the effort to support the new AMX feature: https://lore.kernel.org/r/20211011215813.558681373@linutronix.de This part cleans up existing mess. Historical leftovers, shortcomings and especially the universal kitchen sink asm/fpu/internal.h which is included all over the place for the wrong reasons. This series has a value independent of AMX, but allows to make the integration and conversion to the new world order of dynamically enabled feature bits simpler. The serries is based on: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/fpu and also available from git: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-1 The full series which has the full AMX support included can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu Changes vs. V1: - Fixed the issue in the !XSAVE code path of the kvm UABI copy function - Paolo - Renamed the KVM functions - Boris, Paolo, Sean - Fixed the comments and changelog issues - Boris Thanks, tglx --- arch/x86/events/perf_event.h | 1 arch/x86/ia32/ia32_signal.c | 1 arch/x86/include/asm/fpu/api.h | 31 ++ arch/x86/include/asm/fpu/internal.h | 530 ------------------------------------ arch/x86/include/asm/fpu/signal.h | 13 arch/x86/include/asm/fpu/xcr.h | 11 arch/x86/include/asm/fpu/xstate.h | 6 arch/x86/include/asm/pkru.h | 2 arch/x86/kernel/cpu/bugs.c | 2 arch/x86/kernel/cpu/common.c | 2 arch/x86/kernel/fpu/bugs.c | 2 arch/x86/kernel/fpu/core.c | 161 ++++++++-- arch/x86/kernel/fpu/init.c | 29 - arch/x86/kernel/fpu/regset.c | 6 arch/x86/kernel/fpu/signal.c | 21 - arch/x86/kernel/fpu/xstate.c | 172 ++++++----- arch/x86/kernel/process.c | 6 arch/x86/kernel/process_32.c | 5 arch/x86/kernel/process_64.c | 5 arch/x86/kernel/ptrace.c | 1 arch/x86/kernel/sev.c | 2 arch/x86/kernel/signal.c | 1 arch/x86/kernel/smpboot.c | 2 arch/x86/kernel/traps.c | 2 arch/x86/kvm/svm/sev.c | 2 arch/x86/kvm/vmx/vmx.c | 2 arch/x86/kvm/x86.c | 192 +------------ arch/x86/math-emu/fpu_entry.c | 2 arch/x86/mm/extable.c | 4 arch/x86/power/cpu.c | 2 b/arch/x86/include/asm/fpu/sched.h | 68 ++++ b/arch/x86/kernel/fpu/context.h | 85 +++++ b/arch/x86/kernel/fpu/internal.h | 30 ++ b/arch/x86/kernel/fpu/legacy.h | 115 +++++++ b/arch/x86/kernel/fpu/xstate.h | 198 +++++++++++++ 35 files changed, 824 insertions(+), 890 deletions(-)