On 7/7/21 7:54 PM, isaku.yamahata@xxxxxxxxx wrote:
From: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
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 <isaku.yamahata@xxxxxxxxx>
---
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