From owner-dev-commits-src-main@freebsd.org Wed Sep 29 16:45:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77202676D69; Wed, 29 Sep 2021 16:45:22 +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 4HKMgQ2zSkz4TxZ; Wed, 29 Sep 2021 16:45:22 +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 463EB1BD85; Wed, 29 Sep 2021 16:45:22 +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 18TGjMcx042119; Wed, 29 Sep 2021 16:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18TGjM7m042118; Wed, 29 Sep 2021 16:45:22 GMT (envelope-from git) Date: Wed, 29 Sep 2021 16:45:22 GMT Message-Id: <202109291645.18TGjM7m042118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0cfc8b10edd7 - main - f00f: We don't need giant to create IDT for workaround. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cfc8b10edd78c9e2738e82544fe4c4db401aea1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2021 16:45:22 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0cfc8b10edd78c9e2738e82544fe4c4db401aea1 commit 0cfc8b10edd78c9e2738e82544fe4c4db401aea1 Author: Warner Losh AuthorDate: 2021-09-29 16:19:51 +0000 Commit: Warner Losh CommitDate: 2021-09-29 16:35:21 +0000 f00f: We don't need giant to create IDT for workaround. We don't need to assert we have Giant here. All machines that require the F00F workaround are UP and interrupts are disabled. Since we are single threaded, it's safe to allocate the IDT area with pmap_trm_alloc, interact with the current idt table and replace the IDT table without any Giant locking. Sponsored by: Netflix Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D31839 --- sys/i386/i386/machdep.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 1366939cda6e..942ff8c2ada8 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -2719,8 +2719,6 @@ f00f_hack(void *unused) if (!has_f00f_bug) return; - GIANT_REQUIRED; - printf("Intel Pentium detected, installing workaround for F00F bug\n"); tmp = (vm_offset_t)pmap_trm_alloc(PAGE_SIZE * 3, M_NOWAIT | M_ZERO);