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"">

  (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" <>
Cc: Bastian Koppelmann <>
Cc: David Gibson <>
Cc: Eric Blake <>
Cc: Gerd Hoffmann <>
Cc: Kashyap Chamarthy <>
Cc: Laurent Vivier <>
Cc: Markus Armbruster <>
Cc: Michael Clark <>
Cc: Palmer Dabbelt <>
Cc: Paolo Bonzini <>
Cc: Peter Crosthwaite <>
Cc: Richard Henderson <>
Cc: Riku Voipio <>
Cc: Sagar Karandikar <>
Cc: Thomas Huth <>


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
  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/ |   2 +-
 7 files changed, 380 insertions(+), 112 deletions(-)


Reply via email to