From nobody Tue Dec 14 17:14:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 08F7718EA3BC; Tue, 14 Dec 2021 17:14:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JD4kJ5PMrz3p9G; Tue, 14 Dec 2021 17:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9930F4529; Tue, 14 Dec 2021 17:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BEHEm2V034574; Tue, 14 Dec 2021 17:14:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BEHEmKM034573; Tue, 14 Dec 2021 17:14:48 GMT (envelope-from git) Date: Tue, 14 Dec 2021 17:14:48 GMT Message-Id: <202112141714.1BEHEmKM034573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0e6b06d5c871 - main - x86: add a comment providing source for numbers in legacy XSAVE area layout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e6b06d5c8719597b2ec59e6856b5decbd9e65f6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639502088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mr0hcQXINVk97Q2UwJhSmR/EbkTFiaiamm7hw0i2ONs=; b=cPi3U0MDxF5EYnBn99DSyu8hGoqaTImrb2REFNIDFA14lSiAW31iaCTF8uV+3qPnzepqH6 8rkFeSATjWY+Tpba//q8masGUFbho1nKywmlxaqdrlSp16X9F7D2Qoub2lP6+5ccz9L84B hXwPCooLTrEMWdU7XWoCk0eIHr/0VyPK8tRq5O+2hxMwdjGTz2J6U5zF7K1aREzfEEKZZ9 zH4DY0xs5qTq+kL3LxjjW512AcFdTsrt+iPIgAK7udgHDSfwu6Le78hBzXdf33NVtvJxCt S8jW3a60nizUc7YRvx9Po+yBzFph32927he1J+Oe3ZehUEjjQmsSpM2dBOOzzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639502088; a=rsa-sha256; cv=none; b=a1JZj376SdrRloEDy/WDE+3UKMXmV0Kx+woIMI6GkWzoMDgfoov/JRh5Ac1Mnk9T51cd1R 3zWOXcs/+rbSQ6ZE7Z4s/95ccwHCVX8WJ88ZmgOl+5vVvl+DkppsA1p+Zv6dUVYSzDwwet X9zWaAyR+sZvmxd7ZF4hLxbw8Oq2sfexYlXhb59JwN0WBQauy8C6qxqAfJ/mU7njbmD2ki 6brOANrYCLvEGSL+dDCKeFORjppA7mw5r7yXdK+mREg0xEQIyJNU7OPElH65QWB0IDGdTJ PJuLcYaltyXGTZsEdJTRz2e/4Hjpd0wk43NetbpMr6IOA6CiLCDpWDWUiw58Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0e6b06d5c8719597b2ec59e6856b5decbd9e65f6 commit 0e6b06d5c8719597b2ec59e6856b5decbd9e65f6 Author: Konstantin Belousov AuthorDate: 2021-12-13 23:25:36 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-14 17:14:40 +0000 x86: add a comment providing source for numbers in legacy XSAVE area layout Suggested by: Michael Pratt Reviewed by: Michael Pratt , emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D33423 --- sys/amd64/amd64/fpu.c | 3 ++- sys/i386/i386/npx.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index daf079b7d2cc..9b23cc5773a3 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -472,7 +472,8 @@ fpuinitstate(void *arg __unused) /* * Create a table describing the layout of the CPU Extended - * Save Area. + * Save Area. See Intel SDM rev. 075 Vol. 1 13.4.1 "Legacy + * Region of an XSAVE Area" for the source of offsets/sizes. */ if (use_xsave) { xstate_bv = (uint64_t *)((char *)(fpu_initialstate + 1) + diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c index 4767d8896de9..dc04d84b0eb5 100644 --- a/sys/i386/i386/npx.c +++ b/sys/i386/i386/npx.c @@ -527,7 +527,10 @@ npxinitstate(void *arg __unused) /* * Create a table describing the layout of the CPU Extended - * Save Area. + * Save Area. See Intel SDM rev. 075 Vol. 1 13.4.1 "Legacy + * Region of an XSAVE Area" for the source of offsets/sizes. + * Note that 32bit XSAVE does not use %xmm8-%xmm15, see + * 10.5.1.2 and 13.5.2 "SSE State". */ if (use_xsave) { xstate_bv = (uint64_t *)((char *)(npx_initialstate + 1) +