Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp634723pxb; Fri, 15 Oct 2021 12:40:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhD8gOKfSZ58ZNACtGans+LEyaXr4R0MSoBEjBP9Q2xhKvhG7b88eiogW1PpI4Zy/QWdw6 X-Received: by 2002:a17:90a:1657:: with SMTP id x23mr3654536pje.148.1634326859366; Fri, 15 Oct 2021 12:40:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634326859; cv=none; d=google.com; s=arc-20160816; b=aKXt9l1G86nAj9GgFiK2BAQmcM2TwwaTUAjfn3sCHmaqlGl3XklzAWfM+kjmmsoJ1W Vvl8lk8I9gQrs1ddiENgjubobqofn9GsG17NrOesGy0E+CxkeepFCGKU3v/4czI0k7CT rsbvZV/KrqcHk82nuNjNoSCrD6UTHNOM6vxhGMwfJPDyFiys8FXjPbqUnPGKlDUpjE1K ymQNvftiWb50n/LM1v2IiODuKWsqFcGTPUxS2F4CgpIu8vLPYerH9ra8yd/d9V40JWY6 kj5KJ7XVuqILI+J2SSfNaDcDHIOaJp2wUk7wB5NPZlx55EzCFcxhsBkaoBNVBHa268Zs eGjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Wlb45V5A8Kz+I2XPfAf31iLoraQsYB+xMp+K09OrwfQ=; b=oi5oUpqGOOwhgg0O6RalA44DIPJRJPihvWyejjPYBlFKtpvjTdpaUtQRJ/uhZ243ji QlOFZP5PlCZMhzy8aXXmRzT2wP5N1Cnh8gCmohgY6m2A2lug2YM3aDBX1wOPi98goiPw gveo9GTWvjfwGmF6DBgwkhtDeuekiQqqK9b1h7oS8v2iFTIkpmE8y+Z9DN/Gl+EJuyiz hlpjd4BxgDUx1LWhVBkj2t4ndHUtxg0A3hY0lSMI30ppToDfKLs0uGVLgrzYHeP14vWe YrQNoXaB5ljtGJBgOgEroIusEnY4lJbzp5dZi57z2PT4Dh6T61WNjlLDsolxX2UmtR9p GCfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v6r5WEL5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/wJpfc5a"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si1538785pgf.207.2021.10.15.12.40.46; Fri, 15 Oct 2021 12:40:59 -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=@linutronix.de header.s=2020 header.b=v6r5WEL5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/wJpfc5a"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238138AbhJOKwr (ORCPT + 99 others); Fri, 15 Oct 2021 06:52:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbhJOKwp (ORCPT ); Fri, 15 Oct 2021 06:52:45 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF084C061570; Fri, 15 Oct 2021 03:50:38 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1634295037; 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=Wlb45V5A8Kz+I2XPfAf31iLoraQsYB+xMp+K09OrwfQ=; b=v6r5WEL5nQ8VDcA4MiOjTGW08wEGS+VF2L4OKaH+oAX9BNkE9pYGgZ/2bMw9ki7fOV2R2Y UpWalX2+rNCVuq2vW+DKv9c6/7YChyo+JGGDiDcGsCXMqEmA8ECJhXMBVqFBaZOTnVMf3F coU2ALclY/gt/TiMu5ByHrxntWcviwdiR/gdZUcT3+44cJFQHLoBgusAWMSb1DB2MA7e1j HKdWg5Uw91KtkHnXUwTwqGErSCy51KGDAK0+gId4UyotT8ecDwAncmupm0mYyt1N41Coft yQ9w36+CX0GbmjHq2dNzTurkADMSG0hp69AnrVTmKBc6VXvcjbbHPvZshvNaow== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1634295037; 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=Wlb45V5A8Kz+I2XPfAf31iLoraQsYB+xMp+K09OrwfQ=; b=/wJpfc5acJjZ2uFIHmcahvO+iXqBMGuYvL6vEeipZP3A9O7rdi42hGLe4X79K6Y1sq/EP+ 0GaZiRqCcuMU8lDA== To: "Liu, Jing2" , Paolo Bonzini , LKML Cc: "x86@kernel.org" , "Bae, Chang Seok" , Dave Hansen , Arjan van de Ven , "kvm@vger.kernel.org" , "Nakajima, Jun" , Jing Liu , "seanjc@google.com" , "Cooper, Andrew" Subject: RE: [patch 13/31] x86/fpu: Move KVMs FPU swapping to FPU core In-Reply-To: References: <871r4p9fyh.ffs@tglx> <6bbc5184-a675-1937-eb98-639906a9cf15@redhat.com> <87wnmf66m5.ffs@tglx> <3997787e-402d-4b2b-0f90-4a672c77703f@redhat.com> Date: Fri, 15 Oct 2021 12:50:36 +0200 Message-ID: <877dee5zpf.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jing, On Fri, Oct 15 2021 at 09:00, Jing2 Liu wrote: > On 10/14/2021 11:01 PM, Paolo Bonzini wrote: > For the guest dynamic state support, based on the latest discussion, > four copies of XFD need be cared and switched, I'd like to list as > follows. There will not be 4 copies. Read my last mail and think about the consequences. I'm really tired of this tinkering frenzy. There is only one correct approach to this: 1) Define the requirements 2) Define the best trapping mechanism 3) Sit down, look at the existing code including the FPU rework for AMX. Come up with a proper integration plan 4) Clean up the existing KVM FPU mess further so the integration can be done smoothly 5) Add the required infrastructure in FPU core and KVM 6) Add the trapping mechanics 7) Enable feature What you are doing is looking for the quickest way to duct tape this into the existing mess. That might be matching the KVM expectations, but it's not going to happen. KVM already violates all well known rules of encapsulation and just fiddles in the guts of FPU mechanism, duplicates code in buggy ways. This has to stop now! You are free to ignore me, but all you are going to achieve is to delay AMX integration further. Seriously, I'm not even going to reply to anything which is not based on the above approach. I'm sure you can figure out at which point we are at the moment. Thanks, tglx