From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18653C4332F for ; Mon, 19 Dec 2022 16:58:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.466260.725130 (Exim 4.92) (envelope-from ) id 1p7JSb-0001F7-ER; Mon, 19 Dec 2022 16:57:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 466260.725130; Mon, 19 Dec 2022 16:57:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p7JSb-0001F0-BG; Mon, 19 Dec 2022 16:57:53 +0000 Received: by outflank-mailman (input) for mailman id 466260; Mon, 19 Dec 2022 16:57:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p7JSa-0001Eu-3n for xen-devel@lists.xenproject.org; Mon, 19 Dec 2022 16:57:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p7JSZ-00057V-TK; Mon, 19 Dec 2022 16:57:51 +0000 Received: from 54-240-197-239.amazon.com ([54.240.197.239] helo=[192.168.8.73]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p7JSZ-0006aj-OD; Mon, 19 Dec 2022 16:57:51 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=8v3nXT1Y1o6GAu4MAikm3tc28LYhYH3cjVtHuJtvXgA=; b=xs2MWsZmxND+9glK0WH7l9mufb 1S/ka0FZCqAU8p9S1Hc2VJJqVHGsKzywxiiabYkw/dQjjsngUSx7uE+Vyy/abooDQRJqlT/ej6Few 7iap5QoUwZMVUd4Dnjabpo9aW6PNMlzWN/MhABjhnptoh8tVvjUxhSjgAJ3ZI5ITSHfA=; Message-ID: <78f8b94f-7a60-8739-cd3b-e2ce28ca9e3d@xen.org> Date: Mon, 19 Dec 2022 16:57:49 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 3/3] x86/ucode: load microcode earlier on boot CPU Content-Language: en-US To: Sergey Dyasli , xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Wei Liu References: <20221219144533.19836-1-sergey.dyasli@citrix.com> <20221219144533.19836-4-sergey.dyasli@citrix.com> From: Julien Grall In-Reply-To: <20221219144533.19836-4-sergey.dyasli@citrix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Sergey, On 19/12/2022 14:45, Sergey Dyasli wrote: > Call early_microcode_init() straight after multiboot modules become > accessible. Modify it to load the ucode directly from the blob bypassing > populating microcode_cache because xmalloc is still not available at > that point during Xen boot. > > Introduce early_microcode_init_cache() for populating microcode_cache. > It needs to rescan the modules in order to find the new virtual address > of the ucode blob because it changes during the boot process, e.g. > from 0x00000000010802fc to 0xffff83204dac52fc. > > While at it, drop alternative_vcall() from early_microcode_init() since > it's not useful in an __init fuction. Can you explain in the commit message why you need to load the microcode early? E.g. is it a nice feature to have or a real issue? If the latter, then I think we will need to consider the patches for backport. Cheers, -- Julien Grall