Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3958859pxb; Mon, 8 Feb 2021 04:40:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzT9r33PniY0OuvRiycz79vjnZycFxMJCOjHoVcpVN4rnwGi9aducdM+bCMThoE3CuK9Nqq X-Received: by 2002:a17:906:fcb5:: with SMTP id qw21mr16672474ejb.391.1612788053460; Mon, 08 Feb 2021 04:40:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612788053; cv=none; d=google.com; s=arc-20160816; b=dSYovcODx3cyKaLY4lb4lpN80uJcTknoJW6RB8P2LTUUemk0sBLHnP6wQUKUd106So RhJBLuOmWQISMyJn/ExwQOIMYbIrxSkkkTaV0gduuZXI/d6APoAUErL3DhkG7rbfCvbN XxfQakmzyRdYy1cj98XpnMaIroL36odOh2eew6JaC7VI8p8tvRE+ODkc/w4RQQOhX6eA a8cv3+RiN67/H5Tczh5Wb5g+eNrYEQp/KRFzvsH9r3DBDefgTogH+jxOZgy3BC7Ugrfz cOuMZZBRAzMvuxn+3fv78hP3+6ueKH28KPfSaPj5+VMb8oW2pNoIqmXqVUJq4keH5ene zQDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zd//wAk/qrYIje3AZ9VsUaOmF3wO8Y72a7C8lRAaPcw=; b=AhQmoR9PJJrwc2I+8yxUTAzIljS1CIXN4uxmphW5dDRUh78bvDCnzedFBv4zik3E9F scLFcJ55sbQhBWkIn1cPmkQ4DPqHvHpGdZCffxLUMB3rP2zTIjYBXMg3AZnoC/gpTRHz yCWKu68iAnMPGq1/F62F0qF1N/wmo68oadGDZNjcwClOL9zAB8oE/kI0xAv3EPVWZt3w S9mfiduk/IkmpjiDwVtmEESGizwIR9jaCWDmbiAI7eAZqYWjQodaSOIyc0u0h6kyH3uH GQO2MPxJ8oDXZjStD0jflX0ekAqUQYs2df8tm1/KmCTabMYIlX53TcguLHzIuyBbV9qc KOBw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si11717620ejg.99.2021.02.08.04.40.29; Mon, 08 Feb 2021 04:40:53 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231699AbhBHMj5 (ORCPT + 99 others); Mon, 8 Feb 2021 07:39:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:41854 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232195AbhBHMem (ORCPT ); Mon, 8 Feb 2021 07:34:42 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 179FEB0D1; Mon, 8 Feb 2021 12:33:58 +0000 (UTC) Date: Mon, 8 Feb 2021 13:33:59 +0100 From: Borislav Petkov To: "Chang S. Bae" Cc: luto@kernel.org, tglx@linutronix.de, mingo@kernel.org, x86@kernel.org, len.brown@intel.com, dave.hansen@intel.com, jing2.liu@intel.com, ravi.v.shankar@intel.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v3 10/21] x86/fpu/xstate: Update xstate save function to support dynamic xstate Message-ID: <20210208123359.GG17908@zn.tnic> References: <20201223155717.19556-1-chang.seok.bae@intel.com> <20201223155717.19556-11-chang.seok.bae@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201223155717.19556-11-chang.seok.bae@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 23, 2020 at 07:57:06AM -0800, Chang S. Bae wrote: > copy_xregs_to_kernel() used to save all user states in a kernel buffer. > When the dynamic user state is enabled, it becomes conditional which state > to be saved. > > fpu->state_mask can indicate which state components are reserved to be > saved in XSAVE buffer. Use it as XSAVE's instruction mask to select states. > > KVM used to save all xstate via copy_xregs_to_kernel(). Update KVM to set a > valid fpu->state_mask, which will be necessary to correctly handle dynamic > state buffers. All this commit message should say is something along the lines of "extend copy_xregs_to_kernel() to receive a mask argument of which states to save, in preparation of dynamic states handling." > No functional change until the kernel supports dynamic user states. Same comment as before. -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg