lkml.org 
[lkml]   [2020]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 19/22] kvm: mmu: Support write protection for nesting in tdp MMU
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;
> }

\
 
 \ /
  Last update: 2020-09-30 20:08    [W:0.498 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site