Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp23517rdb; Mon, 15 Jan 2024 10:37:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFSEcOz2NajLJ/gkpeQFn6C9Vlm1mr/57k18okkXHNj6hJsppvHAopSMBJxi39OVud08I9 X-Received: by 2002:a05:651c:1199:b0:2cd:63ec:6fd6 with SMTP id w25-20020a05651c119900b002cd63ec6fd6mr2450535ljo.82.1705343831377; Mon, 15 Jan 2024 10:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705343831; cv=none; d=google.com; s=arc-20160816; b=MiDRJOuB18C7jSKJmJiDB/kuht9TAl4r0+Lrt8/CTM1zhDpBRDEkm0oXkqxhUFDy3d ywp197J3W5uQm2T90nQOafud0GB3KDP3++pfq7B2rbLVguFtPAQIdvQ+k/cCGLFnl9QY lPDShzaWYNNTsKep60Kl1AW/NadLq0qjmH6o+V0p1pmJP6yk+Q9n44g0LXkfaHx19zBs rJLEYD9FYexMvDKKWbO84n2DEknynx734g+uNBURWBMuRlLkutyGCe/uoGWn8sT8KlYr pIiJwd4mBhT3hZ5175N9ubso9hZPwc8qhoZ7wldPCfTaH7B9DjyQL+N+OpeWMgknWyVN TFtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=siruSOwBIkz+YQPDY/Jfuj4emBAwqDpv2AZsZ7QTgss=; fh=iIeRyOostS1BC6JcGbWItJnQfL+tsIb8F+kp+1e0+eg=; b=tydNwdwalB/Xa6NImuiX03GseS+9bL3IUYwKjv7GWuDVsMbcVi2B1X+TJTFznwf1SR SnokJgIzJQdnmucAI2XfVu1WMhdGVUJ3oJ9zQt6eeOXwzIQp+nwcXEnFAZMnybQdt2ci TDBTxlg6jHAz6c83IUoeGVlM3xj42mJUs7DhGKOSKYOmI+hXW7sjNLvjKgYyh4Hz3bUk p/6WJ+FtxNeGXVVj+WfQBZz68j9GirlkRhN86BOqDM+rpUJP5anfimZEVhB03kKje8lJ UPQ0sKCf5MsMKT4H4P0thlybs3aBnrlw1Ib4WDyuayFErtWYbKqYsuR/P/Zt1JqPz/ce UOFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sH7CuCMZ; spf=pass (google.com: domain of linux-kernel+bounces-26395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h11-20020aa7de0b000000b0055593fe28e7si4068953edv.498.2024.01.15.10.37.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 10:37:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sH7CuCMZ; spf=pass (google.com: domain of linux-kernel+bounces-26395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3CE8A1F221D0 for ; Mon, 15 Jan 2024 18:36:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A1E918654; Mon, 15 Jan 2024 18:35:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sH7CuCMZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A708182A0; Mon, 15 Jan 2024 18:35:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68A83C433C7; Mon, 15 Jan 2024 18:35:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705343750; bh=gwFwCQR02mqMJh+DxFoy4WZb/vmnLO4DD6kpklsd0Z0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sH7CuCMZSMA9YSmTxRIPYfWC+UJJ7cXAAVDqEemp+fkBQlXckddbHl3Va/nMwZwVf mYX55hoJRjyf+f3Emr7Yw5OYVtngyQatobWmmXaxqCaJrYw2c5qb6WSw3gomp486Ki xd3ZZZsLh2QDCWLIbj+99wyBPeYSrofTdk1NN10Y= Date: Mon, 15 Jan 2024 19:35:48 +0100 From: Greg KH To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, x86@kernel.org, Borislav Petkov , Dave Hansen Subject: Re: [PATCH stable] x86/microcode: do not cache microcode if it will not be used Message-ID: <2024011502-shoptalk-gurgling-61f5@gregkh> References: <20240115102202.1321115-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240115102202.1321115-1-pbonzini@redhat.com> On Mon, Jan 15, 2024 at 11:22:02AM +0100, Paolo Bonzini wrote: > [ Upstream commit a7939f01672034a58ad3fdbce69bb6c665ce0024 ] This really isn't this commit id, sorry. > Builtin/initrd microcode will not be used the ucode loader is disabled. > But currently, save_microcode_in_initrd is always performed and it > accesses MSR_IA32_UCODE_REV even if dis_ucode_ldr is true, and in > particular even if X86_FEATURE_HYPERVISOR is set; the TDX module does not > implement the MSR and the result is a call trace at boot for TDX guests. > > Mainline Linux fixed this as part of a more complex rework of microcode > caching that went into 6.7 (see in particular commits dd5e3e3ca6, > "x86/microcode/intel: Simplify early loading"; and a7939f0167203, > "x86/microcode/amd: Cache builtin/initrd microcode early"). Do the bare > minimum in stable kernels, setting initrd_gone just like mainline Linux > does in mark_initrd_gone(). Why can't we take the changes in 6.7? Doing a one-off almost always causes problems :( What exact commits are needed? thanks, greg