[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBTw6ymNg0gYxhtW@google.com>
Date: Fri, 17 Mar 2023 15:59:55 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Vipin Sharma <vipinsh@...gle.com>
Cc: pbonzini@...hat.com, bgardon@...gle.com, dmatlack@...gle.com,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [Patch v3 2/7] KVM: x86/mmu: Atomically clear SPTE dirty state in
the clear-dirty-log flow
On Fri, Feb 10, 2023, Vipin Sharma wrote:
> @@ -1677,8 +1670,13 @@ bool kvm_tdp_mmu_clear_dirty_slot(struct kvm *kvm,
> static void clear_dirty_pt_masked(struct kvm *kvm, struct kvm_mmu_page *root,
> gfn_t gfn, unsigned long mask, bool wrprot)
> {
> + /*
> + * Either all SPTEs in TDP MMU will need write protection or none. This
> + * contract will not be modified for TDP MMU pages.
> + */
> + u64 clear_bit = (wrprot || !kvm_ad_enabled()) ? PT_WRITABLE_MASK :
> + shadow_dirty_mask;
Switching from spte_ad_need_write_protect() to kvm_ad_enabled() belongs in a
separate. In the unlikely event that the above assertion/contracts is invalid,
then any issues should bisect to the switch, not to a much more complex patch.
I'll make that happen when applying.
Powered by blists - more mailing lists