diff mbox series

[v2,03/10] target/i386: Fix duplicated feature name in FEAT_KVM

Message ID 20230908124534.25027-4-twiederh@redhat.com
State New
Headers show
Series Generate x86 cpu features | expand

Commit Message

Tim Wiederhake Sept. 8, 2023, 12:45 p.m. UTC
The mistake became apparent as there were two features with the same name
in this cpuid leaf. The names are now in line with the documentation from
https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html

Fixes: 642258c6c7 ("kvm: add kvmclock to its second bit")
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
---
 target/i386/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Igor Mammedov Sept. 8, 2023, 2:21 p.m. UTC | #1
On Fri,  8 Sep 2023 14:45:27 +0200
Tim Wiederhake <twiederh@redhat.com> wrote:

> The mistake became apparent as there were two features with the same name
> in this cpuid leaf. The names are now in line with the documentation from
> https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html

I'd describe what duplication breaks and it's effects.

and also why it's considered that it's safe to change names here.

> Fixes: 642258c6c7 ("kvm: add kvmclock to its second bit")
> Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
> ---
>  target/i386/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index f10d343935..f0fedf4b88 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -852,7 +852,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
>      [FEAT_KVM] = {
>          .type = CPUID_FEATURE_WORD,
>          .feat_names = {
> -            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock",
> +            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock2",
>              "kvm-asyncpf", "kvm-steal-time", "kvm-pv-eoi", "kvm-pv-unhalt",
>              NULL, "kvm-pv-tlb-flush", NULL, "kvm-pv-ipi",
>              "kvm-poll-control", "kvm-pv-sched-yield", "kvm-asyncpf-int", "kvm-msi-ext-dest-id",
Tim Wiederhake Sept. 15, 2023, 3:53 p.m. UTC | #2
On Fri, 2023-09-08 at 16:21 +0200, Igor Mammedov wrote:
> On Fri,  8 Sep 2023 14:45:27 +0200
> Tim Wiederhake <twiederh@redhat.com> wrote:
> 
> > The mistake became apparent as there were two features with the
> > same name
> > in this cpuid leaf. The names are now in line with the
> > documentation from
> > https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html
> 
> I'd describe what duplication breaks and it's effects.
> 
> and also why it's considered that it's safe to change names here.
> 
This is my first contribution to qemu. I do not know whether it is safe
to change the names, nor how to find out I'm afraid. I ran `make test`,
if that is what you mean.

Please let me know what you need me to do here.

In the meantime, I will separate the patches that rename / fix feature
names from the remaining patch set, and split the changes up as
requested.

Regards,
Tim

> > Fixes: 642258c6c7 ("kvm: add kvmclock to its second bit")
> > Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
> > ---
> >  target/i386/cpu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> > index f10d343935..f0fedf4b88 100644
> > --- a/target/i386/cpu.c
> > +++ b/target/i386/cpu.c
> > @@ -852,7 +852,7 @@ FeatureWordInfo
> > feature_word_info[FEATURE_WORDS] = {
> >      [FEAT_KVM] = {
> >          .type = CPUID_FEATURE_WORD,
> >          .feat_names = {
> > -            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock",
> > +            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock2",
> >              "kvm-asyncpf", "kvm-steal-time", "kvm-pv-eoi", "kvm-
> > pv-unhalt",
> >              NULL, "kvm-pv-tlb-flush", NULL, "kvm-pv-ipi",
> >              "kvm-poll-control", "kvm-pv-sched-yield", "kvm-
> > asyncpf-int", "kvm-msi-ext-dest-id",
>
diff mbox series

Patch

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index f10d343935..f0fedf4b88 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -852,7 +852,7 @@  FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
     [FEAT_KVM] = {
         .type = CPUID_FEATURE_WORD,
         .feat_names = {
-            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock",
+            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock2",
             "kvm-asyncpf", "kvm-steal-time", "kvm-pv-eoi", "kvm-pv-unhalt",
             NULL, "kvm-pv-tlb-flush", NULL, "kvm-pv-ipi",
             "kvm-poll-control", "kvm-pv-sched-yield", "kvm-asyncpf-int", "kvm-msi-ext-dest-id",