Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp999850iob; Fri, 13 May 2022 19:09:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPbIGJgojnNspfwlgNH0buIgKraVYR3ukYdgGcipJjz1q3GWNCSB7/xU6/4yQOKTo6zTdo X-Received: by 2002:a05:600c:3ca7:b0:38e:50d2:27fe with SMTP id bg39-20020a05600c3ca700b0038e50d227femr17257114wmb.159.1652494147123; Fri, 13 May 2022 19:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652494147; cv=none; d=google.com; s=arc-20160816; b=1Asi9DFmX6CGppVlIfA+U7vS63to2nL4LMCxraj+1+mZu3hYHMQ3kgS62k6sBQDzR9 AnjBK2Nz8L1lvG2FKvQKA9CdOI5skc7DZ+RpIpwfPs5XfYrkUgO+QWk4peD2nwWknT/l vEQQQd1nriCGpWXRGsYWLPEWoldd0b9ieHqUWnDBvFt2D4FxE2DTla13p9psqzJCMe/w yDvwovErTgRXh+K6dF8phMAM5b5HCy5Td+hiweHP3rw9GxEp8950ETcUg/eNoQFSKq5h nfyNktj2Yx3gsif3n6UMQ1noB9E8DAC2pwlGHTZuF2qJmhUN6pahX2UmWD3c0RWANbde LyJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=u/+5fiJBx5XK83G4PWIOUjKfL6oGkhb+wN2o1NUf8h8=; b=RKM296FGzuzJXMOWrlF666UlYkoucYo++7LzuLpSn0kASj59R/MIfZ889G9zKuyw8y ol80eW7d1rEZwK5fhXl0sozWbK98Tt7eTdgTGyhwm9sB1lSAZ9jeff6ds09gpanNhtU5 JC+JS5NUDtbx0GBCS1TFDIlKKepLDpHQ+XUf69EF1SPoerF0Iva67x8RIMkImdrXnN4d qLWzVNwmo4dcUPqgojLF8+z7wq7dDDeH3wROpn00lHWKDN/pNHbUvp93FBsyQiuUIM3q VOPsrMmELVp21LBt3jgffQU9/0Zz++TOO+/VCSIfZ5osfzrye9ZCHolLH7d5E5RZUsNz 5ixw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c8kqHpiX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i12-20020a5d584c000000b0020cdc8f7055si3235042wrf.838.2022.05.13.19.09.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 19:09:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c8kqHpiX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1F348300D49; Fri, 13 May 2022 17:28:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234273AbiEMOr0 (ORCPT + 99 others); Fri, 13 May 2022 10:47:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381642AbiEMOq7 (ORCPT ); Fri, 13 May 2022 10:46:59 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05E09488A9; Fri, 13 May 2022 07:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652453195; x=1683989195; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=7M550510N4y+k5TC74sJtTjxH6gUaD3AaC0jMB7il0c=; b=c8kqHpiXGnee5eyvcW9QOI3eq3yK4FwTnEPhzpG/VHtfyPnEVILq6Wjq 1NZPF46qpW3pFwOR9w2PWlf2dNgLaNSF1nMYBdrckysnR4lf9vautoRrb N8hhw4G2wel7WTsE1sYWv6/kQFqwbYlaBMFWX+P8xQTaKo7uBAFNNla/K M4O7vNYraBveiSafKNiq9LL4SXZtj41kTLfxKpxo+PpXWLhKW+2cOTrqh CXCG0p7BRmoY4NRVNCvGQ69nv0Rf7g2GGGeYYwQa8hCSZjUgCMpGxqN1Z yCePrir7l0MpCAh24wsHhuwYPV6sHjrQyK/h5SUPFNg+F91WWJZUvSPWR Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10346"; a="267913222" X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="267913222" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 07:46:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="543285030" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.54.74.11]) by orsmga006.jf.intel.com with ESMTP; 13 May 2022 07:46:34 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 55F43301AB6; Fri, 13 May 2022 07:46:34 -0700 (PDT) From: Andi Kleen To: Adrian Hunter Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Ian Rogers , Leo Yan , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH 6/6] perf intel-pt: Add guest_code support References: <20220513090237.10444-1-adrian.hunter@intel.com> <20220513090237.10444-7-adrian.hunter@intel.com> Date: Fri, 13 May 2022 07:46:34 -0700 In-Reply-To: <20220513090237.10444-7-adrian.hunter@intel.com> (Adrian Hunter's message of "Fri, 13 May 2022 12:02:37 +0300") Message-ID: <875ym9h4mt.fsf@linux.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adrian Hunter writes: > A common case for KVM test programs is that the guest object code can be > found in the hypervisor process (i.e. the test program running on the > host). To support that, a new option "--guest-code" has been added in > previous patches. > > In this patch, add support also to Intel PT. > > In particular, ensure guest_code thread is set up before attempting to > walk object code or synthesize samples. Can you make it clear in the documentation what parts runs on the host and what parts on the guest? I'm still not fully sure how it exactly finds the code on the host, how is the code transferred? Other than that more support for this use case is very useful. -Andi