From nobody Wed Dec 15 01:55:13 2021 X-Original-To: dev-commits-src-branches@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 44A6818E4E7F; Wed, 15 Dec 2021 01:55:14 +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 4JDJGn66nNz4RsS; Wed, 15 Dec 2021 01:55:13 +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 B00AB13C00; Wed, 15 Dec 2021 01:55:13 +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 1BF1tDQk031678; Wed, 15 Dec 2021 01:55:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BF1tDFp031677; Wed, 15 Dec 2021 01:55:13 GMT (envelope-from git) Date: Wed, 15 Dec 2021 01:55:13 GMT Message-Id: <202112150155.1BF1tDFp031677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ac7f6d240079 - stable/13 - x86: add a comment providing source for numbers in legacy XSAVE area layout List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ac7f6d24007949fb8ac951a7ff86d9da388004bb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639533313; 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=vTmqHOvxHBbiRT/S1/4UDqoJa59g0awVZThjRDIBoz0=; b=YmocdXCxy54RJ+02t9QjULCpzU2We11mznbiyYMzOFkctYHXZ/ylHXHLA36XoOuTusm/5K EsCiv+H5eulkhZnyr2xN0YhLudqe1GbLS4/QmMsoWOIwUDY8YrPcpOxL4H7d2h0X12+lUZ MJ7vGrEnZzsI6lOT1jaI4TmQcwo5v/dSQzkpEE7H7ZQ1j5Oo3FHehfcOv380ncPD2651ti xOBg3pMySHbmaTztMQ+xDdjKvao/KmKpXUAnUxy62Dcr5rgeGkajF26X7Xd3vxGILzEiE6 SkQBDrhoSQpzdnuy5xReqXOyJ/nia1rYpMdvkN30l4JpQIuVEIZn0S6mhmYV/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639533313; a=rsa-sha256; cv=none; b=PdAfN88oo0PRGDKkzMTHsrZNMkx9XF5Od4QWErrMoDm+eEscAMofA4psxiFnjMBONl2ICj RoFmULFF9kOFAXCvMDMGOpJxAjbe1r5zpjCdcauLzZfZ1gFJbq8MVn/hqgzD/jTEVD0kH6 /yi/6wgwiTI8Idel2T8RhymjeDbNlO9lfrGH5E95KS3VuFIDkVGI9aq6xwSHtFJib8X3rZ xsis8hd9tJrY+YOPHPgD64BwLVr0J7nSN+gPaiCWsVBTCU5LBDdtQwBKlHDBMXE5IXhL/6 KctzdSsuDtMZfWh18z1y/Zc21lhAT28v0DZaE78GIH27qXt/OQloXzovTD9UJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ac7f6d24007949fb8ac951a7ff86d9da388004bb commit ac7f6d24007949fb8ac951a7ff86d9da388004bb Author: Konstantin Belousov AuthorDate: 2021-12-13 23:25:36 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-15 01:41:29 +0000 x86: add a comment providing source for numbers in legacy XSAVE area layout (cherry picked from commit 0e6b06d5c8719597b2ec59e6856b5decbd9e65f6) --- 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) +