[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ed657df4-7242-2c77-cfaf-b0dc1eb5c210@arm.com>
Date: Wed, 22 Sep 2021 11:39:54 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: Alexandru Elisei <alexandru.elisei@....com>, maz@...nel.org,
james.morse@....com, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.cs.columbia.edu, will@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v4 01/39] KVM: arm64: Make lock_all_vcpus() available
to the rest of KVM
On 25/08/2021 17:17, Alexandru Elisei wrote:
> The VGIC code uses the lock_all_vcpus() function to make sure no VCPUs are
> run while it fiddles with the global VGIC state. Move the declaration of
> lock_all_vcpus() and the corresponding unlock function into asm/kvm_host.h
> where it can be reused by other parts of KVM/arm64 and rename the functions
> to kvm_{lock,unlock}_all_vcpus() to make them more generic.
>
> Because the scope of the code potentially using the functions has
> increased, add a lockdep check that the kvm->lock is held by the caller.
> Holding the lock is necessary because otherwise userspace would be able to
> create new VCPUs and run them while the existing VCPUs are locked.
>
> No functional change intended.
>
> Signed-off-by: Alexandru Elisei <alexandru.elisei@....com>
LGTM,
Reviewed-by: Suzuki K Poulose <suzuki.poulose@....com>
Powered by blists - more mailing lists