[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb7108c7-e4f2-ea59-24f4-7c7da45054a8@redhat.com>
Date: Wed, 3 Feb 2021 12:17:21 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Ben Gardon <bgardon@...gle.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: Peter Xu <peterx@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Peter Shier <pshier@...gle.com>,
Peter Feiner <pfeiner@...gle.com>,
Junaid Shahid <junaids@...gle.com>,
Jim Mattson <jmattson@...gle.com>,
Yulei Zhang <yulei.kernel@...il.com>,
Wanpeng Li <kernellwp@...il.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Xiao Guangrong <xiaoguangrong.eric@...il.com>
Subject: Re: [PATCH v2 22/28] KVM: x86/mmu: Mark SPTEs in disconnected pages
as removed
On 02/02/21 19:57, Ben Gardon wrote:
>
> + * Marking the SPTE as a removed SPTE is not
> + * strictly necessary here as the MMU lock should
"should" is a bit too weak---the point of !shared is that the MMU lock
*will* stop other threads from concurrent modifications of the SPTEs.
Paolo
> + * stop other threads from concurrentrly modifying
> + * this SPTE. Using the removed SPTE value keeps
> + * the shared and non-atomic cases consistent and
> + * simplifies the function.
> + */
> + WRITE_ONCE(*sptep, REMOVED_SPTE);
Powered by blists - more mailing lists