From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jingqi Liu Subject: [PATCH 3/3] KVM: x86: expose MOVDIR64B CPU feature into VM. Date: Tue, 10 Jul 2018 16:54:43 +0800 Message-ID: <1531212883-63173-4-git-send-email-jingqi.liu@intel.com> References: <1531212883-63173-1-git-send-email-jingqi.liu@intel.com> Cc: x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, wei.w.wang@intel.com, Jingqi Liu To: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Return-path: In-Reply-To: <1531212883-63173-1-git-send-email-jingqi.liu@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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 --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = -- 1.8.3.1