From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28807 invoked from network); 10 Dec 2020 15:15:44 -0000 Received: from ewsd.inri.net (107.191.116.128) by inbox.vuxu.org with ESMTPUTF8; 10 Dec 2020 15:15:44 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by ewsd; Thu Dec 10 10:09:51 -0500 2020 Received: from abbatoir.fios-router.home (pool-74-101-2-6.nycmny.fios.verizon.net [74.101.2.6]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id a49daf9d (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO); Thu, 10 Dec 2020 07:09:42 -0800 (PST) Message-ID: <947D1941865408CA69F8862DDDE99453@eigenstate.org> To: morrow.stuart@gmail.com To: 9front@9front.org Date: Thu, 10 Dec 2020 07:09:40 -0800 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: structured content-addressed package framework callback software extension service Subject: Re: [9front] VMX improvements + AVX Reply-To: 9front@9front.org Precedence: bulk Quoth Stuart Morrow : > I have to admit I don't understand why this type of thing actually > needs to be a patch. The kernel needs to know what instructions the > program is liable to use? Why? My Nemo's-book understanding of this > stuff: the kernel sets up an allotment of time, and then the user > process goes to town within the constraints set up for it. Can't > really imagine why certain instructions would need special > arrangements or what the mechanism might be. A process is a collection of registers, memory, and file descriptors (mostly). So, switching processes means that you need to swap out the active resources. AVX adds more registers, so there are new things that need to be swapped. That means two things: 0) the kernel needs to know that these registers exist, so that it can save them and restore them when switching procs. 1) it's not on automatically, and userspace can't turn it on, because if the kernel didn't know how to save them across processes, one process would step all over the others new registers. (usually) new instructions that don't add new registers need no work in the OS.