lkml.org 
[lkml]   [2021]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 22/28] KVM: x86/mmu: Mark SPTEs in disconnected pages as removed
From
Date
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);


\
 
 \ /
  Last update: 2021-02-03 12:20    [W:0.359 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site