Re: [PATCH v2] treat host models as case-insensitive strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 12/26/2017 02:55 PM, Scott Garfinkle wrote:
> Qemu now allows case-insensitive specification of CPU models. This fixes the
> resulting problems on (at least) POWER arch machines.

Would have been great to reference which qemu commit number, but there's
probably way too many.  Perhaps best to note it's as of QEMU 2.11.  My
quick search turns up "03c9141d75" and "4a12c699d", is that about right?
Although there's quite a few other ones too

> 
> Patch V2: Change only the internal interface. This solves the actual problem at
> hand of reporting unsupported models now that qemu allows case-insensitive
> strings (e.g. "Power8" instead of "POWER8").

This hunk would typically go under the "---" below to give a hint to the
reviewer about what changed.

Hopefully no one someday decides POWER8 is more "powerful" than Power8
;-) (couldn't resist).

> 
> Signed-off-by: Scott Garfinkle <scottgar@xxxxxxxxxxxxxxxxxx>
> ---
>  src/conf/domain_capabilities.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

This seems like a reasonable way to approach the problem.  I can fix up
the comment message a bit and will push later... Just want to make sure
that no one else comes up with a latent concern...  The only thing that
springs to my mind is migration possibly.

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

> diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
> index e7323a8..f7d9be5 100644
> --- a/src/conf/domain_capabilities.c
> +++ b/src/conf/domain_capabilities.c
> @@ -271,7 +271,7 @@ virDomainCapsCPUModelsGet(virDomainCapsCPUModelsPtr cpuModels,
>          return NULL;
>  
>      for (i = 0; i < cpuModels->nmodels; i++) {
> -        if (STREQ(cpuModels->models[i].name, name))
> +        if (STRCASEEQ(cpuModels->models[i].name, name))
>              return cpuModels->models + i;
>      }
>  
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux