Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759287Ab2K3SKm (ORCPT ); Fri, 30 Nov 2012 13:10:42 -0500 Received: from mail.skyhub.de ([78.46.96.112]:51567 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759040Ab2K3SKk (ORCPT ); Fri, 30 Nov 2012 13:10:40 -0500 Date: Fri, 30 Nov 2012 19:10:37 +0100 From: Borislav Petkov To: "H. Peter Anvin" Cc: Linus Torvalds , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List , Mario Gzuk Subject: Re: [PATCH 8/8] x86, cleanups: Simplify sync_core() in the case of no CPUID Message-ID: <20121130181037.GE23034@liondog.tnic> Mail-Followup-To: Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List , Mario Gzuk References: <1354132230-21854-1-git-send-email-hpa@linux.intel.com> <1354132230-21854-9-git-send-email-hpa@linux.intel.com> <20121128204158.GC14635@liondog.tnic> <50B7D28A.4000401@linux.intel.com> <50B8F4D7.2010204@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <50B8F4D7.2010204@zytor.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1171 Lines: 29 On Fri, Nov 30, 2012 at 10:03:03AM -0800, H. Peter Anvin wrote: > Well, the grand total of serializing instructions are: > > INVD, INVEPT, INVLPG, INVVPID, LGDT, LIDT, LLDT, LTR, MOV to CR, MOV > to DR, WBINVD, WRMSR, CPUID, IRET, RSM. What about MFENCE with JMP 1f to kill prefetches? Probably too expensive. Oh and MFENCE is an SSE2 insn so maybe not supported by 486 or something later ... > >From all of the above, the alternatives case is kinda relevant for virt > >where we do text_poke_early in a loop for every alternative section > >so this could pile up to a bunch of vmexits depending on the emulated > >hardware. Might be worth a replacement if it is noticeable in guests. > > This is still boot time, and I really doubt it is measurable in the > long run. Yes, exists suck, but at least CPUID is generally a quick > exit, since all the relevant state is in registers. Agreed. -- Regards/Gruss, Boris. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/