[libvirt] [PATCH v3 17/20] cpu: Implement backwards compatibility in the ppc64 driver

Andrea Bolognani abologna at redhat.com
Tue Aug 11 13:51:11 UTC 2015


On Tue, 2015-08-11 at 15:17 +0200, Jiri Denemark wrote:
> 
> > +/* Convert a legacy CPU definition by transforming
> > + * model names to generation names:
> > + *   POWER7_v2.1  => POWER7
> > + *   POWER7_v2.3  => POWER7
> > + *   POWER7+_v2.1 => POWER7
> > + *   POWER8_v1.0  => POWER8 */
> > +static virCPUDefPtr
> > +ppc64LegacyConvertCPUDef(const virCPUDef *legacy)
> 
> I think ppc64ConvertLegacyCPUDef would be a slightly better name.

Agreed, I've changed the name as per your suggestion.

> When reading the tests, I realized we don't do any compatibility 
> hacks
> for *Baseline, which is correct because it never worked on Power, but 
> we
> should explicitly document it inside ppc64Baseline to avoid confusion 
> in
> the future.

I've added a comment explaining the reason why we can't handle
that situation any better.

Cheers.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team




More information about the libvir-list mailing list