From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Sheng" Subject: [PATCH 5/8] KVM: MMU: Remove #ifdef CONFIG_X86_64 to support 4 level EPT Date: Fri, 25 Apr 2008 16:26:27 +0800 Message-ID: <200804251626.27439.sheng.yang@intel.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_zWZEILgFyecAOFc" Cc: kvm-devel To: Avi Kivity Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org --Boundary-00=_zWZEILgFyecAOFc Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =46rom 169c62e33ea1dbadc8d2fbc3d4880e63caa4d6ab Mon Sep 17 00:00:00 2001 =46rom: Sheng Yang Date: Fri, 25 Apr 2008 21:44:42 +0800 Subject: [PATCH 5/8] KVM: MMU: Remove #ifdef CONFIG_X86_64 to support 4 lev= el=20 EPT Currently EPT level is 4 for both PAE and 32e. The patch remove the #ifdef for alloc root_hpa and free root_hpa to support EPT. Signed-off-by: Sheng Yang =2D-- arch/x86/kvm/mmu.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c28a36b..3dbedf1 100644 =2D-- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1233,7 +1233,6 @@ static void mmu_free_roots(struct kvm_vcpu *vcpu) if (!VALID_PAGE(vcpu->arch.mmu.root_hpa)) return; spin_lock(&vcpu->kvm->mmu_lock); =2D#ifdef CONFIG_X86_64 if (vcpu->arch.mmu.shadow_root_level =3D=3D PT64_ROOT_LEVEL) { hpa_t root =3D vcpu->arch.mmu.root_hpa; @@ -1245,7 +1244,6 @@ static void mmu_free_roots(struct kvm_vcpu *vcpu) spin_unlock(&vcpu->kvm->mmu_lock); return; } =2D#endif for (i =3D 0; i < 4; ++i) { hpa_t root =3D vcpu->arch.mmu.pae_root[i]; @@ -1271,7 +1269,6 @@ static void mmu_alloc_roots(struct kvm_vcpu *vcpu) root_gfn =3D vcpu->arch.cr3 >> PAGE_SHIFT; =2D#ifdef CONFIG_X86_64 if (vcpu->arch.mmu.shadow_root_level =3D=3D PT64_ROOT_LEVEL) { hpa_t root =3D vcpu->arch.mmu.root_hpa; @@ -1286,7 +1283,6 @@ static void mmu_alloc_roots(struct kvm_vcpu *vcpu) vcpu->arch.mmu.root_hpa =3D root; return; } =2D#endif metaphysical =3D !is_paging(vcpu); if (tdp_enabled) metaphysical =3D 1; =2D- 1.5.4.5 --Boundary-00=_zWZEILgFyecAOFc Content-Type: text/x-diff; charset="utf-8"; name="0005-KVM-MMU-Remove-ifdef-CONFIG_X86_64-to-support-4-l.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0005-KVM-MMU-Remove-ifdef-CONFIG_X86_64-to-support-4-l.patch" =46rom 169c62e33ea1dbadc8d2fbc3d4880e63caa4d6ab Mon Sep 17 00:00:00 2001 =46rom: Sheng Yang Date: Fri, 25 Apr 2008 21:44:42 +0800 Subject: [PATCH 5/8] KVM: MMU: Remove #ifdef CONFIG_X86_64 to support 4 lev= el EPT Currently EPT level is 4 for both PAE and 32e. The patch remove the #ifdef for alloc root_hpa and free root_hpa to support EPT. Signed-off-by: Sheng Yang =2D-- arch/x86/kvm/mmu.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c28a36b..3dbedf1 100644 =2D-- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1233,7 +1233,6 @@ static void mmu_free_roots(struct kvm_vcpu *vcpu) if (!VALID_PAGE(vcpu->arch.mmu.root_hpa)) return; spin_lock(&vcpu->kvm->mmu_lock); =2D#ifdef CONFIG_X86_64 if (vcpu->arch.mmu.shadow_root_level =3D=3D PT64_ROOT_LEVEL) { hpa_t root =3D vcpu->arch.mmu.root_hpa; =20 @@ -1245,7 +1244,6 @@ static void mmu_free_roots(struct kvm_vcpu *vcpu) spin_unlock(&vcpu->kvm->mmu_lock); return; } =2D#endif for (i =3D 0; i < 4; ++i) { hpa_t root =3D vcpu->arch.mmu.pae_root[i]; =20 @@ -1271,7 +1269,6 @@ static void mmu_alloc_roots(struct kvm_vcpu *vcpu) =20 root_gfn =3D vcpu->arch.cr3 >> PAGE_SHIFT; =20 =2D#ifdef CONFIG_X86_64 if (vcpu->arch.mmu.shadow_root_level =3D=3D PT64_ROOT_LEVEL) { hpa_t root =3D vcpu->arch.mmu.root_hpa; =20 @@ -1286,7 +1283,6 @@ static void mmu_alloc_roots(struct kvm_vcpu *vcpu) vcpu->arch.mmu.root_hpa =3D root; return; } =2D#endif metaphysical =3D !is_paging(vcpu); if (tdp_enabled) metaphysical =3D 1; =2D-=20 1.5.4.5 --Boundary-00=_zWZEILgFyecAOFc Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone --Boundary-00=_zWZEILgFyecAOFc Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel --Boundary-00=_zWZEILgFyecAOFc--