From: "Andreas Färber" <afaerber@suse.de>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Marcel Apfelbaum <marcel.a@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
Paolo Bonzini <pbonzini@redhat.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PULL v2 2/9] well-defined listing order for machine types
Date: Mon, 03 Nov 2014 14:11:18 +0100 [thread overview]
Message-ID: <54577EF6.6070107@suse.de> (raw)
In-Reply-To: <54577D59.2010306@redhat.com>
Am 03.11.2014 um 14:04 schrieb Laszlo Ersek:
> On 10/22/14 10:18, Michael S. Tsirkin wrote:
>> From: Laszlo Ersek <lersek@redhat.com>
>>
>> Commit 261747f1 ("vl: Use MachineClass instead of global QEMUMachine
>> list") broke the ordering of the machine types in the user-visible output
>> of
>>
>> qemu-system-XXXX -M \?
>>
>> This occurred because registration was rebased from a manually maintained
>> linked list to GLib hash tables:
>>
>> qemu_register_machine()
>> type_register()
>> type_register_internal()
>> type_table_add()
>> g_hash_table_insert()
>>
>> and because the listing was rebased accordingly, from the traversal of the
>> list to the traversal of the hash table (rendered as an ad-hoc list):
>>
>> machine_parse()
>> object_class_get_list(TYPE_MACHINE)
>> object_class_foreach()
>> g_hash_table_foreach()
>>
>> The current order is a "random" one, for practical purposes, which is
>> annoying for users.
>>
>> Introduce new members QEMUMachine.family and MachineClass.family, allowing
>> machine types to be "clustered". Introduce a comparator function that
>> establishes a total ordering between machine types, ordering machine types
>> in the same family next to each other. In machine_parse(), list the
>> supported machine types sorted with the comparator function.
>>
>> The comparator function:
>> - sorts whole families before standalone machine types,
>> - sorts whole families between each other in alphabetically increasing
>> order,
>> - sorts machine types inside the same family in alphabetically decreasing
>> order,
>> - sorts standalone machine types between each other in alphabetically
>> increasing order.
>>
>> After this patch, all machine types are considered standalone, and
>> accordingly, the output is alphabetically ascending. This will be refined
>> in the following patches.
>>
>> Effects on the x86_64 output:
>>
>> Before:
>>
>>> Supported machines are:
>>> pc-0.13 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-2.0 Standard PC (i440FX + PIIX, 1996)
>>> pc-1.0 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-2.1 Standard PC (i440FX + PIIX, 1996)
>>> pc-q35-1.7 Standard PC (Q35 + ICH9, 2009)
>>> pc-1.1 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.14 Standard PC (i440FX + PIIX, 1996)
>>> pc-q35-2.0 Standard PC (Q35 + ICH9, 2009)
>>> pc-i440fx-1.4 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-1.5 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.15 Standard PC (i440FX + PIIX, 1996)
>>> pc-q35-1.4 Standard PC (Q35 + ICH9, 2009)
>>> isapc ISA-only PC
>>> pc Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-2.2)
>>> pc-i440fx-2.2 Standard PC (i440FX + PIIX, 1996) (default)
>>> pc-1.2 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.10 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.11 Standard PC (i440FX + PIIX, 1996)
>>> pc-q35-2.1 Standard PC (Q35 + ICH9, 2009)
>>> q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-2.2)
>>> pc-q35-2.2 Standard PC (Q35 + ICH9, 2009)
>>> pc-i440fx-1.6 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-1.7 Standard PC (i440FX + PIIX, 1996)
>>> none empty machine
>>> pc-q35-1.5 Standard PC (Q35 + ICH9, 2009)
>>> pc-q35-1.6 Standard PC (Q35 + ICH9, 2009)
>>> pc-0.12 Standard PC (i440FX + PIIX, 1996)
>>> pc-1.3 Standard PC (i440FX + PIIX, 1996)
>>
>> After:
>>
>>> Supported machines are:
>>> isapc ISA-only PC
>>> none empty machine
>>> pc-0.10 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.11 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.12 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.13 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.14 Standard PC (i440FX + PIIX, 1996)
>>> pc-0.15 Standard PC (i440FX + PIIX, 1996)
>>> pc-1.0 Standard PC (i440FX + PIIX, 1996)
>>> pc-1.1 Standard PC (i440FX + PIIX, 1996)
>>> pc-1.2 Standard PC (i440FX + PIIX, 1996)
>>> pc-1.3 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-1.4 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-1.5 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-1.6 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-1.7 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-2.0 Standard PC (i440FX + PIIX, 1996)
>>> pc-i440fx-2.1 Standard PC (i440FX + PIIX, 1996)
>>> pc Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-2.2)
>>> pc-i440fx-2.2 Standard PC (i440FX + PIIX, 1996) (default)
>>> pc-q35-1.4 Standard PC (Q35 + ICH9, 2009)
>>> pc-q35-1.5 Standard PC (Q35 + ICH9, 2009)
>>> pc-q35-1.6 Standard PC (Q35 + ICH9, 2009)
>>> pc-q35-1.7 Standard PC (Q35 + ICH9, 2009)
>>> pc-q35-2.0 Standard PC (Q35 + ICH9, 2009)
>>> pc-q35-2.1 Standard PC (Q35 + ICH9, 2009)
>>> q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-2.2)
>>> pc-q35-2.2 Standard PC (Q35 + ICH9, 2009)
>>
>> Effects on the aarch64 output:
>>
>> Before:
>>
>>> Supported machines are:
>>> lm3s811evb Stellaris LM3S811EVB
>>> canon-a1100 Canon PowerShot A1100 IS
>>> vexpress-a15 ARM Versatile Express for Cortex-A15
>>> vexpress-a9 ARM Versatile Express for Cortex-A9
>>> xilinx-zynq-a9 Xilinx Zynq Platform Baseboard for Cortex-A9
>>> connex Gumstix Connex (PXA255)
>>> n800 Nokia N800 tablet aka. RX-34 (OMAP2420)
>>> lm3s6965evb Stellaris LM3S6965EVB
>>> versatileab ARM Versatile/AB (ARM926EJ-S)
>>> borzoi Borzoi PDA (PXA270)
>>> tosa Tosa PDA (PXA255)
>>> cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310)
>>> midway Calxeda Midway (ECX-2000)
>>> mainstone Mainstone II (PXA27x)
>>> n810 Nokia N810 tablet aka. RX-44 (OMAP2420)
>>> terrier Terrier PDA (PXA270)
>>> highbank Calxeda Highbank (ECX-1000)
>>> cubieboard cubietech cubieboard
>>> sx1-v1 Siemens SX1 (OMAP310) V1
>>> sx1 Siemens SX1 (OMAP310) V2
>>> realview-eb-mpcore ARM RealView Emulation Baseboard (ARM11MPCore)
>>> kzm ARM KZM Emulation Baseboard (ARM1136)
>>> akita Akita PDA (PXA270)
>>> z2 Zipit Z2 (PXA27x)
>>> musicpal Marvell 88w8618 / MusicPal (ARM926EJ-S)
>>> realview-pb-a8 ARM RealView Platform Baseboard for Cortex-A8
>>> versatilepb ARM Versatile/PB (ARM926EJ-S)
>>> realview-eb ARM RealView Emulation Baseboard (ARM926EJ-S)
>>> realview-pbx-a9 ARM RealView Platform Baseboard Explore for Cortex-A9
>>> spitz Spitz PDA (PXA270)
>>> none empty machine
>>> virt ARM Virtual Machine
>>> collie Collie PDA (SA-1110)
>>> smdkc210 Samsung SMDKC210 board (Exynos4210)
>>> verdex Gumstix Verdex (PXA270)
>>> nuri Samsung NURI board (Exynos4210)
>>> integratorcp ARM Integrator/CP (ARM926EJ-S)
>>
>> After:
>>
>>> Supported machines are:
>>> akita Akita PDA (PXA270)
>>> borzoi Borzoi PDA (PXA270)
>>> canon-a1100 Canon PowerShot A1100 IS
>>> cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310)
>>> collie Collie PDA (SA-1110)
>>> connex Gumstix Connex (PXA255)
>>> cubieboard cubietech cubieboard
>>> highbank Calxeda Highbank (ECX-1000)
>>> integratorcp ARM Integrator/CP (ARM926EJ-S)
>>> kzm ARM KZM Emulation Baseboard (ARM1136)
>>> lm3s6965evb Stellaris LM3S6965EVB
>>> lm3s811evb Stellaris LM3S811EVB
>>> mainstone Mainstone II (PXA27x)
>>> midway Calxeda Midway (ECX-2000)
>>> musicpal Marvell 88w8618 / MusicPal (ARM926EJ-S)
>>> n800 Nokia N800 tablet aka. RX-34 (OMAP2420)
>>> n810 Nokia N810 tablet aka. RX-44 (OMAP2420)
>>> none empty machine
>>> nuri Samsung NURI board (Exynos4210)
>>> realview-eb ARM RealView Emulation Baseboard (ARM926EJ-S)
>>> realview-eb-mpcore ARM RealView Emulation Baseboard (ARM11MPCore)
>>> realview-pb-a8 ARM RealView Platform Baseboard for Cortex-A8
>>> realview-pbx-a9 ARM RealView Platform Baseboard Explore for Cortex-A9
>>> smdkc210 Samsung SMDKC210 board (Exynos4210)
>>> spitz Spitz PDA (PXA270)
>>> sx1 Siemens SX1 (OMAP310) V2
>>> sx1-v1 Siemens SX1 (OMAP310) V1
>>> terrier Terrier PDA (PXA270)
>>> tosa Tosa PDA (PXA255)
>>> verdex Gumstix Verdex (PXA270)
>>> versatileab ARM Versatile/AB (ARM926EJ-S)
>>> versatilepb ARM Versatile/PB (ARM926EJ-S)
>>> vexpress-a15 ARM Versatile Express for Cortex-A15
>>> vexpress-a9 ARM Versatile Express for Cortex-A9
>>> virt ARM Virtual Machine
>>> xilinx-zynq-a9 Xilinx Zynq Platform Baseboard for Cortex-A9
>>> z2 Zipit Z2 (PXA27x)
>>
>> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1145042
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
>> Acked-by: David Gibson <david@gibson.dropbear.id.au>
[...]
>
> May I ask about the fate of this PULL request (in particular I care
> about this patch, and the next one)?
Michael sent a new, larger PULL shortly before you asked. :)
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2014-11-03 13:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 8:18 [Qemu-devel] [PULL v2 0/9] pc, virtio, misc bugfixes Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 1/9] smbios: Fix assertion on socket count calculation Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 2/9] well-defined listing order for machine types Michael S. Tsirkin
2014-11-03 13:04 ` Laszlo Ersek
2014-11-03 13:10 ` Laszlo Ersek
2014-11-03 13:11 ` Andreas Färber [this message]
2014-11-03 13:11 ` Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 3/9] i386/pc: add piix and q35 machtypes to sorting families for -M \? Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 4/9] pc: Fix disabling of vapic for compat PC models Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 5/9] i386: Add an ACPI_EXTRACT_NAME_BUFFER16 directive Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 6/9] pcie: change confused comment clearer Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 7/9] virtio-pci: fix migration for pci bus master Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 8/9] intel_iommu: fix VTD_SID_TO_BUS Michael S. Tsirkin
2014-10-22 8:18 ` [Qemu-devel] [PULL v2 9/9] tests: fix rebuild-expected-aml.sh for acpi-test rename Michael S. Tsirkin
2014-10-22 20:42 ` [Qemu-devel] [PULL v2 0/9] pc, virtio, misc bugfixes Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54577EF6.6070107@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=lersek@redhat.com \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).