From nobody Wed Sep 21 09:30:04 2022 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 4MXY6P0HcTz4cryD; Wed, 21 Sep 2022 09:30:05 +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 4MXY6N6bCsz3ZXf; Wed, 21 Sep 2022 09:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663752604; 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=cZYkUMXplImmQLYNyfvSQJ39ZNXomUeO9pxc2VwLOI8=; b=ecie4jLTWN6tQ/0GQUB0LcBcTINUCd9rkmUboi6QqFaQNaS8bc/884WI4NUKrflOd5ydSE 1hkHnMT756iSGNGioaaeLl8jnxT0cwdF7A55ceFvr9pYMfe98wbxTGc1LMaaKapEshv53m BV1KweggsYaU7WWXlM5hG8580/zo57XvjcCw+oAHgl5xVu/bAjbWvXxnoFKj3R1Ooy2CzY JkD65zTlXNwlCXPzw93WcHf557ZNBagLLN0KhSzvoq2mZOseXqmO62aVCtr1KwmW+m+qCA HPo0o2a3IjM7wOlwWTi98whPF0rd8Scojj7bbwH1WIjjI4JxM0xoYPma2aP6ug== 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 4MXY6N5fP7z11tJ; Wed, 21 Sep 2022 09:30:04 +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 28L9U4i6054055; Wed, 21 Sep 2022 09:30:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28L9U4CK054053; Wed, 21 Sep 2022 09:30:04 GMT (envelope-from git) Date: Wed, 21 Sep 2022 09:30:04 GMT Message-Id: <202209210930.28L9U4CK054053@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: bfca5cb04061 - stable/13 - i386 copyout_fast: do not use trampstk for temporal data, reduce ucr3 region 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/stable/13 X-Git-Reftype: branch X-Git-Commit: bfca5cb04061ab4bfb1c1e617df1c14d4d82d56d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663752604; 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=cZYkUMXplImmQLYNyfvSQJ39ZNXomUeO9pxc2VwLOI8=; b=tHTDmWbN1NMJl9pioFh3LZoxPTBJuAViq1TPwTI052tqDbCQvICBxHEZ+W9fDpnZ2iMPZv FSiQStZCydk9t2xWFcnCPYHL8CAOdJaq3Uoo67I7sCDLwU2t6aT653IL9SocjsC8eO8qxv uRPX5z6rMa8MU92OOFA66xzHtZ7OwdYVFsE7NeJ4W4ErKgz2/NJSe5a0DxhrUTN5/K4Tu6 u1YDKQLpL0ByP2xD8qzwrFY18TpbOKKRI+fdloiAEqbUwowTYSeDgdfjdQBIxQDdAanJbJ /ikP+NQPKEHl0BXo7+VUgq77W2jryXqFadNYVIVsAD4Rdh4D1jR+jwMePsrLMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663752604; a=rsa-sha256; cv=none; b=H6Dymqo9s75kv+5ikZ1ltsjW2yLWftBFsRMdZyeDjovQ3WOC0Duyc4CjH60FqjRbnmnC0D 8cK7hab0zBZJ8lrLoeJi3b3EiWybuCi3eM4frEJ5/Gobd/x1Tc91XGo+lOgC7cgSQKyICE mjBQiyMciv685VJjOtu8/gqIecNRHrQyEhdBPD83pLfINnkowRXr3kFTA3IOB/5PSKut77 ONlcUwyI53LFHyCPaBf5UYeMDQ7FWG/HZw58H6GVDRm74px/ReydiIJ2ptzems//RttFtK VSOXySoFzcvS9QXARZhTavJ2AwnX+MzANJNpvFa5mcHWi8TDw8qq6S7I94np2g== 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=bfca5cb04061ab4bfb1c1e617df1c14d4d82d56d commit bfca5cb04061ab4bfb1c1e617df1c14d4d82d56d Author: Konstantin Belousov AuthorDate: 2022-09-05 07:06:15 +0000 Commit: Konstantin Belousov CommitDate: 2022-09-21 09:29:01 +0000 i386 copyout_fast: do not use trampstk for temporal data, reduce ucr3 region (cherry picked from commit 53133503740398fbfc770dfdf4d7e123075a241f) --- sys/i386/i386/copyout_fast.s | 101 +++++++++++-------------------------------- 1 file changed, 26 insertions(+), 75 deletions(-) diff --git a/sys/i386/i386/copyout_fast.s b/sys/i386/i386/copyout_fast.s index d1d17f775872..70647fe7613d 100644 --- a/sys/i386/i386/copyout_fast.s +++ b/sys/i386/i386/copyout_fast.s @@ -46,53 +46,27 @@ ENTRY(copyout_fast) pushl %edi pushl %ebx - movl $copyout_fault,%edx - movl 20(%ebp),%ebx /* KCR3 */ - - movl PCPU(CURPCB),%eax - movl PCB_CR3(%eax),%edi - + movl 20(%ebp),%ebx /* KCR3 */ + movl PCPU(CURPCB),%edx + movl PCB_CR3(%edx),%edx /* UCR3 */ + /* bcopy(%esi = kaddr, %edi = PCPU(copyout_buf), %ecx = len) */ + movl 16(%ebp),%ecx + movl 8(%ebp),%esi cli - movl PCPU(TRAMPSTK),%esi - movl PCPU(COPYOUT_BUF),%eax - subl $4,%esi - movl %eax,(%esi) - movl 12(%ebp),%eax /* udaddr */ - subl $4,%esi - movl %eax,(%esi) - movl 16(%ebp),%eax /* len */ - subl $4,%esi - movl %eax,(%esi) - - subl $4, %esi - movl %edi, (%esi) + movl PCPU(COPYOUT_BUF),%edi + rep; movsb - movl 8(%ebp),%eax /* kaddr */ - subl $4,%esi - movl %eax,(%esi) - movl PCPU(COPYOUT_BUF),%eax - subl $4,%esi - movl %eax,(%esi) - movl 16(%ebp),%eax /* len */ - subl $4,%esi - movl %eax,(%esi) + movl 16(%ebp),%ecx /* len */ + movl PCPU(COPYOUT_BUF),%esi /* kaddr */ + movl 12(%ebp),%edi /* uaddr */ movl %esp,%eax - movl %esi,%esp - - /* bcopy(%esi = kaddr, %edi = PCPU(copyout_buf), %ecx = len) */ - popl %ecx - popl %edi - popl %esi - rep; movsb + movl PCPU(TRAMPSTK),%esp - popl %edi - movl %edi,%cr3 + movl %edx,%cr3 + movl $copyout_fault,%edx /* bcopy(%esi = PCPU(copyout_buf), %edi = udaddr, %ecx = len) */ - popl %ecx - popl %edi - popl %esi pf_x1: rep; movsb movl %ebx,%cr3 @@ -114,53 +88,30 @@ ENTRY(copyin_fast) pushl %edi pushl %ebx - movl $copyout_fault,%edx - movl 20(%ebp),%ebx /* KCR3 */ - + movl 20(%ebp),%ebx /* KCR3 */ movl PCPU(CURPCB),%eax - movl PCB_CR3(%eax),%edi - + movl PCB_CR3(%eax),%edx /* UCR3 */ + movl 16(%ebp),%ecx /* len */ + movl 8(%ebp),%esi /* udaddr */ cli - movl PCPU(TRAMPSTK),%esi - movl PCPU(COPYOUT_BUF),%eax - subl $4,%esi - movl %eax,(%esi) - movl 12(%ebp),%eax /* kaddr */ - subl $4,%esi - movl %eax,(%esi) - movl 16(%ebp),%eax /* len */ - subl $4,%esi - movl %eax,(%esi) - - movl 8(%ebp),%eax /* udaddr */ - subl $4,%esi - movl %eax,(%esi) - movl PCPU(COPYOUT_BUF),%eax - subl $4,%esi - movl %eax,(%esi) - movl 16(%ebp),%eax /* len */ - subl $4,%esi - movl %eax,(%esi) + movl PCPU(COPYOUT_BUF),%edi /* kaddr */ movl %esp,%eax - movl %esi,%esp - movl %edi,%cr3 - + movl PCPU(TRAMPSTK),%esp + movl %edx,%cr3 + movl $copyout_fault,%edx /* bcopy(%esi = udaddr, %edi = PCPU(copyout_buf), %ecx = len) */ - popl %ecx - popl %edi - popl %esi pf_x2: rep; movsb movl %ebx,%cr3 + movl %eax,%esp /* bcopy(%esi = PCPU(copyout_buf), %edi = kaddr, %ecx = len) */ - popl %ecx - popl %edi - popl %esi + movl 16(%ebp),%ecx + movl 12(%ebp),%edi + movl PCPU(COPYOUT_BUF),%esi rep; movsb - movl %eax,%esp sti xorl %eax,%eax