Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp850513lqj; Mon, 3 Jun 2024 02:45:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJHEDOfTghQBp0VVAv75he7OTidt3pKP6/H2UKQjWL1de/CfunUF6J3v9/6i+xe2pspI1+awkImnMxruGpjykcVLmPHYBpH6geqftwPQ== X-Google-Smtp-Source: AGHT+IGNcgkvvVe6YozweEWcIKlCodTHUxBuorj8L+4rqYWq1kvYZuUUEGzCt/sx6vk/Tpsrx3E9 X-Received: by 2002:a17:906:ad90:b0:a68:f1ca:a8de with SMTP id a640c23a62f3a-a68f1caa97bmr288301366b.36.1717407952450; Mon, 03 Jun 2024 02:45:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717407952; cv=pass; d=google.com; s=arc-20160816; b=QxLBeEGpafRJwVrz3CdXBaUwQXSBDoNBxExgY1GxHnXzzCciKQtBr/KvCbvFYuL0zT F1LDVHWwTdgg3QHfQbJKraQWRMzm51rdqWoWtDhAljfbO+Xbd8Lv+k2K5+EaGGyvdTwV 98JMpXzlan0jnilfXlM7Od2m66ElK8K1vWjy+Pw73dX/mcK+aZiQQCG89dhCUMhxIz53 UHSqzC4H1yjUcp/dyvc8JIwQncd56k3g00mVHnYugqtSfxvW6KwWrXBDJV99u9s8G8OK xH+owZi6kPA/bTyn+zWCHRt2U417P3+JUbToQdYmj/QhSVuAcNyrzGDf+DAfx6Pp72YA wGtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=69VqGOACByHajdY4ok7+bMz7clL7SK3cVzdC72namW0=; fh=9RByMoYVdnqPZ79kdPLF0sCj+m/9dcvOxY5KDeUZ5xc=; b=s5OKQyGfIxUWNnOqMnKKhZpU7RSWr7xIIQ4Iu0oMlPEDdUzsgbk95/FG8xvOuhvHP6 KBQZJhntX1XaEVsjpsuwh/IW/SoMcFUMmxm3cuO39iozbs0IOa8hWAqbKYEY6Fi8bgRx k210auv/0oZDHd/43jUW1mJtv/b5ktrUGUUbhIuG1YEWZPR4TCzT0uQCKtqaV3/ry8Hz qjJJM5HBqxKLCId8bpsmInmAc7EHVHE89N6/hqCg4M4mvuUDqHz8fQboCNIW8nurMle6 DaK/FACraOXIfIGCkL4tTZZmUWQ/3WIPR3n+/UaSXjJEYfSY5dGAYwWBtKgVcdvfa1Nq 3x6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-198923-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198923-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68b3ff90d5si253556566b.1052.2024.06.03.02.45.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 02:45:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198923-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-198923-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198923-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DC7A01F23E08 for ; Mon, 3 Jun 2024 09:45:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 19F23823B5; Mon, 3 Jun 2024 09:39:37 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 135BC82487; Mon, 3 Jun 2024 09:39:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717407576; cv=none; b=CVCvYaT3h9DIcKGDLaxxDxAz6zXYVaBZhE1uOazcpI/ep0KzQLwIGlYWRHCNI3PU6nNdZt6i9FACzdf6vvuAPk1/mHPaQeDNw3Bkegv9TDK4Wxi0/bktLin90Xkf0PYwwhbLWvcB4RNgW0PJXGR5iQtoT13xR1scqsAWIXaoTDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717407576; c=relaxed/simple; bh=qMkXAFv9lGGixL1rgvPjKdZzgR+KXcK9HaCAo6EOfrs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HXlHCK9QAi74ctmQBKO+MYI4BudjIfZ8cO0axZMnhukxJ1wW0ahUjZ2n1N2KL6AoPH1pPfdi9uV69uS+ddi4iGx1pFbRuDcoVeKJV0fnox5nfs16zeMBIiJHHp7KwoQoBW742c1KxGI2UddDVtI6QVtfqBHqz3mY3HkVwajn9bM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D7C0D1042; Mon, 3 Jun 2024 02:39:58 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6CD153F762; Mon, 3 Jun 2024 02:39:32 -0700 (PDT) Date: Mon, 3 Jun 2024 10:39:30 +0100 From: Mark Rutland To: Anshuman Khandual Cc: James Clark , Mark Brown , Rob Herring , Marc Zyngier , Suzuki Poulose , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, catalin.marinas@arm.com Subject: Re: [PATCH V17 0/9] arm64/perf: Enable branch stack sampling Message-ID: References: <20240405024639.1179064-1-anshuman.khandual@arm.com> <5f8fdfd2-a4f9-4fde-ad24-3b76231e61c8@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jun 03, 2024 at 02:48:58PM +0530, Anshuman Khandual wrote: > > > On 5/30/24 15:33, James Clark wrote: > > > > > > On 05/04/2024 03:46, Anshuman Khandual wrote: > >> This series enables perf branch stack sampling support on arm64 platform > >> via a new arch feature called Branch Record Buffer Extension (BRBE). All > >> the relevant register definitions could be accessed here. > >> > >> https://developer.arm.com/documentation/ddi0601/2021-12/AArch64-Registers > >> > >> This series applies on 6.9-rc2. > >> > >> Also this series is being hosted below for quick access, review and test. > >> > >> https://git.gitlab.arm.com/linux-arm/linux-anshuman.git (brbe_v17) > >> > >> There are still some open questions regarding handling multiple perf events > >> with different privilege branch filters getting on the same PMU, supporting > >> guest branch stack tracing from the host etc. Finally also looking for some > >> suggestions regarding supporting BRBE inside the guest. The series has been > >> re-organized completely as suggested earlier. > > > > For guest support I'm still of this opinion: > > > > * No support for the host looking into guests (the addresses don't > > make sense anyway without also running Perf record in the guest) > > * Save and restore the host buffer and registers on guest switch (if > > it was ever used by either host or guest) > > * Let the guest do whatever it wants with BRBE without any > > virtualisation > > > > Merging this with the current PMU virtualistion stuff seems like a lot > > of work for no use case (host looking into guests). Having said that, it > > might not even be worth discussing on this patchset apart from "no guest > > support", and we can do it later to avoid confusion that it's being > > proposed for this version. > > Agreed, let's just have "no guest support" for now in this proposed series > without any more additional changes to keep things simpler and separated. > I will also update the cover letter next time around making this clear. FWIW, that sounds good to me. Mark.