From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2767AC4332F for ; Wed, 16 Nov 2022 08:15:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238576AbiKPIP3 (ORCPT ); Wed, 16 Nov 2022 03:15:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238521AbiKPIPC (ORCPT ); Wed, 16 Nov 2022 03:15:02 -0500 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA54F10553; Wed, 16 Nov 2022 00:14:24 -0800 (PST) Date: Wed, 16 Nov 2022 08:14:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1668586463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SmFKdEdkwEAGGvbba+Uew4TFmYCA4I8/v/XU6v8w0iw=; b=EiQC3QrF9TRB/NYfKenXrf+k5M2yFh3QICvTBjAHp2S2AgBjJTR7+0EESbrJW9MZnTM2ku HalxstlcPjFrhMFiUG6PeC1w/Rn21yzoE6U8m4RxGK2nKHc8gl9WjePXjwLsyGfzBN/HBd WcAO9UckNtb5AMRTHW2N9kDIujgjrjQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier Cc: kvm@vger.kernel.org, Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Marek Szyprowski Subject: Re: [PATCH v2] KVM: arm64: Don't acquire RCU read lock for exclusive table walks Message-ID: References: <20221115225502.2240227-1-oliver.upton@linux.dev> <868rkbppdq.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 16, 2022 at 07:27:27AM +0000, Oliver Upton wrote: > On Wed, Nov 16, 2022 at 03:08:49AM +0000, Marc Zyngier wrote: > > I'm not crazy about this sort of parameters. I think it would make a > > lot more sense to pass a pointer to the walker structure and do the > > flag check inside the helper. > > > > That way, we avoid extra churn if/when we need extra state or > > bookkeeping around the walk. > > Sure, let's go that way instead. v3 on the way lol :) Well, going this route is going to require hoisting around a few things. I'd very much prefer to keep the RCU indirection ifdeffery all in one place, but I'll need to haul it all after the definitions of kvm_pgtable_walker and kvm_pgtable_walk_flags but before the definition of kvm_pgtable (as it needs kvm_pteref_t). I'm not too bothered by it, but not quite as small of a bandaid this time around. -- Thanks, Oliver