[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 05/11] target-i386: Remove underscores from p
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v4 05/11] target-i386: Remove underscores from property names |
Date: |
Fri, 30 Sep 2016 10:42:48 -0300 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Fri, Sep 30, 2016 at 09:29:58AM +0200, Jiri Denemark wrote:
> On Thu, Sep 29, 2016 at 18:14:53 -0300, Eduardo Habkost wrote:
> > Instead of translating the feature name entries when adding
> > property names, store the actual property names in the feature
> > name array.
> >
> > Signed-off-by: Eduardo Habkost <address@hidden>
> > ---
> > Changes series v3 -> v4:
> > * New patch added to series
> > ---
> > target-i386/cpu.c | 31 ++++++++++++++++---------------
> > 1 file changed, 16 insertions(+), 15 deletions(-)
> >
> > diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> > index 4eaec0e..7795a7c 100644
> > --- a/target-i386/cpu.c
> > +++ b/target-i386/cpu.c
> > @@ -279,11 +279,11 @@ static FeatureWordInfo
> > feature_word_info[FEATURE_WORDS] = {
> > [FEAT_1_ECX] = {
> > .feat_names = {
> > "pni|sse3" /* Intel,AMD sse3 */, "pclmulqdq|pclmuldq",
> > "dtes64", "monitor",
> > - "ds_cpl", "vmx", "smx", "est",
> > + "ds-cpl", "vmx", "smx", "est",
> > "tm2", "ssse3", "cid", NULL,
> > "fma", "cx16", "xtpr", "pdcm",
> > - NULL, "pcid", "dca", "sse4.1|sse4_1",
> > - "sse4.2|sse4_2", "x2apic", "movbe", "popcnt",
> > + NULL, "pcid", "dca", "sse4.1|sse4-1",
> > + "sse4.2|sse4-2", "x2apic", "movbe", "popcnt",
> > "tsc-deadline", "aes", "xsave", "osxsave",
> > "avx", "f16c", "rdrand", "hypervisor",
> > },
>
> It wasn't quite obvious to me where this means we can't use the names
> with underscores when talking to QEMU. So I tried it and apparently
> underscores are just silently translated to dashes. It's backward
> compatible this way. However, QEMU will always give us the names with
> dashes, which means we have even more differences between libvirt's
> feature names and QEMU's feature names. So assuming we'll have an
> interface for querying supported CPU properties (and their aliases),
> shouldn't the old underscore names be added as aliases? This way, we
> could actually know that "ds-cpl" means "ds_cpl".
Good idea. Instead of translating property names silently we can
add aliases for the ones where underscores were actually used. I
will look into it.
--
Eduardo
- [Qemu-devel] [PATCH v4 00/11] Add runnability info to query-cpu-definitions, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 01/11] tests: Add test case for x86 feature parsing compatibility, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 03/11] target-i386: Disable VME by default with TCG, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 04/11] target-i386: Make plus_features/minus_features QOM-based, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 07/11] target-i386: xsave: Add FP and SSE bits to x86_ext_save_areas, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 05/11] target-i386: Remove underscores from property names, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 02/11] target-i386: List CPU models using subclass list, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 08/11] target-i386: Move warning code outside x86_cpu_filter_features(), Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 06/11] target-i386: Register properties for feature aliases manually, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 11/11] target-i386: Return runnability information on query-cpu-definitions, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 10/11] qmp: Add runnability information to query-cpu-definitions, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 09/11] target-i386: x86_cpu_load_features() function, Eduardo Habkost, 2016/09/29