From patchwork Fri Jan 22 13:21:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 8090061 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0E916BEEE5 for ; Fri, 22 Jan 2016 13:23:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D2BC20457 for ; Fri, 22 Jan 2016 13:23:44 +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 D3691203AA for ; Fri, 22 Jan 2016 13:23:43 +0000 (UTC) Received: from localhost ([::1]:53707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMbgl-0004PD-65 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 Jan 2016 08:23:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMbeW-0000kD-8K for qemu-devel@nongnu.org; Fri, 22 Jan 2016 08:21:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMbeV-0002R8-E9 for qemu-devel@nongnu.org; Fri, 22 Jan 2016 08:21:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMbeV-0002R3-8d for qemu-devel@nongnu.org; Fri, 22 Jan 2016 08:21:23 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id E6738C0AC92B for ; Fri, 22 Jan 2016 13:21:22 +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-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MDL5gL021584; Fri, 22 Jan 2016 08:21:20 -0500 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Fri, 22 Jan 2016 14:21:00 +0100 Message-Id: <1453468862-118912-8-git-send-email-imammedo@redhat.com> In-Reply-To: <1453468862-118912-1-git-send-email-imammedo@redhat.com> References: <1453468862-118912-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 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, lersek@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH v18 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 f043009..3c5a936 100644 --- a/vl.c +++ b/vl.c @@ -4491,6 +4491,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); }