From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75A701F03CD for ; Tue, 7 Jan 2025 11:37:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736249844; cv=none; b=RzAhaX0XOwV84poY5Wr+2nWAA926Fk6t24AxUhuWZ01Ayi2TVFc55Y+QUwNIdS/3Hnx9Py4JRsMQqSO8WRhJZes8/delENeSH3/Hq1vemKfFyJHgD5ROo6TG4aMkf9V0pAEzpSoH9b/owcZMKerhoPpX4/f7r2PQl23iRQxBJl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736249844; c=relaxed/simple; bh=T1JKz/5gONQPF/SagAHF2pyklGaN+K3Up7hSXIu2rPw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uaBaYcRPZeZe/KHMLsC3gt73ctbZUlke3+xkh9y/9EsNaML4c9CyanZTYabn9bojlb2bfb47SvcpPhs9LMpgFq0OTTWgJVnnqSBnzfub/80ZxxiVyY0V79Ys38LnyxKcX4/hEY2bXEXsVc9SoKcxgH3EUdOLu0HimY3wjLJ5Ibs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sTxhwcAb; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sTxhwcAb" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-385e0e224cbso7688017f8f.2 for ; Tue, 07 Jan 2025 03:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736249840; x=1736854640; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tZSQaMswdb9C1vMZWBKr4qtwXrK6yb8GLXI20JFrh0k=; b=sTxhwcAb/zLV1oRGC/GMs8d0vnf6n+S+KBOhdgajqmyiNjwkVSDiYqATaKJkjeTXTR ih7Q/V9YqNay8a6qMHjr9Agm3GPlZyQsUdznTxCA+dxMQtS1pc+5HZ0xMwA/5ht0wP4e EUZG8eIkbz9XaGutpx7iLOzU35dG2grnlFDVMxU6f95fsdm571i1Nm3x6kXG6xFw8EBP eb/V4VKecBC16hNtz9zUIH64CYdknak/DVx040f0241GNj6JXYIPUORK5nFIUUS6IojD Jw4r8esUCAVi0fHhsFvMKzES6Jn3LdR6kY6visQd0gShgOLCFZLVNCPxvQeeaN1nrCSg jjpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736249840; x=1736854640; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tZSQaMswdb9C1vMZWBKr4qtwXrK6yb8GLXI20JFrh0k=; b=p0MDsaRvijhZuqPa38VWvelHQWoVbnA3Pne8cSQOhI0XYW+ND2VeWT3OcNKmT98rlA A4CXdGPH5V1BBUyRT77ywye9IutXNgNMSZsdqCvzWWxyIfQZhWP/JDRc298c4taOiCnf SDqBeenBg7UAKGZvs3JRwpKwIbeLVWVtOj14JpMBeWGFyHvCLjySMBiTITPRNMIw0B6d vd2QkR2B+yGg4DnPpaJdzK8ncExtP3+e8fqjHR3GgtFfCjPdfVMNCFpZxoUG9PBNr8Ge QYOxFMxKzZP+kcbVYoGIFTHFv7vcq63Z0QXyFEmoo5VJNxvTsAZBXx1WzD8RHzFUdDRC yjTw== X-Forwarded-Encrypted: i=1; AJvYcCX1JraXHOX539gRdi9MnYy18EDRLw40DUQLuEpubG+GO8Yt2v1SATPxu5SoklDlWv0H1WJcUcJXregn4g8=@vger.kernel.org X-Gm-Message-State: AOJu0YwBkGa5B9qvFVInTRaY5rlIseotj253ENTU9QF/jjUuqJs3+tB3 cQ13FygaKDU2ZQ1JHDXRh96mVWG/cu1quJm58Y61jxw5+Nx49ReiP3+V36xHImI= X-Gm-Gg: ASbGncsIQHM3rIE2qXqUQ04eQprV4M3FUzhCWLgIvzL5UxsqOX7uhLr+0Kf8xqXUHvV KITtuoqEzFmNtpPegpeKeoM9dv2qtbywUtgF3VxEqwqnj50wTYLgiAxkBjpFJWb3AcsRMpyaNFd UT3kTNCk4+xFPp9J+fZYsWaG2E7G855lxgEUSZCxPfjGA+vde5CXiozMWLb7aHRJqFZ7yi+Xi5q 0RDAsKuIruendwO2yqD806yB0Iy70G0ZG/SVO5SCg+MjDL0Y9ihqp+s61C1vBUucYg= X-Google-Smtp-Source: AGHT+IECQSms/EowoHXjQsCpkWNAzVFNllMRnf9lJ0ZzSVaV7Tpg5l1Xcq7G+0uJGbW59ugW9EO2jA== X-Received: by 2002:a5d:64c2:0:b0:385:e968:f189 with SMTP id ffacd0b85a97d-38a22408262mr52863642f8f.51.1736249839872; Tue, 07 Jan 2025 03:37:19 -0800 (PST) Received: from [192.168.68.163] ([145.224.66.180]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8289a0sm51585022f8f.7.2025.01.07.03.37.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jan 2025 03:37:19 -0800 (PST) Message-ID: Date: Tue, 7 Jan 2025 11:37:18 +0000 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 v9 0/7] kvm/coresight: Support exclude guest and exclude host To: Marc Zyngier Cc: kvmarm@lists.linux.dev, oliver.upton@linux.dev, suzuki.poulose@arm.com, coresight@lists.linaro.org, Joey Gouly , Zenghui Yu , Catalin Marinas , Will Deacon , Mike Leach , Alexander Shishkin , Mark Rutland , Anshuman Khandual , Shiqi Liu , James Morse , Mark Brown , "Rob Herring (Arm)" , Raghavendra Rao Ananta , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20250106142446.628923-1-james.clark@linaro.org> <865xmsov53.wl-maz@kernel.org> Content-Language: en-US From: James Clark In-Reply-To: <865xmsov53.wl-maz@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 06/01/2025 2:48 pm, Marc Zyngier wrote: > On Mon, 06 Jan 2025 14:24:35 +0000, > James Clark wrote: >> >> FEAT_TRF is a Coresight feature that allows trace capture to be >> completely filtered at different exception levels, unlike the existing >> TRCVICTLR controls which may still emit target addresses of branches, >> even if the following trace is filtered. >> >> Without FEAT_TRF, it was possible to start a trace session on a host and >> also collect trace from the guest as TRCVICTLR was never programmed to >> exclude guests (and it could still emit target addresses even if it >> was). >> >> With FEAT_TRF, the current behavior of trace in guests exists depends on >> whether nVHE or VHE are being used. Both of the examples below are from >> the host's point of view, as Coresight isn't accessible from guests. >> This patchset is only relevant to when FEAT_TRF exists, otherwise there >> is no change. >> >> Current behavior: >> >> nVHE/pKVM: >> >> Because the host and the guest are both using TRFCR_EL1, trace will be >> generated in guests depending on the same filter rules the host is >> using. For example if the host is tracing userspace only, then guest >> userspace trace will also be collected. >> >> (This is further limited by whether TRBE is used because an issue >> with TRBE means that it's completely disabled in nVHE guests, but it's >> possible to have other tracing components.) >> >> VHE: >> >> With VHE, the host filters will be in TRFCR_EL2, but the filters in >> TRFCR_EL1 will be active when the guest is running. Because we don't >> write to TRFCR_EL1, guest trace will be completely disabled. >> >> New behavior: >> >> The guest filtering rules from the Perf session are now honored for both >> nVHE and VHE modes. This is done by either writing to TRFCR_EL12 at the >> start of the Perf session and doing nothing else further, or caching the >> guest value and writing it at guest switch for nVHE. In pKVM, trace is >> now be disabled for both protected and unprotected guests. >> >> There is also an optimization where the Coresight drivers pass their >> enabled state to KVM. This means in the common case KVM doesn't have to >> touch any sysregs when the feature isn't in use. >> >> Applies to kvmarm/next (00163be8bb59). > > Can you *PLEASE* stop this absolutely nonsense of posting patches > based on top of random commits? Please look at how we integrate new > developments: they are *always* based on an early -rc tag (usually > -rc3). > > If you depend on other patches, add them to your series and post the > whole thing. > > Thanks, > > M. > Sure, I re-posted it on the latest -rc with a few commits picked up. Thanks James