From nobody Tue Dec 16 07:06:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520981691091927.1905229577368; Tue, 13 Mar 2018 15:54:51 -0700 (PDT) Received: from localhost ([::1]:43309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evsok-0002gs-77 for importer@patchew.org; Tue, 13 Mar 2018 18:54:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evshm-0005SW-1H for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:47:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evshi-0002s6-Ug for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:47:38 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:55341) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evshi-0002r6-Nl for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:47:34 -0400 Received: by mail-wm0-x244.google.com with SMTP id q83so871076wme.5 for ; Tue, 13 Mar 2018 15:47:34 -0700 (PDT) Received: from donizetti.lan (94-36-191-219.adsl-ull.clienti.tiscali.it. [94.36.191.219]) by smtp.gmail.com with ESMTPSA id x107sm1557951wrb.97.2018.03.13.15.47.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Mar 2018 15:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XZSgFd9sftsEU7gW3Iv/RIUMr/BR8XYNfNvwmhunedc=; b=OrfNKtcrsQJl7QcHIROJXO+EE8KHfZST/ufhKtAwZpBTCOR6viONTjdfs1PpyJ0MCh Tu6AdDrhK6I5yd9/LDaGwZPD1h1CY2j34/wGjtL2qnkCQgSJgU2MTJYekK8ET/9Tt8rX cqiDhAgBHQvRo40S+6b38yF3xWpK+wo4qD8zBvhiyoq0xwLD1OqUirRU0j5VTnivgGWP uFuHE/loLNFdALF48hyJolAtEzj0PRDpkGUKMlFTLK6SlX11kU8sYUpHuTze9u2RsZWv 7jIcnZ7Y3ReQEPlobhLG2xDUNpTjuD2oPMjHMa6+Qzad4Pn6pBlVGdB8qCRmocIfJ2B+ kiag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XZSgFd9sftsEU7gW3Iv/RIUMr/BR8XYNfNvwmhunedc=; b=tTpz3k1uQoqw1ces389N3bFsdMa8K5gCZm/vh6YeVi0o5d0CiDCq4oG/XHQjIBeeu+ sx4t77EEnlxfzXzywOWbDgqkCcdfzwl7fvVEN1tmpCiXeRy1XPmv8kXLp78bzlHVF9E9 IsLdR9qswaajjygxNKXJHeVlfNMplYDk80OBm5m3SVv1rgzVQRFVCC+axu2ha0SzM1Ve /J6XCKplEBwTjqukcoM61Jm8QeGb6FwJ/jl3dtyrwJTMiUMbILPXRyuTfrqD4P4N7ivJ 4sxN/RciuKhPXxDDFXYnrfX9JL+/eB62ZfLv1Qr+wjXIzn8lQbKZPmkQE0yhJ9cjjjYC G5nw== X-Gm-Message-State: AElRT7GRCBIL9R4u4Psl8qtClbR3ifQTCkYwEskA3YB8qrglbsb89KjP MLmYy09T0cy9c3nGr19CHDdKCUbu X-Google-Smtp-Source: AG47ELuFKwx5TlsNxCu2I/vuuyFrQxwLGvmZyUnjT4FT2el3OE9juvqujCGDxgWV0r1V8KZhWQvVbw== X-Received: by 10.28.1.208 with SMTP id 199mr2125390wmb.26.1520981253416; Tue, 13 Mar 2018 15:47:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 13 Mar 2018 23:46:20 +0100 Message-Id: <20180313224719.4954-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180313224719.4954-1-pbonzini@redhat.com> References: <20180313224719.4954-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 10/69] vl: export machine_init_done X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Xu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Peter Xu We have that variable but not exported. Export that so modules can have a way to poke on whether machine init has finished. Meanwhile, set that up even before calling the notifiers, so that notifiers who may depend on this field will get a correct answer. Suggested-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Peter Xu Message-Id: <20180306053320.15401-2-peterx@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Acked-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- include/sysemu/sysemu.h | 2 ++ stubs/machine-init-done.c | 2 ++ vl.c | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 356bfdc1c1..2b42151c63 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -88,6 +88,8 @@ void qemu_system_guest_panicked(GuestPanicInformation *in= fo); void qemu_add_exit_notifier(Notifier *notify); void qemu_remove_exit_notifier(Notifier *notify); =20 +extern bool machine_init_done; + void qemu_add_machine_init_done_notifier(Notifier *notify); void qemu_remove_machine_init_done_notifier(Notifier *notify); =20 diff --git a/stubs/machine-init-done.c b/stubs/machine-init-done.c index 9a0d62514f..4121f1709b 100644 --- a/stubs/machine-init-done.c +++ b/stubs/machine-init-done.c @@ -2,6 +2,8 @@ #include "qemu-common.h" #include "sysemu/sysemu.h" =20 +bool machine_init_done =3D true; + void qemu_add_machine_init_done_notifier(Notifier *notify) { } diff --git a/vl.c b/vl.c index 3ef04ce991..26662eb9e7 100644 --- a/vl.c +++ b/vl.c @@ -2696,7 +2696,7 @@ static void qemu_run_exit_notifiers(void) notifier_list_notify(&exit_notifiers, NULL); } =20 -static bool machine_init_done; +bool machine_init_done; =20 void qemu_add_machine_init_done_notifier(Notifier *notify) { @@ -2713,8 +2713,8 @@ void qemu_remove_machine_init_done_notifier(Notifier = *notify) =20 static void qemu_run_machine_init_done_notifiers(void) { - notifier_list_notify(&machine_init_done_notifiers, NULL); machine_init_done =3D true; + notifier_list_notify(&machine_init_done_notifiers, NULL); } =20 static const QEMUOption *lookup_opt(int argc, char **argv, --=20 2.14.3