On Fri, 18 Aug 2017 15:08:48 -0300 Eduardo Habkost <ehabk...@redhat.com> wrote:
> On Fri, Aug 18, 2017 at 12:08:38PM +0200, Igor Mammedov wrote: > > Move cpu_model +-feat parsing into a separate file so that it > > could be reused later for parsing similar format of sparc target > > > > Signed-off-by: Igor Mammedov <imamm...@redhat.com> > [...] > > diff --git a/include/qom/cpu.h b/include/qom/cpu.h > > index 25eefea..30247dc 100644 > > --- a/include/qom/cpu.h > > +++ b/include/qom/cpu.h > > @@ -1038,4 +1038,6 @@ extern const struct VMStateDescription > > vmstate_cpu_common; > > > > #define UNASSIGNED_CPU_INDEX -1 > > > > +void cpu_legacy_parse_featurestr(const char *typename, char *features, > > + Error **errp); > > #endif > > diff --git a/default-configs/i386-bsd-user.mak > > b/default-configs/i386-bsd-user.mak > > index af1b31a..b28a05f 100644 > > --- a/default-configs/i386-bsd-user.mak > > +++ b/default-configs/i386-bsd-user.mak > > @@ -1 +1,2 @@ > > # Default configuration for i386-bsd-user > > +CONFIG_LEGACY_CPU_FEATURES=y > > diff --git a/default-configs/i386-linux-user.mak > > b/default-configs/i386-linux-user.mak > > index 8657e68..c136967 100644 > > --- a/default-configs/i386-linux-user.mak > > +++ b/default-configs/i386-linux-user.mak > > @@ -1 +1,2 @@ > > # Default configuration for i386-linux-user > > +CONFIG_LEGACY_CPU_FEATURES=y > > diff --git a/default-configs/i386-softmmu.mak > > b/default-configs/i386-softmmu.mak > > index d2ab2f6..e3e7c0e 100644 > > --- a/default-configs/i386-softmmu.mak > > +++ b/default-configs/i386-softmmu.mak > > @@ -59,3 +59,4 @@ CONFIG_SMBIOS=y > > CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM) > > CONFIG_PXB=y > > CONFIG_ACPI_VMGENID=y > > +CONFIG_LEGACY_CPU_FEATURES=y > > diff --git a/default-configs/x86_64-bsd-user.mak > > b/default-configs/x86_64-bsd-user.mak > > index 73e5d34..952323c 100644 > > --- a/default-configs/x86_64-bsd-user.mak > > +++ b/default-configs/x86_64-bsd-user.mak > > @@ -1 +1,2 @@ > > # Default configuration for x86_64-bsd-user > > +CONFIG_LEGACY_CPU_FEATURES=y > > diff --git a/default-configs/x86_64-linux-user.mak > > b/default-configs/x86_64-linux-user.mak > > index bec1d9e..b513ef2 100644 > > --- a/default-configs/x86_64-linux-user.mak > > +++ b/default-configs/x86_64-linux-user.mak > > @@ -1 +1,2 @@ > > # Default configuration for x86_64-linux-user > > +CONFIG_LEGACY_CPU_FEATURES=y > > diff --git a/default-configs/x86_64-softmmu.mak > > b/default-configs/x86_64-softmmu.mak > > index 9bde2f1..6594ddf 100644 > > --- a/default-configs/x86_64-softmmu.mak > > +++ b/default-configs/x86_64-softmmu.mak > > @@ -59,3 +59,4 @@ CONFIG_SMBIOS=y > > CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM) > > CONFIG_PXB=y > > CONFIG_ACPI_VMGENID=y > > +CONFIG_LEGACY_CPU_FEATURES=y > [...] > > diff --git a/util/Makefile.objs b/util/Makefile.objs > > index 50a55ec..14e28f7 100644 > > --- a/util/Makefile.objs > > +++ b/util/Makefile.objs > > @@ -45,3 +45,4 @@ util-obj-y += qht.o > > util-obj-y += range.o > > util-obj-y += stats64.o > > util-obj-y += systemd.o > > +util-obj-$(CONFIG_LEGACY_CPU_FEATURES) += legacy_cpu_features_parser.o > > Do we really need this? Isn't it easier to just tell the linker > to drop the object file if it's unused? building unconditionally will make target limited builds to compile file uselessly, I don't care much about it but opted for a less impact way on build time vs patch size.