On Tue, 20 Jan 2026 at 14:15, Thomas Huth <[email protected]> wrote: > > On 20/01/2026 13.55, Peter Maydell wrote: > > On Tue, 20 Jan 2026 at 12:21, Thomas Huth <[email protected]> wrote: > >> > >> From: Thomas Huth <[email protected]> > >> > >> The hw_compat_* arrays in hw/core/machine.c should be used for generic > >> compat settings that might affect all (or at least multiple) machines. > >> Target specific settings should rather go into the target specific > >> source files instead. For arm/aarch64, the virt machine is the only > >> one that cares about compat settings, so move the "arm-cpu" related > >> switches to hw/arm/virt.c now. > > > > I think it makes more sense for all the compat stuff to > > live in one place, rather than being scattered around, > > unless it is truly machine-specific (which this isn't). > > It's only used by the arm virt machine, so it's IMHO machine specific. > If we will ever get other versionized arm machines, they won't use these > config knobs, so this never will be shared with another machine.
It happens to be only used by the virt board, but that's just a coincidence that we only have one versioned arm board right now. The config knob itself is not at all board specific: it applies to a device object that is used by many boards and sets a behaviour that would usefully apply to all of them. If we ever did have more arm versioned machines in the future we'd end up with a weird split where compat properties of the CPU object that happened to pre-date the addition of that second machine type would be in one place in the source code, and properties that happened to post-date the second machine type would be somewhere else. thanks -- PMM
