Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1188676lqb; Thu, 30 May 2024 03:03:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYtA/+hjKkllmLwVHiuOEPcrH0I+90vlVjnOk539Qxr77t3DEBDJnsNlW4Da2mdRSQVMS7r3pQYU/FeHII5+9JGOXnI/ZrXxoBxaFhZQ== X-Google-Smtp-Source: AGHT+IEjxxrXZAikKQ3jCfTf+hleWDWBuQT4P98QJF6MAUgX1djZ+VURzWFZhBVEb/J1qv0Ozd1A X-Received: by 2002:a67:f583:0:b0:48b:a831:7489 with SMTP id ada2fe7eead31-48bae95e7bemr1787977137.5.1717063407595; Thu, 30 May 2024 03:03:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717063407; cv=pass; d=google.com; s=arc-20160816; b=VU9iZtMXuSLy/97C1e+yv1vGnq/vxV3g2tIySVCjxCdyZR7iPGzrAr0o8jnuOPzIDe FyaA/mphBk2oRmwJnOlU9ff3EXpn5W6BElBZYDVJYC3x0GcCFrC6OgNWVuuOWLTlpv7S WCarCsycapen+T+AYfJ/jNoQGpjkO2/VaADmuTBJp/7PJKloK+THU5G7+BS0v59mNOUD lI/Zsi+goQKS9IbwFXU/u5ZHfP8ASdn1j43G0KoGM9QrAYCB+ECFzk7JKJIACaSbQsCo +zR6bE7w/Pu9J0LflyrsvmMgfj3GAEKqzKS9jm++VCoyxnclN1dzq4e7ZTDAGRqQwq5X usbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=Z9CHa4WFABQROyRG+E7/oJPqiKoUckWo3XEEOcMzjVE=; fh=BKtvGj5BDohiJLp9kBrMDW9wK59fRCzJWq2d1yYGwIc=; b=R74e9jMlW/F5fdJuRQCmGlZcn4b84EguRigxLZm+BPadyjm5NhgxXi8k1hWHkmbJ9i SIFLUOCrvSl7+EsEGxBce5CFDTv1x8Ov+OotDBfb20BL2BIMuJMKdConxDbnsjbca8yv CdeuyQ/rRQ9qhKgurA+tzjJ+eDEga4aPEt6Vhq9hZd/93zONvU+g17AR2oVSLbuupixY ZjMBV7yvhOIYkCLPOqRyWSouk3D+2JzxHYNLoLThbZQQO5HH49e50W7y3PaicH1NxZyd fu0FUudJ2OZ2DlaS6HLdc+dfHiy7eYhk5h2Jrb237CPnmMCFU/UyPapIYOWoVYiBFjGI yugg==; 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-195223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48a3a20649fsi3293881137.59.2024.05.30.03.03.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 03:03:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-195223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195223-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BB1FC1C2212C for ; Thu, 30 May 2024 10:03:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B85231761A8; Thu, 30 May 2024 10:03:12 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 871616F2E6; Thu, 30 May 2024 10:03:10 +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=1717063392; cv=none; b=gpxsuFhN3VNKNxwno0XDzVoZnn0HfK1IH1Ha3IfI+5RqRq8YekFTI+/MO3Aji/Hao+qWPls52Z6eTRDtuAZD2d0RZY7qel615WqwglfyD3fZo+2vU3i0PK6MriE2IyKNezqjR3w9J15lk4SaO/hjyO4eK+AFZj6mpvYbfpfn7Gc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717063392; c=relaxed/simple; bh=OUn7iuxuw7dEQyjT1Zqqm9Q0bZLJ5YwLkhbMQ3hWXmI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J1suG7CdT506IGKMWThNElPFffCMMTGuL81AoDFLkYmQZIPREeLVFWdRUmrYfLe8z4V0chN9grZYAlCL77lbjbvLUH+msB9yeg3Dk/1H5jAjULe8DF4ibLTVwSk6DVA/s0s10Pzq8nooG9Ak6RBaKGqUYKy/0syDmHfULDKWecY= 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 2826E339; Thu, 30 May 2024 03:03:34 -0700 (PDT) Received: from [192.168.1.100] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 317CE3F792; Thu, 30 May 2024 03:03:08 -0700 (PDT) Message-ID: <5f8fdfd2-a4f9-4fde-ad24-3b76231e61c8@arm.com> Date: Thu, 30 May 2024 11:03:10 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V17 0/9] arm64/perf: Enable branch stack sampling To: Anshuman Khandual Cc: 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, mark.rutland@arm.com References: <20240405024639.1179064-1-anshuman.khandual@arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20240405024639.1179064-1-anshuman.khandual@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. James