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 X-Spam-Level: X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EDA4C6377D for ; Thu, 22 Jul 2021 17:56:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F09496109D for ; Thu, 22 Jul 2021 17:56:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F09496109D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6cvQ-0004xh-3X for qemu-devel@archiver.kernel.org; Thu, 22 Jul 2021 13:56:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6csK-00050c-EL for qemu-devel@nongnu.org; Thu, 22 Jul 2021 13:52:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6csI-00029j-Qo for qemu-devel@nongnu.org; Thu, 22 Jul 2021 13:52:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626976366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=raFWkEmfEsnXA+zlkTsH/h7na1SeJw58CnlfHE/P3Ws=; b=gnVvuK8fqaIZG7AlrSswYZfYKicFKpztwpCe6yBY46ppedYykjBdcohQp96pQZtseHxNox 63t8nJqQ8sH9DEMO5HUZEaPAk3UzIB4Ssle4fHMqetWqm0lkoIFCpnavEgzJxJkXMKzY0N c7aJRzTX5cD+5VINxuHbeGRgtXuXTuM= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-LZGx1R6PNnurXGJmAg3e2g-1; Thu, 22 Jul 2021 13:52:44 -0400 X-MC-Unique: LZGx1R6PNnurXGJmAg3e2g-1 Received: by mail-oi1-f199.google.com with SMTP id u34-20020a0568081522b029025cd3c0e2bdso480730oiw.1 for ; Thu, 22 Jul 2021 10:52:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=raFWkEmfEsnXA+zlkTsH/h7na1SeJw58CnlfHE/P3Ws=; b=EL732YImqW23ZlzWMbyIaMzFFEQN9FuraeDTTTdhEhiwXjiDtUeTFrUoLbJgZgiO1T uS1Shejo9/L3cUhCGigmM2vrUyL6koQvKoJiLiFFsydL6eLec80OwDaLaNFcYVQGfafm 2HTrFvj3BoGlVCfyzR7wb0IQ84dIrBWKQAe5PJT058uctBMo2S1vVg5MgD48piufjLUV 0CdSuBL5RS8kBjpekI+SHnM8TtPppGxIMGjL4x1d8sTxVo2EotcrldZR1zMtiszy7IX9 XqaSfROcuayfKDoHyn/c+wJa8RClnLtQKvvHW7bM2Y/mjJJVvNZb6GZPtig+WoOnlQ2w q/qA== X-Gm-Message-State: AOAM532xzaomK9rTxsdV3+GmQpLXW6y1GKfFNsW3Zudp18AQt4gt9fkT yWBevdWnTdqQlPx8DdHmZ2y6kDwtmAu7CIhAj4XBE2/7+WwVvKj4+WzRlGdCrUhCZugcaLjwK8p Hj6mMZbdN8JbR1Y8= X-Received: by 2002:a05:6830:438b:: with SMTP id s11mr636068otv.133.1626976364232; Thu, 22 Jul 2021 10:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYxdgdIkzUJlEvp1X0rIRGzY1SrQ7Xzkw/4Mpg1l/IcSoHndZi3iNwTfJV7xrpAXc4vqTTRA== X-Received: by 2002:a05:6830:438b:: with SMTP id s11mr636051otv.133.1626976364091; Thu, 22 Jul 2021 10:52:44 -0700 (PDT) Received: from [192.168.0.173] (ip68-102-25-176.ks.ok.cox.net. [68.102.25.176]) by smtp.gmail.com with ESMTPSA id b2sm2175904otf.40.2021.07.22.10.52.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jul 2021 10:52:43 -0700 (PDT) From: Connor Kuehl Subject: Re: [RFC PATCH v2 04/44] vl: Introduce machine_init_done_late notifier To: isaku.yamahata@gmail.com, qemu-devel@nongnu.org, pbonzini@redhat.com, alistair@alistair23.me, ehabkost@redhat.com, marcel.apfelbaum@gmail.com, mst@redhat.com, cohuck@redhat.com, mtosatti@redhat.com, xiaoyao.li@intel.com, seanjc@google.com, erdemaktas@google.com References: <80ac3e382a248bac13662d4052d17c41f1c21e3a.1625704980.git.isaku.yamahata@intel.com> Message-ID: Date: Thu, 22 Jul 2021 12:52:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <80ac3e382a248bac13662d4052d17c41f1c21e3a.1625704980.git.isaku.yamahata@intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ckuehl@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=ckuehl@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.472, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.203, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 7/7/21 7:54 PM, isaku.yamahata@gmail.com wrote: > From: Isaku Yamahata > > Introduce a new notifier, machine_init_done_late, that is notified after > machine_init_done. This will be used by TDX to generate the HOB for its > virtual firmware, which needs to be done after all guest memory has been > added, i.e. after machine_init_done notifiers have run. Some code > registers memory by machine_init_done(). > > Signed-off-by: Isaku Yamahata > --- > hw/core/machine.c | 26 ++++++++++++++++++++++++++ > include/sysemu/sysemu.h | 2 ++ > 2 files changed, 28 insertions(+) > > diff --git a/hw/core/machine.c b/hw/core/machine.c > index ffc076ae84..66c39cf72a 100644 > --- a/hw/core/machine.c > +++ b/hw/core/machine.c > @@ -1278,6 +1278,31 @@ void qemu_remove_machine_init_done_notifier(Notifier *notify) > notifier_remove(notify); > } > > +static NotifierList machine_init_done_late_notifiers = > + NOTIFIER_LIST_INITIALIZER(machine_init_done_late_notifiers); I think a comment here describing the difference between machine_init_done and machine_init_done_late would go a long way for other developers so they don't have to hunt through the git log. Connor