qemu-arm
[Top][All Lists]
Advanced

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

Re: [RFC 7/9] target/arm: Add CPU features to query-cpu-model-expansion


From: Andrew Jones
Subject: Re: [RFC 7/9] target/arm: Add CPU features to query-cpu-model-expansion
Date: Sat, 15 Aug 2020 09:02:54 +0200

On Sat, Aug 15, 2020 at 10:19:05AM +0800, Peng Liang wrote:
> On 8/13/2020 8:56 PM, Andrew Jones wrote:
> > On Thu, Aug 13, 2020 at 06:26:55PM +0800, Peng Liang wrote:
> >> Add CPU features to the result of query-cpu-model-expansion so that
> >> other applications (such as libvirt) can know the supported CPU
> >> features.
> >>
> >> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
> >> Signed-off-by: Peng Liang <liangpeng10@huawei.com>
> >> ---
> >>  target/arm/cpu.c     | 41 +++++++++++++++++++++++++++++++++++++++++
> >>  target/arm/cpu.h     |  2 ++
> >>  target/arm/monitor.c |  2 ++
> >>  3 files changed, 45 insertions(+)
> >>
> >> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> >> index 3fc54cb3a4..0f620e8afe 100644
> >> --- a/target/arm/cpu.c
> >> +++ b/target/arm/cpu.c
> >> @@ -25,6 +25,8 @@
> >>  #include "qemu/module.h"
> >>  #include "qapi/error.h"
> >>  #include "qapi/visitor.h"
> >> +#include "qapi/qmp/qdict.h"
> >> +#include "qom/qom-qobject.h"
> >>  #include "cpu.h"
> >>  #include "internals.h"
> >>  #include "exec/exec-all.h"
> >> @@ -1515,6 +1517,45 @@ static const CPUFeatureDep feature_dependencies[] = 
> >> {
> >>      },
> >>  };
> >>  
> >> +static char *strtolower(char *src)
> >> +{
> >> +    char *start = src;
> >> +
> >> +    for (; *src; ++src) {
> >> +        *src = tolower(*src);
> >> +    }
> >> +
> >> +    return start;
> >> +}
> > 
> > Shouldn't need this. The CPU property names should already be lowercase.
> > 
> 
> For convenience, we use the field part defined in FIELD macro as the name of
> a CPU feature.  So, the names of CPU features are upper...

But then the command line requires capital letters for property names,
which isn't very convenient to the user. The field names could be
converted to lowercase when generating the property names.

Thanks,
drew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]