diff mbox

[3/3] KVM: x86: expose MOVDIR64B CPU feature into VM.

Message ID 1531212883-63173-4-git-send-email-jingqi.liu@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liu, Jingqi July 10, 2018, 8:54 a.m. UTC
MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity.
Direct store is implemented by using write combining (WC) for writing
data directly into memory without caching the data.

Availability of the MOVDIR64B instruction is indicated by the presence
of the CPUID feature flag MOVDIR64B (CPUID.0x07.0x0:ECX[bit 28]).

This patch exposes the movdir64b feature to the guest.

The release document ref below link:
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf
This patch has a dependency on https://lkml.org/lkml/2018/6/15/655.

Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
---
 arch/x86/kvm/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

kernel test robot July 10, 2018, 10:04 a.m. UTC | #1
Hi Jingqi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on kvm/linux-next]
[also build test ERROR on v4.18-rc4 next-20180709]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jingqi-Liu/KVM-x86-expose-a-few-new-features-into-VM/20180710-171958
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: i386-randconfig-x075-201827 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   arch/x86//kvm/cpuid.c: In function '__do_cpuid_ent':
   arch/x86//kvm/cpuid.c:68:18: error: 'X86_FEATURE_WAITPKG' undeclared (first use in this function); did you mean 'X86_FEATURE_MWAITX'?
    #define F(x) bit(X86_FEATURE_##x)
                     ^
   arch/x86//kvm/cpuid.c:409:17: note: in expansion of macro 'F'
      F(CLDEMOTE) | F(WAITPKG) | F(MOVDIRI) | F(MOVDIR64B);
                    ^
   arch/x86//kvm/cpuid.c:68:18: note: each undeclared identifier is reported only once for each function it appears in
    #define F(x) bit(X86_FEATURE_##x)
                     ^
   arch/x86//kvm/cpuid.c:409:17: note: in expansion of macro 'F'
      F(CLDEMOTE) | F(WAITPKG) | F(MOVDIRI) | F(MOVDIR64B);
                    ^
   arch/x86//kvm/cpuid.c:68:18: error: 'X86_FEATURE_MOVDIRI' undeclared (first use in this function); did you mean 'X86_FEATURE_MOVBE'?
    #define F(x) bit(X86_FEATURE_##x)
                     ^
   arch/x86//kvm/cpuid.c:409:30: note: in expansion of macro 'F'
      F(CLDEMOTE) | F(WAITPKG) | F(MOVDIRI) | F(MOVDIR64B);
                                 ^
>> arch/x86//kvm/cpuid.c:68:18: error: 'X86_FEATURE_MOVDIR64B' undeclared (first use in this function); did you mean 'X86_FEATURE_MOVDIRI'?
    #define F(x) bit(X86_FEATURE_##x)
                     ^
   arch/x86//kvm/cpuid.c:409:43: note: in expansion of macro 'F'
      F(CLDEMOTE) | F(WAITPKG) | F(MOVDIRI) | F(MOVDIR64B);
                                              ^

vim +68 arch/x86//kvm/cpuid.c

4ff41732 Paolo Bonzini 2014-02-24  67  
5c404cab Paolo Bonzini 2014-12-03 @68  #define F(x) bit(X86_FEATURE_##x)
5c404cab Paolo Bonzini 2014-12-03  69  

:::::: The code at line 68 was first introduced by commit
:::::: 5c404cabd1b5c125653ac573cb9284bdf42b658a KVM: x86: use F() macro throughout cpuid.c

:::::: TO: Paolo Bonzini <pbonzini@redhat.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 456caf7..deaad68 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -406,7 +406,7 @@  static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 		F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ |
 		F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) |
 		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) |
-		F(CLDEMOTE) | F(WAITPKG) | F(MOVDIRI);
+		F(CLDEMOTE) | F(WAITPKG) | F(MOVDIRI) | F(MOVDIR64B);
 
 	/* cpuid 7.0.edx*/
 	const u32 kvm_cpuid_7_0_edx_x86_features =