On Mon, 2014-09-22 at 22:38 +0200, Laszlo Ersek wrote: > The first patch introduces a generic comparator. This comparator should > cover all machine types at once that don't belong to machine type > "families". Hence, for example, the output it produces for > > qemu-system-aarch64 -M \? > > is meant to be final. (See examples in the patches.) > > The second patch files piix and q35 machine types into their respective > families. > > Paolo said we needed to care about "pseries, pc, q35", but I got no clue > about "pseries", so I didn't touch that. It shouldn't be hard for > someone who knows "pseries" to post a followup patch that covers it. > Until then, "pseries" machine types are listed in alphabetical order (no > families). > > Laszlo Ersek (2): > well-defined listing order for machine types > i386/pc: add piix and q35 machtypes to sorting families for -M \? > > include/hw/boards.h | 2 ++ > hw/i386/pc.c | 1 + > hw/i386/pc_piix.c | 1 + > hw/i386/pc_q35.c | 1 + > vl.c | 38 +++++++++++++++++++++++++++++++++++++- > 5 files changed, 42 insertions(+), 1 deletion(-) >
Looks good to me. Reviewed-by: Marcel Apfelbaum <marce...@redhat.com> Discussion only: 1. Adding the family field to machine options mechanism does leverage the machines hierarchy, but in another way and not through QOM. 2. The compare function looks exactly as I thought it would, my only difference was to take it a little further by let the family itself to sort its machines, but *is completely unnecessary* for this purpose. Your solution has a small footprint and I like it. Thanks, Marcel