Expose new features for intel processor
cover Expose new features for intel processor
This patchset is to expose two new features for intel processors which support them, like Sapphire Rapids. SERIALIZE is a faster serializing instruction which does not modify registers, arithmetic flags or memory, will not cause VM exit. TSX suspend load tracking instruction aims to give a way to choose which memory accesses do not need to be tracked in the TSX read set.
Cathy Zhang (2):
x86: Expose SERIALIZE for supported cpuid
x86: Expose TSX Suspend Load Address Tracking
arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1
PATCH 1/2 x86: Expose SERIALIZE for supported cpuid
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/
--- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/cpuid.c +2 -1
@@ -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. */
Signature · 1 line
1.8.3.1
kernel test robot
build botRe: [PATCH 1/2] x86: Expose SERIALIZE for supported cpuid
Thank you for the patch! Yet something to improve:
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
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 9087382003e355592 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(a)lists.01.org
PATCH 2/2 x86: Expose TSX Suspend Load Address Tracking
In reply to Cathy ZhangTSX Suspend Load Address Tracking is supported by intel processors, like Sapphire Rapids. Expose it in KVM supported cpuid.
The associated kernel enumeration patches link is as follows:
https://lore.kernel.org/patchwork/patch/1254756/
--- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/cpuid.c +1 -1
@@ -342,7 +342,7 @@ void kvm_set_cpu_caps(void)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 (SERIALIZE ) +F (SERIALIZE ) |F (TSX_LDTRK ) );/* TSC_ADJUST and ARCH_CAPABILITIES are emulated in software. */
Signature · 1 line
1.8.3.1
kernel test robot
build botRe: [PATCH 2/2] x86: Expose TSX Suspend Load Address Tracking
Thank you for the patch! Yet something to improve:
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
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) | F(TSX_LDTRK)
| ^
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) | F(TSX_LDTRK)
| ^
>> arch/x86/kvm/cpuid.h:91:42: error: 'X86_FEATURE_TSX_LDTRK' undeclared (first use in this function); did you mean 'X86_FEATURE_TSC_ADJUST'?
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:18: note: in expansion of macro 'F'
345 | F(SERIALIZE) | F(TSX_LDTRK)
| ^vim +91 arch/x86/kvm/cpuid.h
a0a2260c12d865 Sean Christopherson 2019-12-17 9087382003e35559 Sean Christopherson 2019-12-17 @91 #define feature_bit(name) __feature_bit(X86_FEATURE_##name) 87382003e35559 Sean Christopherson 2019-12-17 92
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org