From patchwork Tue Jan 5 11:02:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sheng Yang X-Patchwork-Id: 70977 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o05B4R9C004251 for ; Tue, 5 Jan 2010 11:04:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754379Ab0AELEW (ORCPT ); Tue, 5 Jan 2010 06:04:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754357Ab0AELEV (ORCPT ); Tue, 5 Jan 2010 06:04:21 -0500 Received: from mga01.intel.com ([192.55.52.88]:49799 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754331Ab0AELET (ORCPT ); Tue, 5 Jan 2010 06:04:19 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 05 Jan 2010 03:03:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,501,1257148800"; d="scan'208";a="761414995" Received: from syang10-desktop.sh.intel.com (HELO syang10-desktop) ([10.239.36.76]) by fmsmga001.fm.intel.com with ESMTP; 05 Jan 2010 03:04:09 -0800 Received: from yasker by syang10-desktop with local (Exim 4.69) (envelope-from ) id 1NS7BK-0003Dj-3M; Tue, 05 Jan 2010 19:02:34 +0800 From: Sheng Yang To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, Sheng Yang Subject: [PATCH 1/4] KVM: x86: Moving PT_*_LEVEL to mmu.h Date: Tue, 5 Jan 2010 19:02:26 +0800 Message-Id: <1262689349-12350-2-git-send-email-sheng@linux.intel.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1262689349-12350-1-git-send-email-sheng@linux.intel.com> References: <1262689349-12350-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c43c2ab..15daf3c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -142,10 +142,6 @@ module_param(oos_shadow, bool, 0644); #define PFERR_RSVD_MASK (1U << 3) #define PFERR_FETCH_MASK (1U << 4) -#define PT_PDPE_LEVEL 3 -#define PT_DIRECTORY_LEVEL 2 -#define PT_PAGE_TABLE_LEVEL 1 - #define RMAP_EXT 4 #define ACC_EXEC_MASK 1 diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h index 4567d80..ff58342 100644 --- a/arch/x86/kvm/mmu.h +++ b/arch/x86/kvm/mmu.h @@ -38,6 +38,10 @@ #define PT32_ROOT_LEVEL 2 #define PT32E_ROOT_LEVEL 3 +#define PT_PDPE_LEVEL 3 +#define PT_DIRECTORY_LEVEL 2 +#define PT_PAGE_TABLE_LEVEL 1 + int kvm_mmu_get_spte_hierarchy(struct kvm_vcpu *vcpu, u64 addr, u64 sptes[4]); static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)