Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4255979pxf; Tue, 30 Mar 2021 03:19:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsdFcguA1lVWTSiDopMLBg31slrD+Jprc69V+c1sur78RC3F08EhqGZxVP7ZPFvZnTqtHw X-Received: by 2002:a17:906:a44a:: with SMTP id cb10mr31883404ejb.424.1617099571811; Tue, 30 Mar 2021 03:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617099571; cv=none; d=google.com; s=arc-20160816; b=aPpudWx7S3KCebE88OmPlXdFqBO+NZPlwQwkt6QhzARLCPEzXyHuDU28jR/q8OuIaP n2vR7rGK3xTftBRwNx9D1gnB2YKvMiFaKpe4nNtg5PQUmKwZo94B3XDdzvskRp+ZM7po xpzsT2k3gJYuGw6uG1iNo/5RkKDthLjJtOTAtkHNXGf3rtFnbOXk1KI7wrrsrx5zgr8G zGFUMZPVXGa3dTmMa69/CeZqbpLtmsslCzFC5lag8KxBqSBGlDqp3lIG3DlIB71QNdev YpdFoUgKaEwpEXDVo4gzXC85jA8iGDnjpafBCqwXnWO6blt5FjKBHIFgK1hKk3Felsx1 fy4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=EHiDGQH6s5kqwSbRleVSIMdQIpsYI3VOe+bZFwdeJno=; b=ecolZL2Ywn7LX6dHxgFOqDnnSYebbxivFWG4t7j+fEb10hPRk1wUW5hKbbAleKTgvH AK1oy60f8y5JSEAnZEhEWpSEb7ojQLtMscbE8g+Py1mJbOtsE/i92aRqTtAzIpVZyR2v Os33fcOMlb/xllLVA2lRtZOvGBB38Ck4ZEI+QKhNVZY9BNEakFfjiphoqEwn6vWTOAER uB+gQHk27zRnOqiWaLZi+FSZk4WBbs4ELgChvqPkJtj5TYMiStrB/6WCgOxm5SuL97FY RlVdRKGczWHHPsusHGgFhGjOLhozM6kQOHvTs0kuyXesuoRJpPqWgICd8gDpQS/PjlgX Ii9w== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si14264763edv.176.2021.03.30.03.19.09; Tue, 30 Mar 2021 03:19:31 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbhC3KQw (ORCPT + 99 others); Tue, 30 Mar 2021 06:16:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:40556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbhC3KQq (ORCPT ); Tue, 30 Mar 2021 06:16:46 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED8FA619AA; Tue, 30 Mar 2021 10:16:45 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lRBQR-004eNr-Qv; Tue, 30 Mar 2021 11:16:44 +0100 Date: Tue, 30 Mar 2021 11:16:42 +0100 Message-ID: <87pmzhq73p.wl-maz@kernel.org> From: Marc Zyngier To: Mathieu Poirier Cc: Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, mike.leach@linaro.org, leo.yan@linaro.org, anshuman.khandual@arm.com, catalin.marinas@arm.com, Will Deacon , Mark Rutland Subject: Re: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host In-Reply-To: <20210326165550.GC2009902@xps15> References: <20210323120647.454211-1-suzuki.poulose@arm.com> <20210323120647.454211-8-suzuki.poulose@arm.com> <20210326165550.GC2009902@xps15> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: mathieu.poirier@linaro.org, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, mike.leach@linaro.org, leo.yan@linaro.org, anshuman.khandual@arm.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu, On Fri, 26 Mar 2021 16:55:50 +0000, 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 just went through the KVM patch, and I have a couple of question that Suzuki can hopefully address quickly enough. As for merging it via your tree, I'm worried that it will conflict with other patches that are in flight. We can hopefully set up a stable branch between the two trees. Thanks, M. -- Without deviation from the norm, progress is not possible.