Received: from eggs.gnu.org ([2001:4830:134:3::10]:42959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azpHW-0002xN-CT for qemu-devel@nongnu.org; Mon, 09 May 2016 13:47:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azpHQ-00044l-A0 for qemu-devel@nongnu.org; Mon, 09 May 2016 13:47:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azpHQ-00044Z-4Q for qemu-devel@nongnu.org; Mon, 09 May 2016 13:47:40 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 142133B75A for ; Mon, 9 May 2016 17:47:39 +0000 (UTC) From: Marcel Apfelbaum Date: Mon, 9 May 2016 20:47:33 +0300 Message-Id: <1462816056-17463-1-git-send-email-marcel@redhat.com> Subject: [Qemu-devel] [PATCH RFC 0/3] qdev: order devices by priority before creating them List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcel@redhat.com, pbonzini@redhat.com, mst@redhat.com This series aims to allow more devices to be used with '-device' by sorting the devices based on a predefined creation order flag before creating them. Devices like IOMMU need to be created before others, so they can leverage the DeviceCreationPriority flag introduced by the first patch to DeviceClass. The second patch sorts the devices by their DeviceCreationPriority before creating them. Finally, the last patch demonstrates how it can be used to ensure the creation of host-bridges before the pci-bridges and pci-bridges before the others. I preferred to combine all the priorities into a single enum to better manage the creation order. This is an RFC because I only wanted to know if it seems like the right way to go. Comments are appreciated, Thanks, Marcel Marcel Apfelbaum (3): qdev: add device creation priority flag vl.c: create devices by their creation priority flag hw/pci-bridge: add the corresponding creation priority flag hw/pci-bridge/pci_bridge_dev.c | 1 + hw/pci-bridge/pci_expander_bridge.c | 2 ++ include/hw/qdev-core.h | 13 +++++++++ include/monitor/qdev.h | 1 + qdev-monitor.c | 19 +++++++++++++ vl.c | 55 +++++++++++++++++++++++++++++++------ 6 files changed, 82 insertions(+), 9 deletions(-) -- 2.4.3