On 11/27/20 9:59 AM, Claudio Fontana wrote: > On 11/27/20 7:21 AM, Paolo Bonzini wrote: >> On 26/11/20 23:32, Claudio Fontana wrote: >>> + if (acc) { >>> + object_class_foreach(accel_init_cpu_int_aux, cpu_type, false, acc); >>> + } >> >> Any reason to do it for cpu_type only, rather than for all subclasses of >> CPU_RESOLVING_TYPE? This would remove the cpu_type argument to >> accel_init_cpu_interfaces and accel_init_interfaces. >> >> Otherwise I haven't done a careful review yet but it looks very nice, >> thanks! >> >> Paolo >> > > Hi Paolo, > > yes, I thought to pass cpu_type in order to set the interface only for the > cpu that is actually used, > instead of looping over all cpu models, just to be a bit quicker, but both > things should work. > > Ciao, > > Claudio >
Note that this actually creates a bug that is caught _ONLY_ by acceptance-system-centos. The gist of it is that cpu_type (or current_machine->default_cpu_type) is _not_ guaranteed to be set, the code there is a bit misleading I think. I'll look into it, but just wanted to warn early about it. Ciao, Claudio