On Fri, Sep 25, 2020 at 02:22:59PM -0700, Ben Gardon wrote:
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 12892fc4f146d..e6f5093ba8f6f 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -1667,6 +1667,11 @@ bool kvm_mmu_slot_gfn_write_protect(struct kvm *kvm,
>               write_protected |= __rmap_write_protect(kvm, rmap_head, true);
>       }
>  
> +     if (kvm->arch.tdp_mmu_enabled)
> +             write_protected =
> +                     kvm_tdp_mmu_write_protect_gfn(kvm, slot, gfn) ||
> +                     write_protected;

Similar to other comments, this can use |=.

> +
>       return write_protected;
>  }

Reply via email to