Hi Thomas, On Fri, Apr 19, 2024 at 09:50:46AM +0200, Thomas Huth wrote: > Date: Fri, 19 Apr 2024 09:50:46 +0200 > From: Thomas Huth <th...@redhat.com> > Subject: Re: [PATCH 3/6] target/s390x/cpu_models: Make > kvm_s390_get_host_cpu_model() return boolean > > On 19/04/2024 08.57, Zhao Liu wrote: > > From: Zhao Liu <zhao1....@intel.com> > > > > As error.h suggested, the best practice for callee is to return > > something to indicate success / failure. > > > > So make kvm_s390_get_host_cpu_model() return boolean and check the > > returned boolean in get_max_cpu_model() instead of accessing @err. > > > > Additionally, since now get_max_cpu_model() returns directly if > > kvm_s390_get_host_cpu_model() fills @err, so make > > kvm_s390_get_host_cpu_model() return true by default for the non-KVM > > case in target/s390x/cpu_models.h. > > You could also argue the other way round that there should be something in > *model if it returns "true" ... anyway, the stub should never be executed, > so it likely doesn't matter too much, but I'd still prefer if we'd rather > return "false" in the non-KVM stub instead.
I see, since this interface in wrapped in kvm_enabled() condition, so the non-kvm sutb wouldn't be called. Thanks! Will change to return false. Regards, Zhao