Received: from eggs.gnu.org ([2001:4830:134:3::10]:57185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz5yf-0006Oy-7x for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:16:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz5yW-0003nw-T7 for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:16:13 -0400 Received: from oxygen.pond.sub.org ([144.76.244.19]:59061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz5yW-0003ng-O3 for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:16:04 -0400 From: Markus Armbruster References: <53A8366B.1020301@ozlabs.ru> Date: Mon, 23 Jun 2014 17:16:00 +0200 In-Reply-To: <53A8366B.1020301@ozlabs.ru> (Alexey Kardashevskiy's message of "Tue, 24 Jun 2014 00:15:07 +1000") Message-ID: <87y4wnejwv.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] machines and versions - why so many? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Paolo Bonzini , Paul Mackerras , "qemu-devel@nongnu.org" , Alexander Graf , Andreas =?utf-8?Q?F=C3=A4rber?= Alexey Kardashevskiy writes: > Hi! > > I have been hearing recently that we (server PPC) should have more that > just one pseries machine in QEMU because this is what everybody else does :) > > My current understanding is that multiple machines (like > pc-i440fx-1.4..2.1, and many others) are needed: > > 1) for the -nodefaults case when a lot of devices are still created and > there is no other way to configure them; > > in "pseries", only CPU + empty VIO + empty PCI buses are created, > everything else can be created explicitly; nothing to tweak; > > 2) to enable/disable CPUID_EXT_xxx bits (saw in x86); > > in "pseries", there is a "compat" property on CPU and that seems to be enough; > > 3) for devices which are created explicitly and for which we want some > capabilities be disabled and we do not want to bother about this every time > we run QEMU; > > ok, this one makes some sense for "pseries" to have (and upcoming > endianness register on VGA seems to be the case) but it seems that adding a > "compat" or "feature" property to the VGA device (and other devices which > deal with this kind of compatibility) is still more architecturally correct > thing to do, and let libvirt deal with the rest. > > Since I (almost) always miss the bigger picture, what do I miss now? :) Thanks! Actually, the true reasons for versioned machine types are stable guest ABI and migration compatibility. All the stuff you mentioned above (presence of devices, CPUID bits, optional device capabilities) is guest ABI. For some machines such as PCs, we want to keep the guest ABI stable. A release freezes the guest ABI. When we do something that affects it, we take care to change only the current, unfrozen ABI, and not the previously frozen ABIs. Versioned machine types let you pick a guest ABI. Typical usage is to create a guest with the latest machine type, then stick to that machine type forever. Migration turns "want to keep guest ABI stable" into "must keep guest ABI stable", and adds "must keep migration format compatible". Ensured by using the same versioned machine type on source and destination. If you don't care for migration, you probably don't need to bother with versioned machine types. If all you want is configure the board, check out machine options (the prop=value,... you can specify in addition to the machine type).