From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0796AC433E7 for ; Fri, 16 Oct 2020 11:40:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5CFDC2084C for ; Fri, 16 Oct 2020 11:40:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RheiIeFD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CFDC2084C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gca1WFDKx/3G6NbeTyKx8IfPLZN+FhBTPwkoDRjJp4k=; b=RheiIeFDdyzoExcM6kL+Pemlv JXIKp9vjStNW+zELJJf67uXUe16vlJyHbkCyHFqs+lHf3SZoNt8pKYgLxD6F3HL/ArWdZtSL2Rt+U VfsFLAe99MBCglX3nSZi+Cqo2FTLANdP2lLpzxOMBV/sdApA8LdS1JHNBS7L1NOlZt+tLGoPevs5A ImFHIevTkXDcl7rrSfJ0gyHgvifqQZwsiNs4tpxDFkxW6SSUFTAmnDk+H3FIFNypyLBb/AdPfKjCJ +jP+pouGUdO108aI/tqCrgiDbWOV6HNvScZLAN9zUCMAL9YGwVxO4NTeSKHFTneQtbqc31e1p5OuJ Xl83Be2lw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTO4W-0005AY-Hs; Fri, 16 Oct 2020 11:38:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTO4U-00059x-OG for linux-arm-kernel@lists.infradead.org; Fri, 16 Oct 2020 11:38:55 +0000 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 BEBBDD6E; Fri, 16 Oct 2020 04:38:51 -0700 (PDT) Received: from [10.57.50.28] (unknown [10.57.50.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 972553F719; Fri, 16 Oct 2020 04:38:49 -0700 (PDT) Subject: Re: [PATCH] coresight: etm4x: Add config to exclude kernel mode tracing To: Leo Yan , Sai Prakash Ranjan References: <20201015124522.1876-1-saiprakash.ranjan@codeaurora.org> <20201015160257.GA1450102@xps15> <20201016072401.GC4646@leoy-ThinkPad-X240s> <20201016092450.GG4646@leoy-ThinkPad-X240s> From: Suzuki Poulose Message-ID: Date: Fri, 16 Oct 2020 12:38:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201016092450.GG4646@leoy-ThinkPad-X240s> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201016_073854_861779_95900087 X-CRM114-Status: GOOD ( 20.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Denis Nikitin , Mathieu Poirier , linux-arm-msm@vger.kernel.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, Stephen Boyd , linux-arm-kernel@lists.infradead.org, Mike Leach Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/16/20 10:24 AM, Leo Yan wrote: > Hi Sai, > > On Fri, Oct 16, 2020 at 02:10:47PM +0530, Sai Prakash Ranjan wrote: >> Hi Leo, >> >> On 2020-10-16 12:54, Leo Yan wrote: >>> On Thu, Oct 15, 2020 at 11:40:05PM -0700, Denis Nikitin wrote: >>>> Hi Mathieu, >>>> >>>> I think one of the use cases could be VMs. >>>> Is there isolation between EL1 guest kernels which we can control >>>> from perf >>>> in a system wide mode? >>> >>> Sorry for suddenly jumping in. >>> >>> For KVM, I think we need to implement mechanism for saving/restoring >>> CoreSight context for every guest OS, the CPU PMUs has implemented >>> related features [1]. >>> >>> Thanks, >>> Leo >>> >>> [1] >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/kvm/pmu.c >>> Its not as easy as the CPU PMU for virtualizing the ETMs (with memory mapped access only), i.e supporting ETMs from VMs. We could definitely stop/resume on guest entry/exit, to support attr.exclude_guest. >> >> What happens to the sysfs mode of tracing? For that we would still >> need a config right to exclude kernel mode tracing completely. > > IIUC, sysfs mode and perf mode both can apply the same approach, the > guest OS runs a thread context for the host, so when a guest OS is > switched in or out, the hypervisor can save/restore the context for > the guest OS; thus every guest OS will have its dedicated context and > trace data ideally. I don't think Guest Context is something we can support as mentioned above, at least for systems without sysreg access for ETMs (and virtualizing ETRs is a different story !) Cheers Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel