From patchwork Tue Jan 19 13:06:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 8061441 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3F1C19F818 for ; Tue, 19 Jan 2016 13:10:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A91D2203AA for ; Tue, 19 Jan 2016 13:10:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03415203A1 for ; Tue, 19 Jan 2016 13:10:43 +0000 (UTC) Received: from localhost ([::1]:36871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLW3V-00007s-US for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Jan 2016 08:10:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLVzn-0001zM-5n for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:06:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLVzm-0005UX-98 for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:06:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLVzm-0005UT-3o for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:06:50 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id D0CB18F262 for ; Tue, 19 Jan 2016 13:06:49 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0JD6UbD020252; Tue, 19 Jan 2016 08:06:46 -0500 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 19 Jan 2016 14:06:27 +0100 Message-Id: <1453208789-42479-8-git-send-email-imammedo@redhat.com> In-Reply-To: <1453208789-42479-1-git-send-email-imammedo@redhat.com> References: <1453208789-42479-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: ehabkost@redhat.com, mst@redhat.com, ghammer@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, lersek@redhat.com Subject: [Qemu-devel] [PATCH v17 7/9] add MachineClass->default_props for setting default device properties X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Igor Mammedov --- include/hw/boards.h | 1 + vl.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 0f30959..d495611 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -90,6 +90,7 @@ struct MachineClass { const char *default_machine_opts; const char *default_boot_order; const char *default_display; + GlobalProperty *default_props; GlobalProperty *compat_props; const char *hw_version; ram_addr_t default_ram_size; diff --git a/vl.c b/vl.c index b7a083e..0db74b1 100644 --- a/vl.c +++ b/vl.c @@ -4492,6 +4492,10 @@ int main(int argc, char **argv, char **envp) exit (i == 1 ? 1 : 0); } + if (machine_class->default_props) { + qdev_prop_register_global_list(machine_class->default_props); + } + if (machine_class->compat_props) { qdev_prop_register_global_list(machine_class->compat_props); }