From patchwork Tue Dec 4 17:55:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Xiantao" X-Patchwork-Id: 1836131 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0264B40E3F for ; Tue, 4 Dec 2012 06:10:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751090Ab2LDGJa (ORCPT ); Tue, 4 Dec 2012 01:09:30 -0500 Received: from mga03.intel.com ([143.182.124.21]:58193 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001Ab2LDGJ2 (ORCPT ); Tue, 4 Dec 2012 01:09:28 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 03 Dec 2012 22:09:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,213,1355126400"; d="scan'208";a="226212987" Received: from hax-build.sh.intel.com ([10.239.48.28]) by azsmga001.ch.intel.com with ESMTP; 03 Dec 2012 22:09:27 -0800 From: Xiantao Zhang To: kvm@vger.kernel.org Cc: gleb@redhat.com, mtosatti@redhat.com Subject: [PATCH 2/2] kvm: don't use bit24 for detecting address-specific invalidation capability Date: Wed, 5 Dec 2012 01:55:15 +0800 Message-Id: <1354643715-18438-3-git-send-email-xiantao.zhang@intel.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1354643715-18438-1-git-send-email-xiantao.zhang@intel.com> References: <1354643715-18438-1-git-send-email-xiantao.zhang@intel.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Zhang Xiantao Bit24 in VMX_EPT_VPID_CAP_MASI is not used for address-specific invalidation capability reporting, so remove it from KVM to avoid conflicts in future. Signed-off-by: Zhang Xiantao --- arch/x86/include/asm/vmx.h | 3 +-- arch/x86/kvm/vmx.c | 16 ---------------- 2 files changed, 1 insertions(+), 18 deletions(-) diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index 36ec21c..c2d56b3 100644 --- a/arch/x86/include/asm/vmx.h +++ b/arch/x86/include/asm/vmx.h @@ -445,8 +445,7 @@ enum vmcs_field { #define VMX_EPTP_WB_BIT (1ull << 14) #define VMX_EPT_2MB_PAGE_BIT (1ull << 16) #define VMX_EPT_1GB_PAGE_BIT (1ull << 17) -#define VMX_EPT_AD_BIT (1ull << 21) -#define VMX_EPT_EXTENT_INDIVIDUAL_BIT (1ull << 24) +#define VMX_EPT_AD_BIT (1ull << 21) #define VMX_EPT_EXTENT_CONTEXT_BIT (1ull << 25) #define VMX_EPT_EXTENT_GLOBAL_BIT (1ull << 26) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d077996..81b1aa6 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -802,11 +802,6 @@ static inline bool cpu_has_vmx_ept_ad_bits(void) return vmx_capability.ept & VMX_EPT_AD_BIT; } -static inline bool cpu_has_vmx_invept_individual_addr(void) -{ - return vmx_capability.ept & VMX_EPT_EXTENT_INDIVIDUAL_BIT; -} - static inline bool cpu_has_vmx_invept_context(void) { return vmx_capability.ept & VMX_EPT_EXTENT_CONTEXT_BIT; @@ -1051,17 +1046,6 @@ static inline void ept_sync_context(u64 eptp) } } -static inline void ept_sync_individual_addr(u64 eptp, gpa_t gpa) -{ - if (enable_ept) { - if (cpu_has_vmx_invept_individual_addr()) - __invept(VMX_EPT_EXTENT_INDIVIDUAL_ADDR, - eptp, gpa); - else - ept_sync_context(eptp); - } -} - static __always_inline unsigned long vmcs_readl(unsigned long field) { unsigned long value;