Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1173312pxu; Fri, 16 Oct 2020 05:53:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDIjY81avz5eBvzXS2huc159z/4n9MetrrJXCwYSDFq/aYFhyQi6P7IjnYJSes49DJstoB X-Received: by 2002:a17:906:394:: with SMTP id b20mr3451655eja.513.1602852810995; Fri, 16 Oct 2020 05:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602852810; cv=none; d=google.com; s=arc-20160816; b=CLSn8UAbP/gkm50YhME+OCXI9+hSIP7EswtjLCJvQIg2C5g1TpPzCy0ZdzU9TVE6pA 7EM/lQHx5dtBwEBOTDme03fnYhnH+0ucisR42K24Wq0NGjL3U98JLOr+mgGb5ozSOPFT nPHcHmyoXKIuG5IIrAl3Vxs8qdw2TIVBF0hyy0ZCyLLCl5ZNE9+eiEbhMSfbFXNs6ls2 1H9ByvKM+2p7PH1u8L5J38LvuST2nPAca4CyZw+bkJUOWJHuCipwSDHreXfbjk/41asL ftZ7BwSwFV9pJr7+5PW2nYJMT9cPKdUpNjadWV7XBYjI4V++epCFLcNkf8Xm8/KWrCXL bJ1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=MBBTz+wbATBpIcOHVoqb2HLcX9i5i5/HpFr5H1lz7UY=; b=ahwztDnj+YsLhTF/Cu+vsTL+lCPjd0RPfw8sgSUI+vgvwPm8J9kX8aegBvH+Mvlbb/ kQzqxtliR9s2ukusPrwSMCtX7y7u79FE1mp1k5Lu/swn9/rfeviN5LwDnTITz32zn0hj M2S5Ziqa3fnZtcPeyENum2AC5gZ37zkJcpuXaYngN1MWcuTJpIo1QB+hVZiDJPeiqKQG c8zpo3G603JwS1z9Ctci9Euwm7p67Bx9IYicRVX1Ma0FxSer3WcQuMfgJXK2ogmxy7Ib j9KlyFo0lDkJ9dLbCdzatfY4LUKtsJvfsY6aZxKlUPZShIko9cFvA0WtRv0QJ8LmqvDj UwGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ZynXNCMs; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci1si1563629ejc.31.2020.10.16.05.53.08; Fri, 16 Oct 2020 05:53:30 -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; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ZynXNCMs; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395299AbgJPKau (ORCPT + 99 others); Fri, 16 Oct 2020 06:30:50 -0400 Received: from m42-4.mailgun.net ([69.72.42.4]:12297 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389536AbgJPKas (ORCPT ); Fri, 16 Oct 2020 06:30:48 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1602844247; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=MBBTz+wbATBpIcOHVoqb2HLcX9i5i5/HpFr5H1lz7UY=; b=ZynXNCMsxqq6J7M8zHHNFObXUdjvX7MGXV9KnZwXJ5NevORKTV8G7gFhtKLQi38qn75mcPaX WL6FaewAhdgU1lK2sBi7Vupok3ChrYNSE8NpVsg+C4U6le4gOmGtbmDiGJ2j3/nlLbp1NSSK aFY60KeKCmSWJQjwK6MKSMATN/A= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5f89765706d81bc48d016215 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 16 Oct 2020 10:30:47 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 60C47C43382; Fri, 16 Oct 2020 10:30:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id C25CFC433CB; Fri, 16 Oct 2020 10:30:46 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 16 Oct 2020 16:00:46 +0530 From: Sai Prakash Ranjan To: Leo Yan Cc: Denis Nikitin , Mathieu Poirier , Suzuki K Poulose , 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 Subject: Re: [PATCH] coresight: etm4x: Add config to exclude kernel mode tracing In-Reply-To: <20201016092450.GG4646@leoy-ThinkPad-X240s> References: <20201015124522.1876-1-saiprakash.ranjan@codeaurora.org> <20201015160257.GA1450102@xps15> <20201016072401.GC4646@leoy-ThinkPad-X240s> <20201016092450.GG4646@leoy-ThinkPad-X240s> Message-ID: X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leo, On 2020-10-16 14:54, 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 >> > >> >> 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. > Thanks for the explanation, so for this usecase then we would have to implement something as you suggested, not sure how hard would that be looking at my KVM knowledge(which at the moment is almost nil) when compared to a kconfig ;) Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation