Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1463433imu; Mon, 5 Nov 2018 22:02:16 -0800 (PST) X-Google-Smtp-Source: AJdET5dy8WKb4Q09AyjhpX0nE3Qiua15yAng43ZtuVgpPszSY0vpJB/EdLWHAib/yGdEMsOxx2F3 X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr6680783plb.279.1541484136220; Mon, 05 Nov 2018 22:02:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541484136; cv=none; d=google.com; s=arc-20160816; b=LeGd8i3VEj+ZbuK3XOWbeambmbFAer0ND+3CQXCMmW7X9mhu/QrTZso4RJNERgnYtu 2PdemJbEiONY8VWdIxya39GQzS8rN+Qq3ZzvZuKe3vUHt/GjatLETAJZRRKBRp57WKeD JF2qbBOPgA8sHvDLyhobP8wp7V1rkRdBvptrlfzfB7PfKzPPADkv4rcYk3j89qAtDCeO j4CfkTemUoowjkoODm9ACoJ8ptZxqdK+9GAIMBbGU4XcGgIxqYX3SBN/DSpB7317brPx eicqFT9Slpp0NuL5pKPc1i5V1whQj5o3aeMrbz9iywG7crYviUizn8fczgBABlDoR56H rdFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=MmKpC9tfXovDY59mloVP4AjnpUL0Erl4KK0vAMeCXWQ=; b=P5C+rRGB9ampDlXf/aFPHN8L8MCe9LrRnOPxvrRiRju+1hkMkwmbfD+x9h1udIvWA2 IsgleQsQkMeq4DtP/SY5Shqug5tbRGr/gmkRrNdPU0wk4McVK7xZtJnDoqyDYb/Cuf5k LciqzCShjsPNpo0oTCC/z4xIskp48t238I8AKpVoRWDMU0nIWHlXZ04DqfVAyMaOm/ur kG8LyiE9DmSr0dkLfcXU7QJ1Ca/kzSpcom9MyOc+TFuXmUmW0togBVDfS+WrZiMQNURN bu/tqh+OxnyZTjKRxNuemAZXYQjKO6pAwW0MECvQO7uXBvcTinRcBLK3wzXdV4YnwUPc C3tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si10748315plt.225.2018.11.05.22.02.01; Mon, 05 Nov 2018 22:02:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730092AbeKFPZF (ORCPT + 99 others); Tue, 6 Nov 2018 10:25:05 -0500 Received: from mga04.intel.com ([192.55.52.120]:36469 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729326AbeKFPZF (ORCPT ); Tue, 6 Nov 2018 10:25:05 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2018 22:01:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,470,1534834800"; d="scan'208";a="271698846" Received: from optiplex-7050.sh.intel.com ([10.239.161.26]) by orsmga005.jf.intel.com with ESMTP; 05 Nov 2018 22:01:30 -0800 From: Liu Jingqi To: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com Cc: bp@alien8.de, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, tao3.xu@intel.com, Liu Jingqi Subject: [PATCH v2 2/2] KVM: x86: expose MOVDIR64B CPU feature into VM. Date: Tue, 6 Nov 2018 13:55:28 +0800 Message-Id: <1541483728-7826-3-git-send-email-jingqi.liu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541483728-7826-1-git-send-email-jingqi.liu@intel.com> References: <1541483728-7826-1-git-send-email-jingqi.liu@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 Signed-off-by: Liu Jingqi Cc: Xu Tao --- 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 cbfeaa7..721893a 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(MOVDIRI); + F(CLDEMOTE) | F(MOVDIRI) | F(MOVDIR64B); /* cpuid 7.0.edx*/ const u32 kvm_cpuid_7_0_edx_x86_features = -- 2.7.4