Thread (37 messages) flat view 37 messages, 3 authors, 2021-12-15

Re: [PATCH v3 10/15] KVM: arm64: Introduce wrappers for host and hyp spin lock accessors

From: Will Deacon <will@kernel.org>
Date: 2021-12-14 14:52:36
Also in: kvmarm, lkml

On Tue, Dec 14, 2021 at 02:48:30PM +0000, Andrew Walbran wrote:
On Wed, 1 Dec 2021 at 17:04, 'Quentin Perret' via kernel-team
[off-list ref] wrote:
quoted
From: Will Deacon <will@kernel.org>

In preparation for adding additional locked sections for manipulating
page-tables at EL2, introduce some simple wrappers around the host and
hypervisor locks so that it's a bit easier to read and bit more difficult
to take the wrong lock (or even take them in the wrong order).
Looks good, but how does this help prevent taking locks in the wrong order?
I just found that I would easily forget what exactly was protected by
"pkvm_pgd_lock" and so relating that back to "take host before hyp" was
error-prone. Having helpers with "host" and "hyp" in the name helps me with
that, at least.

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help