[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef473b52-0b71-a524-ed36-c2c1a9d0fb03@redhat.com>
Date: Tue, 11 May 2021 21:29:19 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>,
Ben Gardon <bgardon@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Peter Xu <peterx@...hat.com>, Peter Shier <pshier@...gle.com>,
Yulei Zhang <yulei.kernel@...il.com>,
Wanpeng Li <kernellwp@...il.com>,
Xiao Guangrong <xiaoguangrong.eric@...il.com>,
Kai Huang <kai.huang@...el.com>,
Keqian Zhu <zhukeqian1@...wei.com>,
David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH v4 4/7] KVM: mmu: Add slots_arch_lock for memslot arch
fields
On 11/05/21 21:21, Sean Christopherson wrote:
>> + /* Released in install_new_memslots. */
>
> This needs a much more comprehensive comment, either here or above the declaration
> of slots_arch_lock. I can't find anything that explicitly states the the lock
> must be held from the time the previous memslots are duplicated/copied until the
> new memslots are set. Without that information, the rules/expecations are not
> clear.
Indeed, this needs basically a description of the races that can happen,
as you explained them in the v1 review.
> Unfortunately I'm just whining at this point since I
> don't have a better idea
Yeah, the synchronize_srcu call in install_new_memslots throws a wrench
in most alternatives.
Paolo
Powered by blists - more mailing lists