On Mon, Oct 09, 2017 at 09:51:06PM +0200, Igor Mammedov wrote: > use common cpu_model prasing in vl.c and set default cpu_model > using generic MachineClass::default_cpu_type. > > Beside of switching to generic infrastructure it solves several > issues. > > * ppc_cpu_class_by_name() is used to deal with lower/upper case > and alias translations into actual cpu type, which fixes > '-M powernv -cpu power8' and '-M powernv -cpu power9_v1.0' > usecases which error out with: > 'invalid CPU model 'FOO' for powernv machine' > * allows to switch to lower-case typenames in pnv chip/core name > (by convention typnames should be lower-case) > * replace aliased names /power8, power9, .../ with exact cpu model > names (i.e. typenames should be stable but aliases might decide to > point to other cpu model withi family or changed by kvm). It will > also help to simplify pnv_chip/core code and get rid of dependency > on cpu_model parsing. > > Signed-off-by: Igor Mammedov <imamm...@redhat.com> > Reviewed-by: Cédric Le Goater <c...@kaod.org>
It wouldn't have had an actual patch collision, but this should have the new power9 v2.0... [...] > -#define TYPE_PNV_CHIP_POWER9 TYPE_PNV_CHIP "-POWER9" > +#define TYPE_PNV_CHIP_POWER9 TYPE_PNV_CHIP "-power9_v1.0" > #define PNV_CHIP_POWER9(obj) \ > OBJECT_CHECK(PnvChip, (obj), TYPE_PNV_CHIP_POWER9) here [...] > @@ -781,7 +778,7 @@ static void pnv_chip_power9_class_init(ObjectClass > *klass, void *data) > DeviceClass *dc = DEVICE_CLASS(klass); > PnvChipClass *k = PNV_CHIP_CLASS(klass); > > - k->cpu_model = "POWER9"; > + k->cpu_model = "power9_v1.0"; > k->chip_type = PNV_CHIP_POWER9; > k->chip_cfam_id = 0x100d104980000000ull; /* P9 Nimbus DD1.0 */ > k->cores_mask = POWER9_CORE_MASK; ..and here.. > static const char *pnv_core_models[] = { > - "POWER8E", "POWER8", "POWER8NVL", "POWER9" > + "power8e_v2.1", "power8_v2.0", "power8nvl_v1.0", "power9_v1.0" > }; ..and here. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature