From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 06:00:05 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 144CB16A4B3 for ; Thu, 2 Oct 2003 06:00:05 -0700 (PDT) Received: from upsn231.cri.u-psud.fr (upsn231.cri.u-psud.fr [129.175.34.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4CAF43F3F for ; Thu, 2 Oct 2003 06:00:03 -0700 (PDT) (envelope-from invalid@kma.eu.org) Received: from ikaria.inria-futurs.pcri.u-psud.fr (ikaria.inria-futurs.pcri.u-psud.fr [129.175.144.36])h92Cx3aT007029 for ; Thu, 2 Oct 2003 14:59:03 +0200 Received: from kma.eu.org (localhost [127.0.0.1])h92CxxD17761 for ; Thu, 2 Oct 2003 14:59:59 +0200 Message-ID: <3F7C209F.7000205@kma.eu.org> Date: Thu, 02 Oct 2003 14:57:03 +0200 From: Grumble User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned: by amavis X-Spam-Status: score=-10.5 tests=BAYES_10,QUOTED_EMAIL_TEXT,USER_AGENT_MOZILLA_UA autolearn=ham version=2.53 X-Spam-Level: X-Spam-Score: X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 13:00:05 -0000 >>> I have read the perfmon documentation and source code. For several >>> reasons, I do not think it is totally adequate in my situation. >> >> This is an extension to the i386_vm86() syscall which will let you turn >> PCE on and off if you're the superuser. > > Now that I think on this a bit more, a sysctl might be a better place to > put this, but it seemed to belong with the i386_vm86() bits, rather than > polluting initcpu.c right away. Is vm86 related to virtual-8086 mode? Probably not... What does vm86 stand for? Virtual machine? > Mind you, if you're going to hack perfmon, perhaps putting this in initcpu > isn't such a bad idea after all, with a loader tunable instead. That way > perfmon can pickup on the tunable when attached by nexus during boot. I am tempted to remove perfmon from the kernel, and write a kernel module for Athlon and another one for NetBurst. Can a kernel module catch #UD (Invalid Opcode) and #GP (General Protection) exceptions generated from within the kernel module itself? Can I use sigaction(2)? Can a kernel module catch a specific #GP exception generated from user land? Can I register a signal handler with sigaction(2)? BTW, are performance-monitoring counters saved and restored on a context switch? Shill