diff options
| -rw-r--r-- | arch/x86/kvm/mmu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 95a955de5964..1e7a49bfc94f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
| @@ -3721,13 +3721,15 @@ static void reset_rsvds_bits_mask_ept(struct kvm_vcpu *vcpu, | |||
| 3721 | void | 3721 | void |
| 3722 | reset_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, struct kvm_mmu *context) | 3722 | reset_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, struct kvm_mmu *context) |
| 3723 | { | 3723 | { |
| 3724 | bool uses_nx = context->nx || context->base_role.smep_andnot_wp; | ||
| 3725 | |||
| 3724 | /* | 3726 | /* |
| 3725 | * Passing "true" to the last argument is okay; it adds a check | 3727 | * Passing "true" to the last argument is okay; it adds a check |
| 3726 | * on bit 8 of the SPTEs which KVM doesn't use anyway. | 3728 | * on bit 8 of the SPTEs which KVM doesn't use anyway. |
| 3727 | */ | 3729 | */ |
| 3728 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, | 3730 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, |
| 3729 | boot_cpu_data.x86_phys_bits, | 3731 | boot_cpu_data.x86_phys_bits, |
| 3730 | context->shadow_root_level, context->nx, | 3732 | context->shadow_root_level, uses_nx, |
| 3731 | guest_cpuid_has_gbpages(vcpu), is_pse(vcpu), | 3733 | guest_cpuid_has_gbpages(vcpu), is_pse(vcpu), |
| 3732 | true); | 3734 | true); |
| 3733 | } | 3735 | } |
