Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1516332

Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest
Date 2016-11-07 18:00 +0100
Message-ID <sAVr4-5FZ-45@gated-at.bofh.it> (permalink)
References <szGX8-6ZA-11@gated-at.bofh.it> <szKo2-C9-3@gated-at.bofh.it> <sAHHr-5aJ-1@gated-at.bofh.it> <sAO6e-UV-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 7 Nov 2016, Borislav Petkov wrote:

> On Mon, Nov 07, 2016 at 10:10:07AM +0800, He Chen wrote:
> > It should be, but I found it conflcts with `struct cpuid_regs` in
> > `arch/x86/kernel/cpuid.c` since it got exported.
> 
> So make the cpuid.c-one static.

That does not work.

processor.h

enum cpuid_regs {
     ....
};

cpuid.c

struct cpuid_regs {
      ....
};

How do you make that struct definition static? And even if that'd work, how
would that help to avoid the name clash in cpuid.c?

Not at all.

Both the enum and the struct should be in processor.h obviously with
different names so we won't trip over this once more. And the obvious
naming is:

struct cpuid_regs {
      u32 eax, ebx, ecx, edx;
};

enum cpuid_regs_idx {
     CPUID_EAX,
     CPUID_EBX,
     CPUID_ECX,
     CPUID_EDX,
};

as CR_E*X is just not intuitive at all.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest He Chen <he.chen@linux.intel.com> - 2016-11-04 08:20 +0100
  Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Borislav Petkov <bp@alien8.de> - 2016-11-04 12:00 +0100
    Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Paolo Bonzini <pbonzini@redhat.com> - 2016-11-04 16:00 +0100
      Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Borislav Petkov <bp@alien8.de> - 2016-11-04 16:10 +0100
        Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Paolo Bonzini <pbonzini@redhat.com> - 2016-11-04 16:20 +0100
          Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Borislav Petkov <bp@alien8.de> - 2016-11-04 17:00 +0100
            Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Paolo Bonzini <pbonzini@redhat.com> - 2016-11-04 17:00 +0100
          Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Thomas Gleixner <tglx@linutronix.de> - 2016-11-07 18:00 +0100
    Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest He Chen <he.chen@linux.intel.com> - 2016-11-07 03:20 +0100
      Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Borislav Petkov <bp@alien8.de> - 2016-11-07 10:10 +0100
        Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Thomas Gleixner <tglx@linutronix.de> - 2016-11-07 18:00 +0100
          Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS  features to kvm guest Borislav Petkov <bp@alien8.de> - 2016-11-07 18:10 +0100

csiph-web