diff options
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index de996380ec26..81563e76e28f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -217,7 +217,7 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, | |||
217 | } | 217 | } |
218 | EXPORT_SYMBOL_GPL(kvm_mmu_set_mask_ptes); | 218 | EXPORT_SYMBOL_GPL(kvm_mmu_set_mask_ptes); |
219 | 219 | ||
220 | static int is_write_protection(struct kvm_vcpu *vcpu) | 220 | static bool is_write_protection(struct kvm_vcpu *vcpu) |
221 | { | 221 | { |
222 | return kvm_read_cr0_bits(vcpu, X86_CR0_WP); | 222 | return kvm_read_cr0_bits(vcpu, X86_CR0_WP); |
223 | } | 223 | } |
@@ -2432,6 +2432,7 @@ static int init_kvm_softmmu(struct kvm_vcpu *vcpu) | |||
2432 | r = paging32_init_context(vcpu); | 2432 | r = paging32_init_context(vcpu); |
2433 | 2433 | ||
2434 | vcpu->arch.mmu.base_role.cr4_pae = !!is_pae(vcpu); | 2434 | vcpu->arch.mmu.base_role.cr4_pae = !!is_pae(vcpu); |
2435 | vcpu->arch.mmu.base_role.cr0_wp = is_write_protection(vcpu); | ||
2435 | 2436 | ||
2436 | return r; | 2437 | return r; |
2437 | } | 2438 | } |