Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4529346pxf; Tue, 30 Mar 2021 09:55:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySG3ylVlM9F/hap9F1ag/RfuYbD8Sj6xYHXrLu3BEfsWDSzGC7o4cKeWMDPEVOK78AnRiX X-Received: by 2002:a17:907:94c3:: with SMTP id dn3mr34773456ejc.280.1617123352711; Tue, 30 Mar 2021 09:55:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617123352; cv=none; d=google.com; s=arc-20160816; b=uDm9CrhOemZFZwUSFcQPDHZrJJV8ZqcIH3y682RRDG4LKU1dLf8hg0xVS7b/2nrokm Ic2kwKg1hGO9bk7Mcz5Pv5gLh+ApV6kNJvrK37OjTav8BqhJ1iZYbRGfqku/zKAAxYSh BhxrEX0aNWzx2XAO/la9hDZSmLtD3dv1rtUK45Vk99+8BoHnEY9tEEr194GVwCRlmGP7 UFpiKoxX9Q8yt6c5bZ819Pzpgunf4mbLV+LC65XIJnJD0GAWdY1o3i2mAaAZP2KDhBAV EV/dFqgn+kyrTNkSv2Jrg/9G28YwMsVXjqLD6C2psf4dEDm4rDhtMnzI/pUphdRkHH+i 18XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wjEZ3ZF3F2zUlaROdXxo7K2ByJGT7SfXveJhqUYDsyY=; b=f+XAfyznJqiU7MTqqFlyVqZvJ/6de8/DH8FsoqMqFsfPm+OdWoGIRFLQwwXY/+XAKy QWAzWsgEjkPs/hHNZIbIhDzPbRK8IsJVrLgRPhkZuGdgnrIljEWEmNw/3uD1gnaobZeO ZIjEg1/jz6vxKti8WCVzDDhHgT2dwQKHL5cv35EEE4afAvaLjhABn+lrEYYniLmRRV9A fkOrPJ6HaVGaO8SxRz7cGgXSWGFUrLQId+Tt8QdhSJ3tGsXvnFH6NmODAA6/1ofJ09AP dhEAwA6MgIGhbZCsXlOF1MGRdYO9NyZoS7g45JUQ50sNd0XNkTNwztJVLAxRrRipAD1g h0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SPVAcoxL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si16061830ejf.475.2021.03.30.09.55.29; Tue, 30 Mar 2021 09:55:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SPVAcoxL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232688AbhC3Qs5 (ORCPT + 99 others); Tue, 30 Mar 2021 12:48:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:58250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232778AbhC3Qrz (ORCPT ); Tue, 30 Mar 2021 12:47:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 83214619CC; Tue, 30 Mar 2021 16:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617122875; bh=KHdICeV1rM9Mb1vyk4HNCW+NjRO4QlezycJ0HLjScfo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SPVAcoxLcZywaF/4CUfIl92hsw2AIuUB+TptV2Vf6Lz8JR4+42XDb2TSB6g0sPyB8 NNltxUHwHJwX5kJddk13kPhpTeI5wth35YAcFCIVXupqIQreho71ppZPLb9fA4e1uy mYHnuq9H4bikcys3Nln/+Df8ph/V4o2xI19DrGq8= Date: Tue, 30 Mar 2021 18:47:52 +0200 From: Greg KH To: Mathieu Poirier Cc: Suzuki K Poulose , Marc Zyngier , Catalin Marinas , linux-arm-kernel , Linux Kernel Mailing List , Coresight ML , Mike Leach , Leo Yan , Anshuman Khandual , Will Deacon , Mark Rutland Subject: Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host Message-ID: References: <20210323120647.454211-1-suzuki.poulose@arm.com> <20210323120647.454211-8-suzuki.poulose@arm.com> <20210326165550.GC2009902@xps15> <20210330152314.GA2329603@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 30, 2021 at 10:33:51AM -0600, Mathieu Poirier wrote: > On Tue, 30 Mar 2021 at 09:35, Greg KH wrote: > > > > On Tue, Mar 30, 2021 at 09:23:14AM -0600, Mathieu Poirier wrote: > > > On Tue, Mar 30, 2021 at 11:38:18AM +0100, Suzuki K Poulose wrote: > > > > On 26/03/2021 16:55, Mathieu Poirier wrote: > > > > > On Tue, Mar 23, 2021 at 12:06:35PM +0000, Suzuki K Poulose wrote: > > > > > > For a nvhe host, the EL2 must allow the EL1&0 translation > > > > > > regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must > > > > > > be saved/restored over a trip to the guest. Also, before > > > > > > entering the guest, we must flush any trace data if the > > > > > > TRBE was enabled. And we must prohibit the generation > > > > > > of trace while we are in EL1 by clearing the TRFCR_EL1. > > > > > > > > > > > > For vhe, the EL2 must prevent the EL1 access to the Trace > > > > > > Buffer. > > > > > > > > > > > > Cc: Will Deacon > > > > > > Cc: Catalin Marinas > > > > > > Cc: Marc Zyngier > > > > > > Cc: Mark Rutland > > > > > > Cc: Anshuman Khandual > > > > > > Acked-by: Mathieu Poirier > > > > > > Signed-off-by: Suzuki K Poulose > > > > > > --- > > > > > > arch/arm64/include/asm/el2_setup.h | 13 +++++++++ > > > > > > arch/arm64/include/asm/kvm_arm.h | 2 ++ > > > > > > arch/arm64/include/asm/kvm_host.h | 2 ++ > > > > > > arch/arm64/kernel/hyp-stub.S | 3 ++- > > > > > > arch/arm64/kvm/debug.c | 6 ++--- > > > > > > arch/arm64/kvm/hyp/nvhe/debug-sr.c | 42 ++++++++++++++++++++++++++++++ > > > > > > arch/arm64/kvm/hyp/nvhe/switch.c | 1 + > > > > > > 7 files changed, 65 insertions(+), 4 deletions(-) > > > > > > > > > > > > > > > > Marc - do you want me to pick up this one? > > > > > > > > I think the kvmarm tree is the best route for this patch, given the amount > > > > of changes the tree is going through, in the areas this patch > > > > touches. Or else there would be conflicts with merging. And this patch > > > > depends on the patches from this series that were queued. > > > > > > > > Here is the depency tree : > > > > > > > > a) kvm-arm fixes for debug (Patch 1, 2) & SPE save-restore fix (queued in > > > > v5.12-rc3) > > > > > > > > b) TRBE defintions and Trace synchronization barrier (Patches 5 & 6) > > > > > > > > c) kvm-arm TRBE host support (Patch 7) > > > > > > > > d) TRBE driver support (and the ETE changes) > > > > > > > > > > > > (c) code merge depends on -> (a) + (b) > > > > (d) build (no conflicts) depends on -> (b) > > > > > > > > > > > > Now (d) has an indirect dependency on (c) for operational correctness at > > > > runtime. > > > > So, if : > > > > > > > > kvmarm tree picks up : b + c > > > > coresight tree picksup : b + d > > > > > > > > and if we could ensure the merge order of the trees are in > > > > kvmarm > > > > greg-kh (device-misc tree) (coresight goes via this tree) > > > > > > > > > > Greg's char-misc tree is based on the rc releases rather than next. As such it > > > is a while before other branches like kvmarm get merged, causing all sort of > > > compilation breakage. > > > > My tree can not be based on -next, and neither can any other > > maintainer's tree, as next is composed of maintainer trees :) > > > > Exactly > > > > > we should be fine. > > > > > > > > Additionally, we could rip out the Kconfig changes from the TRBE patch > > > > and add it only at the rc1, once we verify both the trees are in to make > > > > sure the runtime operation dependency is not triggered. > > > > > > > > > > We could also do that but Greg might frown at the tactic, and rightly so. The > > > usual way to work with complex merge dependencies is to proceed in steps, which > > > would mean that all KVM related patches go in the v5.13 merge window. When that > > > is done we add the ETE/TRBE for the v5.14 merge window. I agree that we waste > > > an entire cycle but it guarantees to avoid breaking builds and follows the > > > conventional way to do things. > > > > Or someone creates a single branch with a signed tag and it gets pulled > > into multiple maintainer's trees and never rebased. We've done that > > lots of time, nothing new there. Or everything goes through one tree, > > or you wait a release cycle. > > > > You have 3 choices, pick one :) > > I'm perfectly happy with getting this entire set merged via Marc's > kvmarm tree, as long as you are fine with it. No objection from me at all for this to go that way. thanks, greg k-h