Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp966364iob; Fri, 13 May 2022 18:00:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdRRjK/e5tT6NYossKSk+HXqlANQERQREcecGXN41fj2c3EBVuMF6cLv+Nt+9Mih7qCHIg X-Received: by 2002:a05:6000:1a8c:b0:20c:bd6b:ecaf with SMTP id f12-20020a0560001a8c00b0020cbd6becafmr5851409wry.341.1652490006552; Fri, 13 May 2022 18:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652490006; cv=none; d=google.com; s=arc-20160816; b=Dy6b7tyWmCcNCSgcXTSpqMrLXgOOKbV+6V2myTINk4yrCdv3sqVNuRYt7ZAc39Odge RN682/pBAkZrZmv0a1/A/vTycqSnwcFhPzTWDGmHA+Ixejn19KKLx2FKtywsOpjo1UzF wt4ZpuwgZPqEMxiU9NWaGOokq3jKpz4hQ2Vhb0iiea7V4pOkOUHf3bRFP3MSoijRaach yIwInGCwlqjukgZfvACO2PCwR8XoYxHJ7lfkmnaNfjpGhaSs3/mPROU/cmPNuMVXoRqA QLgryrD+1L/+9AtSue0x4WpldghgrnW0gYvGVP0WvWyGhmmdAyVUJ0KR+n3jrJksG5nZ Ej2w== 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=iMowcoCpadvRejgAYQxfrW326nQJKZtCt1hTZ5+f5HI=; b=sVSQye106mCG8JeK9WfqWsmILYQb0xqcSB+p30dmXRZ7hVaZ1+4xux5djDz1GzV7Ph SOWIW6ngNODbRFIXqbL0NDJRUyIogqboEwxXJ74LWbLNPcz/Kaj4co5njElZSdMubwWR pD3MHbRQgEFivAV6Z3g1zNCl29XM5pT9merAx6Q0PmMgrfVU6m0GYCVzQHy9hzrmutjw XEOjW+Xp7UrmLOwsDEQBje0ZB90gcKKmhK4LcGN/lU53caZOXBZMIDmLMHFzm/0aO71e UzwmSF1wPJThKCtH1MpnBvyjm5SuQ1Q1m64plQSEKqTekJsUd4P5ftWRKPfjGKYUeYUr aoRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OxmfL+GJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id c9-20020a056000184900b0020cd9523040si5489539wri.540.2022.05.13.18.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:00:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OxmfL+GJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 71E7F363A1F; Fri, 13 May 2022 16:34:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382435AbiEMSNz (ORCPT + 99 others); Fri, 13 May 2022 14:13:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbiEMSNw (ORCPT ); Fri, 13 May 2022 14:13:52 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB07219CEF6; Fri, 13 May 2022 11:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652465630; x=1684001630; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=BWYV+Oi9Z/0NNbOFw08aSu8Ir6Eg+66KwQpMi+GhjdE=; b=OxmfL+GJC3tvEHYQulZ/RA3UbR2vhyc5DDkcArAsfO6HJhBNZlsZxyR8 kWyONr+nTfihd/Y8WFvYjQDgGtOJF1Tyu0GHbKBR9NOT8UzS8LM30Xw7f 52Dr9/kmh00B/VMptZm+WuVHPmn8+/ua5XXJNB8MHVjhUOunPyLXc2SFO ACEjeyKdKOvEM99hGoizI/UU9AORyXnlwAi+X+AevqwGqJTlBv6qEU1ro 4CPCXB0ke4KRXaE+NdjtPP3oJTJ7kvtyTPe4NJb9q8UyWvdsZ5n5L4lrQ nDzBvhZxChy7iOPzOhmk2stRW+YIg2LTGtqPY55z42iJHeZn5a9K1btni g==; X-IronPort-AV: E=McAfee;i="6400,9594,10346"; a="270048382" X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="270048382" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 11:13:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="712512622" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.54.74.11]) by fmsmga001.fm.intel.com with ESMTP; 13 May 2022 11:13:49 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id C84F9301AB6; Fri, 13 May 2022 11:13:49 -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> <875ym9h4mt.fsf@linux.intel.com> Date: Fri, 13 May 2022 11:13:49 -0700 In-Reply-To: (Adrian Hunter's message of "Fri, 13 May 2022 18:14:49 +0300") Message-ID: <871qwxgv1e.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: >> >> I'm still not fully sure how it exactly finds the code on the host, >> how is the code transferred? > > I don't know. From a quick look at the code in > tools/testing/selftests/kvm/lib/kvm_util.c it seems to be using > KVM_SET_USER_MEMORY_REGION IOCTL. Okay so it assumes that the pages with code on the guest are still intact: that is you cannot quit the traced program, or at least not do something that would fill it with other data?. Is that correct? It sounds like with that restriction it's more useful for kernel traces. -Andi