Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3600388pxb; Mon, 4 Oct 2021 05:56:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgvn/ZrJvDiBmvt5FKO9fdUMnA00HQkef6ALOR2XfuVwDMUTf71F2Od9BPvq3zfKWJIU2f X-Received: by 2002:a17:90b:388a:: with SMTP id mu10mr13138318pjb.0.1633352192798; Mon, 04 Oct 2021 05:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633352192; cv=none; d=google.com; s=arc-20160816; b=JobpvhpZTqvvRBOjSTHV8nyLPlPZ8aWNdigSi6d1ecgEF9Z78vLNwaTvzOuZ1c8qKM ddtbqjYCtLY52hfSV3E+dDMmuuJfwg87bo2Jae8jTukPhTQtnVxK/ZQqWPoWxpaWLnND VPTMfeJIRNx93yr4Q7h5CCaLwvjD/8U3PpUy2j23lZeqP2lKTMecWJ/W9mGkJs3Pf3Xs tEM0YBevn1UEwOkwJF9RCL9AjGjqtkDIR+seydzJKFp5l5uHZVogJwacutpOGe3qj474 +HtVVKRiZlE2FkAY+o43Q7vKmTP07R+YpfTYo6yS87pvZiT12SnD7gP6GFTQ6igC/0hV 9W7Q== 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=62OmEZ5vBf0VS7xxv6zBKLiA9bAGxIWLY0YLtcYhdkM=; b=RBAnkCPzpc/h6NP4srcQ8JniQ+fvl0MCK4caik3Er76vqDL/6bT935kNTTeYOB78wz QU5CvipRoFpTJrE8vF3AD3yOTr3e3W4TJ3EO9pzfJzxiiT0HMMBXDuxEdJTdz6ZpACfT ttIor3U9PNRju44nKLvb61+oNT4Lpt7vxWZFSiYKjSY0ZD6TWuGJ3fRrNpNZ/MXWBGkB HjlEjOOYYh5arCaMXRJrWScSgTQMGJKwRhy1G+TZo2MOVWJT3Q6lHIdGeDl6sOtH7AvY edrhey/G5ZHxVC2fo2KHEAqlIoxKlge50JCBk9CfuColBFV89PyK72FyO4UGgYrZzd+8 MYtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=BZIffpy1; dkim=neutral (no key) header.i=@linutronix.de; 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 my17si21027259pjb.136.2021.10.04.05.56.17; Mon, 04 Oct 2021 05:56:32 -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=BZIffpy1; dkim=neutral (no key) header.i=@linutronix.de; 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 S233606AbhJDM5B (ORCPT + 99 others); Mon, 4 Oct 2021 08:57:01 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:44062 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233584AbhJDM4j (ORCPT ); Mon, 4 Oct 2021 08:56:39 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1633352089; 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=62OmEZ5vBf0VS7xxv6zBKLiA9bAGxIWLY0YLtcYhdkM=; b=BZIffpy133/yzNOScRB4BBhPtTdvlG4VHFT6aZjnljPIqh/ysKiOm/7OZTD02DYnvI1SjN i5F6qCN5rZi8Lji1arf7u3RrZH2KIErZc4bmy5vPlHFwEVENtUOZdqm3mbxE6nTnxhhkq4 xTvT33qc49lnNJVQTh8fAv07ImjxpKjibNatVEQ2wiMhNIg00fL+r55nQOHjPRPeh1LogB P8dgTC4XTJtvDgj9FoXg8cG0tS4aZ5SBtY1QxCQ2QalO8zIyPLd/mJ8UCImKbGl7mK+aPV IKAtOQXaNKqaGDk/PxLqPsVt/UxGE0yWrsQfX4V0Q7dYjsfiRu56ka2q6+z9ww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1633352089; 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=62OmEZ5vBf0VS7xxv6zBKLiA9bAGxIWLY0YLtcYhdkM=; b=R77QosgLqt29Za3iflfHfOxMjgQ94okqHVkr0qsGCn66EWopBVj/iq/XR5cY7/mkL8PALl mKs0DkwF20nYcrCA== To: "Bae, Chang Seok" Cc: "bp@suse.de" , "Lutomirski, Andy" , "mingo@kernel.org" , "x86@kernel.org" , "Brown, Len" , "lenb@kernel.org" , "Hansen, Dave" , "Macieira, Thiago" , "Liu, Jing2" , "Shankar, Ravi V" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" Subject: Re: [PATCH v10 04/28] x86/fpu/xstate: Modify address finders to handle both static and dynamic buffers In-Reply-To: References: <20210825155413.19673-1-chang.seok.bae@intel.com> <20210825155413.19673-5-chang.seok.bae@intel.com> <87ee946g45.ffs@tglx> Date: Mon, 04 Oct 2021 14:54:48 +0200 Message-ID: <878rz9gdbb.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 03 2021 at 22:35, Chang Seok Bae wrote: > On Oct 1, 2021, at 06:15, Thomas Gleixner wrote: > > Okay, a NULL pointer is odd and it as an argument should be avoided. Defining > a separate struct fpu for the initial state can make every function expect a > valid struct fpu pointer. > > I think that the patch set will have such order (once [1] is dropped out) of, > - patch1 (new): a cleanup patch for fpstate_init_xstate() in patch1 > - patch2 (new): the above init_fpu goes into this, and > - patch3-5: changes arguments to fpu, So actually I sat down over the weekend and looked at that again. Adding this to struct fpu is wrong. The size and features information belongs into something like this: struct fpstate { unsigned int size; u64 xfeatures; union fpregs_state regs; }; Why? Simply because fpstate is the container for the dynamically sized regs and that's where it semantically belongs. While staring at that I just started to cleanup stuff all over the place to make the integration of this simpler. The patches are completely untested and have no changelogs yet, but if you want a preview, I've uploaded a patch series to: https://tglx.de/~tglx/patches.tar I'm still staring at some of the dynamic feature integrations, but this is roughly where this should be heading. Thanks, tglx