On Thu, 4 Dec 2025 at 09:35, Corvin Köhne <[email protected]> wrote: > > From: YannickV <[email protected]> > > Read flash-type value as machine property and set the flash type > accordingly. > > Signed-off-by: YannickV <[email protected]>
Machine properties are user-facing : this one seems to let the user specify any random device name with no error checking which it will then try to instantiate. I think it would be better to have the base class code know via some other mechanism what kind of flash device it should create. One approach would be to have suitable information in the machine class struct, which is filled in by the class init function. You can see this in hw/arm/raspi.c, for instance, where we set a board_rev field that then the code creating the board can look at. thanks -- PMM
