> If we had a S390KVMAccelerator object on machine->accelerator, > S390KVMAccelerator::host_model would be a good candidate?
Depends if at that point the machine would already be initialized (we disable CPU model support for KVM on some legacy machine due to interactions). It's complicated :) [...] >> Right now the semantics are clear: if we have "!cpu->model" after the >> object has been created, details about the host CPU model are not >> available (models unavailable/unsupported). Modifying properties, >> baselining, expanding is not possible with that model then. But it can >> be used for execution. > > This is interesting. If most users of cpu->model don't care > about kvm_s390_get_host_cpu_model() errors at all, the current > solution sounds more reasonable. > > Except for the error_report_err() call inside instance_init. > This still bothers me, but it's not a big deal. Yes, we should refactor that. I'll add this to my TODO list! -- Thanks, David / dhildenb