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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95801C4332F for ; Wed, 16 Nov 2022 08:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lg1Wj66vPuMPz7cRjZCMSTt4S+FGKIbO+gLpS+G1Rbs=; b=R02kUWljftaGVs nI4SUzVOAX6O5EoRxlj8Qo1mdiK24Ib8Rt/71kC0covSPa+RM22UHH2dipUPXhMzkbyjnyjuSIs3O LCfSNOHIWeivYJDZgQYIRyfa4kVIvdSpNhGUavMxWtKDX6Vd0di4H1RY94iNxKwKIAF7oRCLm4Jt3 0M3jgsOQX6XQ0eGok2Ef880E55LZQgJi8zFlxSAjIC7GPP/T9++wpttTiNvli3EBfyz265OVTsI54 3IQJ12yNvOYzT6i74AC7FaKPlMDPBSCqEJ63KfVxfvZfJfXfc0l9+SKNRYMKtHKMV0sDCPLL029/K 7zT6Ce5zA7RDtZ0hZd8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovDYy-0017ou-VI; Wed, 16 Nov 2022 08:14:29 +0000 Received: from out0.migadu.com ([94.23.1.103]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovDYv-0017mh-LC for linux-arm-kernel@lists.infradead.org; Wed, 16 Nov 2022 08:14:27 +0000 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-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221116_001426_374366_F5B2A152 X-CRM114-Status: GOOD ( 13.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel