On 1/31/19 11:14 PM, Paolo Bonzini wrote: > On 31/01/19 22:22, Philippe Mathieu-Daudé wrote: >> I kinda disagree with the SuperIO generated configs here, but partly my >> fault because the previous Makefile.objs missed the CONFIG_ISA_SUPERIO >> (I missed to review eae2e2e96bf from Thomas where is introduced >> CONFIG_SMC37C669). >> So introducing ISA_SUPERIO simplifies this files and SouthBridge >> devices. I'm not sure how to provide this patch: > > The problem is different SuperIO chips can have or lack > floppy/serial/parallel, and so they end up having different dependencies. > > Config symbols are a tool to generate working QEMUs (where working = > build and pass device-introspect-test more or less), they needn't > reflect precisely the topology of the machine.
The model implementation is: - abstract SuperIO parent which can instantiate all configs, - child implementation. Childs require their parent, and even if the parent will instantiate them without all properties, the parent needs to link with them. In short, if a SuperIO child requires ISA_SUPERIO, it also requires to link to serial/parallel/floppy/ide. That's why I prefer the explicit dependencies. Oh, actually if we correctly use the TYPE_XXX names, it might link. The only problem would be trying to instantiate a device via QMP then?