diff mbox series

[1/2] x86: Expose SERIALIZE for supported cpuid

Message ID 1593989992-10019-2-git-send-email-cathy.zhang@intel.com (mailing list archive)
State New, archived
Headers show
Series Expose new features for intel processor | expand

Commit Message

Zhang, Cathy July 5, 2020, 10:59 p.m. UTC
SERIALIZE instruction is supported by intel processors,
like Sapphire Rapids. Expose it in KVM supported cpuid.

The SERIALIZE enumeration kernel patch link is as follows:
https://lore.kernel.org/patchwork/patch/1254757/

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
---
 arch/x86/kvm/cpuid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

kernel test robot July 6, 2020, 6:06 p.m. UTC | #1
Hi Cathy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on kvm/linux-next]
[also build test ERROR on tip/auto-latest linux/master linus/master v5.8-rc4 next-20200706]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cathy-Zhang/Expose-new-features-for-intel-processor/20200706-070640
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/x86/kvm/cpuid.c:21:
   arch/x86/kvm/cpuid.c: In function 'kvm_set_cpu_caps':
>> arch/x86/kvm/cpuid.h:91:42: error: 'X86_FEATURE_SERIALIZE' undeclared (first use in this function); did you mean 'X86_FEATURE_RETPOLINE'?
      91 | #define feature_bit(name)  __feature_bit(X86_FEATURE_##name)
         |                                          ^~~~~~~~~~~~
   arch/x86/kvm/cpuid.c:55:11: note: in expansion of macro 'feature_bit'
      55 | #define F feature_bit
         |           ^~~~~~~~~~~
   arch/x86/kvm/cpuid.c:345:3: note: in expansion of macro 'F'
     345 |   F(SERIALIZE)
         |   ^
   arch/x86/kvm/cpuid.h:91:42: note: each undeclared identifier is reported only once for each function it appears in
      91 | #define feature_bit(name)  __feature_bit(X86_FEATURE_##name)
         |                                          ^~~~~~~~~~~~
   arch/x86/kvm/cpuid.c:55:11: note: in expansion of macro 'feature_bit'
      55 | #define F feature_bit
         |           ^~~~~~~~~~~
   arch/x86/kvm/cpuid.c:345:3: note: in expansion of macro 'F'
     345 |   F(SERIALIZE)
         |   ^

vim +91 arch/x86/kvm/cpuid.h

a0a2260c12d8658 Sean Christopherson 2019-12-17  90  
87382003e355592 Sean Christopherson 2019-12-17 @91  #define feature_bit(name)  __feature_bit(X86_FEATURE_##name)
87382003e355592 Sean Christopherson 2019-12-17  92  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 8a294f9..e603aeb 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -341,7 +341,8 @@  void kvm_set_cpu_caps(void)
 	kvm_cpu_cap_mask(CPUID_7_EDX,
 		F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) |
 		F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES) | F(INTEL_STIBP) |
-		F(MD_CLEAR) | F(AVX512_VP2INTERSECT) | F(FSRM)
+		F(MD_CLEAR) | F(AVX512_VP2INTERSECT) | F(FSRM) |
+		F(SERIALIZE)
 	);
 
 	/* TSC_ADJUST and ARCH_CAPABILITIES are emulated in software. */