Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-12-04 Thread Oliver Upton
Hi Mingwei, On Mon, Dec 05, 2022 at 05:51:13AM +, Mingwei Zhang wrote: > On Mon, Nov 14, 2022, Oliver Upton wrote: [...] > > As hyp stage-1 is protected by a spinlock there is no actual need for > > RCU in that case. I'll post something later on today that addresses the > > issue. > > > >

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-12-04 Thread Mingwei Zhang
On Mon, Nov 14, 2022, Oliver Upton wrote: > Hi Marek, > > On Mon, Nov 14, 2022 at 03:29:14PM +0100, Marek Szyprowski wrote: > > This patch landed in today's linux-next (20221114) as commit > > c3119ae45dfb ("KVM: arm64: Protect stage-2 traversal with RCU"). > > Unfortunately it introduces a

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-15 Thread Oliver Upton
On Tue, Nov 15, 2022 at 10:47:37AM -0800, Ricardo Koller wrote: > On Wed, Nov 09, 2022 at 11:55:31PM +, Oliver Upton wrote: > > On Wed, Nov 09, 2022 at 09:53:45PM +, Sean Christopherson wrote: > > > On Mon, Nov 07, 2022, Oliver Upton wrote: > > > > Use RCU to safely walk the stage-2 page

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-15 Thread Ricardo Koller
On Wed, Nov 09, 2022 at 11:55:31PM +, Oliver Upton wrote: > On Wed, Nov 09, 2022 at 09:53:45PM +, Sean Christopherson wrote: > > On Mon, Nov 07, 2022, Oliver Upton wrote: > > > Use RCU to safely walk the stage-2 page tables in parallel. Acquire and > > > release the RCU read lock when

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-14 Thread Oliver Upton
Hi Marek, On Mon, Nov 14, 2022 at 03:29:14PM +0100, Marek Szyprowski wrote: > This patch landed in today's linux-next (20221114) as commit > c3119ae45dfb ("KVM: arm64: Protect stage-2 traversal with RCU"). > Unfortunately it introduces a following warning: Thanks for the bug report :) I had

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-14 Thread Marek Szyprowski
Hi Oliver, On 07.11.2022 22:56, Oliver Upton wrote: > Use RCU to safely walk the stage-2 page tables in parallel. Acquire and > release the RCU read lock when traversing the page tables. Defer the > freeing of table memory to an RCU callback. Indirect the calls into RCU > and provide stubs for

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-10 Thread Ben Gardon
On Mon, Nov 7, 2022 at 1:57 PM Oliver Upton wrote: > > Use RCU to safely walk the stage-2 page tables in parallel. Acquire and > release the RCU read lock when traversing the page tables. Defer the > freeing of table memory to an RCU callback. Indirect the calls into RCU > and provide stubs for

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-10 Thread Marc Zyngier
On Wed, 09 Nov 2022 22:25:38 +, Ben Gardon wrote: > > On Mon, Nov 7, 2022 at 1:57 PM Oliver Upton wrote: > > > > Use RCU to safely walk the stage-2 page tables in parallel. Acquire and > > release the RCU read lock when traversing the page tables. Defer the > > freeing of table memory to an

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-09 Thread Oliver Upton
On Wed, Nov 09, 2022 at 09:53:45PM +, Sean Christopherson wrote: > On Mon, Nov 07, 2022, Oliver Upton wrote: > > Use RCU to safely walk the stage-2 page tables in parallel. Acquire and > > release the RCU read lock when traversing the page tables. Defer the > > freeing of table memory to an

Re: [PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-09 Thread Sean Christopherson
On Mon, Nov 07, 2022, Oliver Upton wrote: > Use RCU to safely walk the stage-2 page tables in parallel. Acquire and > release the RCU read lock when traversing the page tables. Defer the > freeing of table memory to an RCU callback. Indirect the calls into RCU > and provide stubs for hypervisor

[PATCH v5 08/14] KVM: arm64: Protect stage-2 traversal with RCU

2022-11-07 Thread Oliver Upton
Use RCU to safely walk the stage-2 page tables in parallel. Acquire and release the RCU read lock when traversing the page tables. Defer the freeing of table memory to an RCU callback. Indirect the calls into RCU and provide stubs for hypervisor code, as RCU is not available in such a context.