This patch set adds the @SysEmuTarget enum type, and rebases a few other types to it. Here's the "anatomy" of the series:
- Patches #1 and #2 fix QAPI bugs that have crept in in the 2.12 development cycle. I noticed the bugs while working on patch #6; i.e. patch #6 depends on #1 and #2. The issues should likely be fixed in 2.12.1, so patches #1 and #2 are CC'd to qemu-stable. - Patch #3 is what I primarily care about in this series. It introduces the @SysEmuTarget enum, for the sake of my end-goal patch at: [Qemu-devel] [qemu RFC v3 3/3] qapi: add "firmware.json" 20180420231246.23130-4-lersek@redhat.com">http://mid.mail-archive.com/20180420231246.23130-4-lersek@redhat.com (BTW review comments for that RFCv3 patch are still super welcome). - Patch #4 is a small cleanup that utilizes @SysEmuTarget, rebasing @TargetInfo to it. - Patch #5 is an attempt at normalizing @CpuInfo and @CpuInfoFast, by factoring out @CpuInfoCommon. I'm proposing this in order to save some busy-work for patch #6. If patch #5 is doing the wrong thing, it can be dropped, with relatively small updates to patch #6. - Patch #6 demotes the current discriminator field of @CpuInfo and @CpuInfoFast, namely @arch (of type @CpuInfoArch), to "normal base struct field", and introduces @target (of type @SysEmuTarget) in its place. This is a pretty intrusive patch which caused me hours of struggle. Similarly to patch #4, the goal is to help clean up the fuzz around the "target architecture" concept in QAPI. I'm proposing this patch because Markus suggested that I might try :) If significantly more work was necessary to hammer this patch into acceptable shape, then I'd prefer to limit the scope, just add @target, and keep @arch as the discriminator. Sorry about the humongous CC list. Cc: "Daniel P. Berrange" <berra...@redhat.com> Cc: Bastian Koppelmann <kbast...@mail.uni-paderborn.de> Cc: David Gibson <dgib...@redhat.com> Cc: Eric Blake <ebl...@redhat.com> Cc: Gerd Hoffmann <kra...@redhat.com> Cc: Kashyap Chamarthy <kcham...@redhat.com> Cc: Laurent Vivier <laur...@vivier.eu> Cc: Markus Armbruster <arm...@redhat.com> Cc: Michael Clark <m...@sifive.com> Cc: Palmer Dabbelt <pal...@sifive.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Peter Crosthwaite <crosthwaite.pe...@gmail.com> Cc: Richard Henderson <r...@twiddle.net> Cc: Riku Voipio <riku.voi...@iki.fi> Cc: Sagar Karandikar <sag...@eecs.berkeley.edu> Cc: Thomas Huth <th...@redhat.com> Thanks Laszlo Laszlo Ersek (6): qapi: fill in CpuInfoFast.arch in query-cpus-fast qapi: handle the riscv CpuInfoArch in query-cpus-fast qapi: add SysEmuTarget to "common.json" qapi: change the type of TargetInfo.arch from string to enum SysEmuTarget qapi: extract CpuInfoCommon to mitigate schema duplication qapi: discriminate CpuInfo[Fast] on SysEmuTarget, not CpuInfoArch qapi/common.json | 19 +++ qapi/misc.json | 196 ++++++++++++++++++++------- qapi/qapi-schema.json | 2 +- arch_init.c | 10 +- cpus.c | 261 ++++++++++++++++++++++++++++-------- tests/test-x86-cpuid-compat.c | 2 +- tests/migration/guestperf/engine.py | 2 +- 7 files changed, 380 insertions(+), 112 deletions(-) -- 2.14.1.3.gb7cf6e02401b