On Thu, Nov 05, 2026 at 01:56:51PM +0000, Peter Maydell wrote: > On Thu, 5 Nov 2026 at 13:48, Daniel P. Berrangé <[email protected]> wrote: > > > > On Thu, Nov 05, 2026 at 01:45:00PM +0000, Peter Maydell wrote: > > > On Thu, 5 Nov 2026 at 12:42, Daniel P. Berrangé <[email protected]> > > > wrote: > > > > So that essentially matches the historical semantics where one > > > > CPU class magically changes its behaviour based on what target > > > > is running. So in that sense, it works, and is no worse than > > > > the semantics we've had for 'max' models forever. > > > > > > > > Splitting into 2 distinct types is worthwhile if we want to > > > > make it possible for the aarch64 emulator to support a runtime > > > > choice of both 32-bit and 64-bit "max" models. > > > > > > What would the difference between that and configuring the 64-bit > > > capable "max" to not have AArch64 via "-cpu max-v8:aarch64=off" > > > (which should work today) ? > > > > Is that really the same result ? > > > > It seems like aarch64_max_v8_tcg_initfn does alot more CPU modelling > > than aarch32_max_v8_tcg_initfn, than just a single flag ? > > Conceptually it gets you to the same place -- a 32-bit only CPU > with all the 32-bit features turned on that we support. > > aarch64_max_v8_tcg_initfn() sets up all the 64-bit-only ID registers, > which is most of what its code is doing. But the handling of > "aarch64=off" then clears them all out via arm_clear_aarch64_idregs(), > and even if it didn't, any 64-bit-only features are by definition > unreachable from 32-bit code. > > It's possible it might not get you 100% absolutely an identical thing > from the guest's point of view, but any deviations should be minor > and I think we might consider them bugs. > > There are some minor UI-level things relating to CPU properties, > e.g. "qemu-system-arm -cpu max,sve=on" gives a property not found > error, but "qemu-system-aarch64 -cpu max-v8,aarch64=off,sve=on" > will run (with no visible difference to the guest since SVE > is AArch64 only). It probably ought to error out complaining > that you've asked for two things that conflict, but this is > "minor bug" I think.
Ok, in that case I'd agree aarch64 wouldn't need to expose a distinct 32-bit CPU model for max With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
