Received: from [140.186.70.92] (port=43837 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLm79-0004Ja-Rh for qemu-devel@nongnu.org; Mon, 07 Jun 2010 19:52:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLm78-00038Y-MG for qemu-devel@nongnu.org; Mon, 07 Jun 2010 19:52:19 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:46664) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLm78-00037z-F2 for qemu-devel@nongnu.org; Mon, 07 Jun 2010 19:52:18 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e6.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o57NoeCL025733 for ; Mon, 7 Jun 2010 19:50:40 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o57NqEUm2068690 for ; Mon, 7 Jun 2010 19:52:14 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o57NqE6g009992 for ; Mon, 7 Jun 2010 20:52:14 -0300 From: Anthony Liguori Date: Mon, 7 Jun 2010 18:51:48 -0500 Message-Id: <1275954730-8196-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 0/22] Refactor machine support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Glauber Costa , Paul Brook This series introduces a rather radical change in the way we deal with machine definitions in QEMU. Here are the features this series introduces: - Machines are definable via a -machine-def option or a [machine-def] config stanza - Parameters such as -kernel, -initrd, -append, -m, -acpi-enable, -enable-kvm, and potentially many more are now support via a config - It's possible to set a default block format (ide, scsi, virtio) for a machine - It's possible to make kvm enablement a property of a machine type. The support modes are KVM enabled, TCG enabled, and KVM enabled with TCG fallback. - All properties of the default machine type are overridable via global config. IOW, you can make KVM enablement default without touching the source code. You can also increase the default ram size without touching any code. Conceptually, it works by introducing a MachineCore concept. A MachineCore is a function that is able to create a machine based on a set of user specified parameters. These parameters may be high level properties (like ram size) or qdev global properties (virtio-blk-pci.vectors). A builtin Machine is an instance of a MachineCore that has a set of default parameters set. The concept of MachineCore is *not* a stop-gap measure for proper qdev conversion. Rather, the idea behind MachineCore is that it's a device tree builder. You certainly could still have a machine described purely by a device tree and qdev properties but that's not enough to represent the UI that we currently expose. We need a way convert user visible operations like enable usb to platform specific operations like add a PIIX3 USB hub. This is what a MachineCore does.