aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/mmu.h')
-rw-r--r--arch/x86/kvm/mmu.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index 61a1b3884b49..4567d8042b22 100644
--- a/arch/x86/kvm/mmu.h
+++ b/arch/x86/kvm/mmu.h
@@ -2,6 +2,7 @@
2#define __KVM_X86_MMU_H 2#define __KVM_X86_MMU_H
3 3
4#include <linux/kvm_host.h> 4#include <linux/kvm_host.h>
5#include "kvm_cache_regs.h"
5 6
6#define PT64_PT_BITS 9 7#define PT64_PT_BITS 9
7#define PT64_ENT_PER_PAGE (1 << PT64_PT_BITS) 8#define PT64_ENT_PER_PAGE (1 << PT64_PT_BITS)
@@ -64,12 +65,12 @@ static inline int is_long_mode(struct kvm_vcpu *vcpu)
64 65
65static inline int is_pae(struct kvm_vcpu *vcpu) 66static inline int is_pae(struct kvm_vcpu *vcpu)
66{ 67{
67 return vcpu->arch.cr4 & X86_CR4_PAE; 68 return kvm_read_cr4_bits(vcpu, X86_CR4_PAE);
68} 69}
69 70
70static inline int is_pse(struct kvm_vcpu *vcpu) 71static inline int is_pse(struct kvm_vcpu *vcpu)
71{ 72{
72 return vcpu->arch.cr4 & X86_CR4_PSE; 73 return kvm_read_cr4_bits(vcpu, X86_CR4_PSE);
73} 74}
74 75
75static inline int is_paging(struct kvm_vcpu *vcpu) 76static inline int is_paging(struct kvm_vcpu *vcpu)