From nobody Mon Feb 9 20:10:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580202503153538.218479743276; Tue, 28 Jan 2020 01:08:23 -0800 (PST) Received: from localhost ([::1]:55688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwMr8-000199-4E for importer@patchew.org; Tue, 28 Jan 2020 04:08:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56635) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwMos-0005lv-U0 for qemu-devel@nongnu.org; Tue, 28 Jan 2020 04:06:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwMor-0002qG-Ts for qemu-devel@nongnu.org; Tue, 28 Jan 2020 04:06:02 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:58151 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwMor-0002pX-QO for qemu-devel@nongnu.org; Tue, 28 Jan 2020 04:06:01 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-417-MbwWItdsNcqCebVC92WGiQ-1; Tue, 28 Jan 2020 04:05:57 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A50C9800D5E for ; Tue, 28 Jan 2020 09:05:56 +0000 (UTC) Received: from secure.mitica (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E89210027A1; Tue, 28 Jan 2020 09:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580202361; 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=PbBVwTwxgB7nPVUXFlKEK3auQkBLFXi2IJU563asPOQ=; b=h5T2Y5zKZadDtaT2JRGoIEViwkWR/rmucSi18H/0A+XiHt8NwElMsURjIs10zt8T0JIAXA MwJh/zwFDkKVgdG7amAgJ3jl4L+ci/y4dooHAAB/poAPFlb5iWvdN6j/BwaYqUjQ06liF/ Cn9+FbHg1ymvEJDQHRnUAEzxTPf1vo0= From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PATCH v4 1/7] migration: Add support for modules Date: Tue, 28 Jan 2020 10:05:44 +0100 Message-Id: <20200128090550.5112-2-quintela@redhat.com> In-Reply-To: <20200128090550.5112-1-quintela@redhat.com> References: <20200128090550.5112-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: MbwWItdsNcqCebVC92WGiQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 207.211.31.81 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: Laurent Vivier , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Juan Quintela , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" So we don't have to compile everything in, or have ifdefs Signed-off-by: Juan Quintela --- include/qemu/module.h | 2 ++ vl.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 65ba596e46..907cb5c0a5 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -40,6 +40,7 @@ static void __attribute__((constructor)) do_qemu_init_ ##= function(void) \ #endif =20 typedef enum { + MODULE_INIT_MIGRATION, MODULE_INIT_BLOCK, MODULE_INIT_OPTS, MODULE_INIT_QOM, @@ -56,6 +57,7 @@ typedef enum { #define xen_backend_init(function) module_init(function, \ MODULE_INIT_XEN_BACKEND) #define libqos_init(function) module_init(function, MODULE_INIT_LIBQOS) +#define migration_init(function) module_init(function, MODULE_INIT_MIGRATI= ON) =20 #define block_module_load_one(lib) module_load_one("block-", lib) #define ui_module_load_one(lib) module_load_one("ui-", lib) diff --git a/vl.c b/vl.c index b0f52c4d6e..9f8577955a 100644 --- a/vl.c +++ b/vl.c @@ -2890,6 +2890,7 @@ int main(int argc, char **argv, char **envp) qemu_init_exec_dir(argv[0]); =20 module_call_init(MODULE_INIT_QOM); + module_call_init(MODULE_INIT_MIGRATION); =20 qemu_add_opts(&qemu_drive_opts); qemu_add_drive_opts(&qemu_legacy_drive_opts); --=20 2.24.1