Philippe Mathieu-Daudé <phi...@linaro.org> writes: > machine-common.json declares a single type, which isn't > restricted to a particular target. Move this type in > machine.json. > > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Previous discussion at https://lore.kernel.org/qemu-devel/875y45kt8i....@pond.sub.org/ CpuS390Entitlement is specific to s390x. We need it for set-cpu-topology and the s390x-specific part of query-cpus-fast. The former is conditional on TARGET_S390X, and therefore must be in machine-target.json. The latter is not conditional, and in machine.json. If I remember correctly, I briefly explored making it conditional, but it was too messy to be worth the bother. Anyway. We have a target-specific type we want to use both in machine.json and machine-target.json. Neither of the two includes the other. Target-independent machine.json cannot include target-specific machine-target.json. Two solutions: 1. Define the type in machine.json, have machine-target.json include machine.json. Ugly: even more target-stuff in machine.json. Potentially slow: including qapi/qapi-*-machine-target.h now includes more. 2. Define the type in a submodule both include. Since nothing they include is a fitting home for the type, create one: machine-common.json. Ugly & potentially slow: yet another submodule. Nina chose to do 2. I figure I'd leave it as is until we get to the point where we can get rid of the *-target.json entirely.