Received: by 10.223.185.116 with SMTP id b49csp2212269wrg; Thu, 22 Feb 2018 09:52:53 -0800 (PST) X-Google-Smtp-Source: AH8x227aLNXXqaRXNUPgxV/XKmvz85LaJ4etzZERUKgvRW4GVAojsJbUA2q61kSfQ65fDH3FCYGb X-Received: by 10.99.163.111 with SMTP id v47mr6236168pgn.80.1519321973159; Thu, 22 Feb 2018 09:52:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519321973; cv=none; d=google.com; s=arc-20160816; b=Du2LK6BXQrnyWbuSFj9XP031X88N2a+WG+/Cea8scAzwEBQz2OQnwV2SbsJ4mlO+13 woqYvyNDGn06yEEOHoe6ukFsZBGFtrzhyr1qLtWdtdzptp4z5Vo/2ejGFx5fmfVEiEDc QI0I9xUKbinRRoyWVftmGQshP3aM2vHwwjQnTwlYyKyygrDdPkngmy+yXWvADWuaqL1Z +dku0YNP6o1srOjo7NBR04XE8I7N9t/bTIxh841qu8sevxxp674j1ZIqVnCxBYkMQlXo zyrHUpfCYYjYBrN99Q5QuMu71kpCTyx/N0gqH2I9nHoUt5wCDzJ9jWGAojwcf4H0CTgr oUGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature :arc-authentication-results; bh=OiJpfZIThmQDNsKpBEdFtKkhT3w8HseX1YjWlHuzIb0=; b=TdBk1saNO3vQrwjG2wG4uY22ZPZZSBW7jtHmvkgBv+GehNowQ/K3XUhnTw0Gon1wbB FQ4LiB2R6Y2kaLg2T7rNcJYEAQ07Nj+3C1FUeoBBhs5rC23iN8640MfgHUfPvTnr7NOP BeohlqQzEy6dDY7DC/utNZTR4Z0UXscE0ID1VOZe4Vx6F6J1L7qZbX+SMQK3skp4x2yv utg2u0YICEwYYO5ocqK2s9qXaCLCik3lJabh9lK3EsRZV6IGu5h0jigwMlvpPThXNJR0 s53tVwQg8iUS0vVA5r4Nv2N3CsYZdwF9Qmzsl8/mv41tIxA21Gf9/Errg9ywNKGYdjRb JWsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hmh.eng.br header.s=fm1 header.b=Tz0D7b9N; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Y7eqzvGu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a69-v6si376331pli.251.2018.02.22.09.52.39; Thu, 22 Feb 2018 09:52:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@hmh.eng.br header.s=fm1 header.b=Tz0D7b9N; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Y7eqzvGu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933656AbeBVRvf (ORCPT + 99 others); Thu, 22 Feb 2018 12:51:35 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59373 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933495AbeBVRvd (ORCPT ); Thu, 22 Feb 2018 12:51:33 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B35932182E; Thu, 22 Feb 2018 12:51:32 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Thu, 22 Feb 2018 12:51:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hmh.eng.br; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=OiJpfZIThmQDNsKpBEdFtKkhT3w8HseX1YjWlHuzIb0=; b=Tz0D7b9N xqwC+S8xVaAfjAAoQrllFAxDlKldFkT7VJKOH87ROqxDgLLTsMdfnzySwsdtJZOM fIR5UvuUmINlpni6oV0GJSprXCyVY+iP3UCR+SIgKUOsGKaLZE+UqBNFvLDMDHwy TEh/8NNDmapQc4rH6AOYxYyDeLx1DX1U5SyfWnTgbVwJU1mHs/zevCegriEz/oiu obaKqXIPJy/iC0kVGnCi53ZdCID+LgeXivFULtB+KbHPATWTfzrqsq3e9YmwbQ6j VwqKdHr8jZFwqCLiTcRaIxf8DcqoRan3qNx4jfdUWTPWoy6mFcKiyETMDpCFg5Th nIIa0SEOApK1/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=OiJpfZIThmQDNsKpBEdFtKkhT3w8H seX1YjWlHuzIb0=; b=Y7eqzvGugyIx/myMJcrtK4dzCVmL6g58cckybWCNNg9gw WlbLdryvhMgvsBLAtP/KFOgG9h19rZHujOv4c5Nk7CrKma9Nrj7Oy+NmAMzyvtJ3 4p7/puJDyT5emCZuMbj9x1WGNuPXYzvCycIiZMPNyV6mwrZkjpY65x3q+8EYiQv5 RbmNUmumtYUJPKjLyBfThOlRffAF84O/b47v/X9nAjKeVqgs5t2C8Prraa5nFNp0 NAqDYH2bsTQdunvomy/MC8+XebCL5en4naphQNjVYa6r/TzV3sV6h7ze8VuCqcoz a2FSRbPwSA5Bu3U5KPXhiXqhhbSejNd8E3vtSRzaA== X-ME-Sender: Received: from khazad-dum.debian.net (unknown [201.82.128.91]) by mail.messagingengine.com (Postfix) with ESMTPA id 2321D7E3DC; Thu, 22 Feb 2018 12:51:32 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 1298A340040D; Thu, 22 Feb 2018 14:51:30 -0300 (-03) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum2.khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lKTOIdPpe85j; Thu, 22 Feb 2018 14:51:29 -0300 (-03) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 4E605340040C; Thu, 22 Feb 2018 14:51:29 -0300 (-03) Date: Thu, 22 Feb 2018 14:51:29 -0300 From: Henrique de Moraes Holschuh To: "Van De Ven, Arjan" Cc: "Raj, Ashok" , Borislav Petkov , X86 ML , LKML , Thomas Gleixner , Ingo Molnar , "Luck, Tony" , "Kleen, Andi" , Tom Lendacky Subject: Re: [v2 1/3] x86/microcode/intel: Check microcode revision before updating sibling threads Message-ID: <20180222175129.4nluqvqdowrm6jv3@khazad-dum.debian.net> References: <1519281205-58951-1-git-send-email-ashok.raj@intel.com> <1519281205-58951-2-git-send-email-ashok.raj@intel.com> <20180222110056.GA27489@pd.tnic> <20180222115554.GA3797@araj-mobl1.jf.intel.com> <20180222121506.GC27489@pd.tnic> <20180222131918.GB3797@araj-mobl1.jf.intel.com> <20180222154605.er6llhcaxmie3rhr@khazad-dum.debian.net> <0575AF4FD06DD142AD198903C74E1CC87A61B8E8@ORSMSX103.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0575AF4FD06DD142AD198903C74E1CC87A61B8E8@ORSMSX103.amr.corp.intel.com> X-GPG-Fingerprint1: 4096R/0x0BD9E81139CB4807: C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Feb 2018, Van De Ven, Arjan wrote: > > > In the past the only guidance was to not load microcode at the same time to > > the > > > thread siblings of a core. We now have new guidance that the sibling must be > > > spinning and not doing other things that can introduce instability around > > loading > > > microcode. > > > > Document that properly in the Intel SDM, *please*. > > yes we will update the SDM, just that is a much longer process than sending code out. > > > > > While at it, please verify with the microcode teams that the requirement > > for 16-byte alignment of the microcode update as present in the Intel > > SDM still stands. > > I'd be surprised if it did not. The question would be better phrased as: important to which processors? Just very old ones? The late microcode update loader has it 16-byte aligned as a side-effect of malloc() from what I recall when I tested it with SLUB, SLAB (I am not sure about what the result was for SLOB), so it is an issue that was introduced with the early initramfs microcode loader support. However, the early loader doesn't have that benefit for the BSP. If the 16-byte alignment were important for most stuff since the Core2, we should be crashing like crazy when attempting early microcode updates... Thus, apparently, 4-byte alignment (which we do always get out of the early initramfs) is good enough on most non-ancient processors when updating the BSP the way Linux does it, since it does work for most people. I don't recall what the situation is for the APs for the early loader, though. > >Linux does not enforce it on the early microcode update loader when > > using an initramfs (but userspace can work around that, and > > iucode_tool --early-fw does so). If that 16-byte alignment is > > important, I could dust off some patches that fix it. > > hmm wonder what those tools do nowadays; Intel publishes the microcode > in the linux native format since some time (and the .dat format is > about to go away entirely) I think most of them don't force the alignment in userspace. The exceptions are Debian, Ubuntu, and their derivatives when using initramfs-tools (not dracut). I do belive there are a few that generate /boot/ucode.initrd to load as the first initrd via the bootloader using iucode_tool --write-earlyfw (instead of using cpio). That would also have the workaround in place. -- Henrique Holschuh