Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp922750imm; Fri, 8 Jun 2018 07:19:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIcbrkMQ0V3JP/CXskBS9MOQvqCspihQ7HI5Qpu0mybDubJEIZJpFtUw+lVCFJaoh1qNaan X-Received: by 2002:a62:da59:: with SMTP id w25-v6mr6264620pfl.161.1528467594758; Fri, 08 Jun 2018 07:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528467594; cv=none; d=google.com; s=arc-20160816; b=UWSC2erj/c5Dv8SGg6lIYLZziXDt/v+zV+8C4slcImZ5rqP93Z+PUTnxZ0CxbvEp3u LE1YxCXsx+J3QXlmG+DdtgrJxa8QpQ4pvEAv0XYwpunlKCep2IvvCXacpYbH7y0kgyps ll0ucpsU1GhGcPjo+E6MnTpBTwL0xWiWwbmGd8WPaVFnyA/RaEIuCne1WMgd+OVa/Yfs UsPhTz93/psSn8YZCqbeA+mSUvj3/Gfd+/5fXbu16kbkbsd+srno9o+zRkgz1eyaDV8T gyMhaUhjfQZrdL30ct8Pp2Z1XRYdzKS4G85PnSy7Jo+RE1Ze19EZGxvADLWVI/VU2vTw dEyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=G3Uur7oESADK3/sUJCdCCDBtlIMSs7Fpg4hL5P+eK/Q=; b=wJ/yCpJhrEHFphBsBb6Vx/ec6j2CM3Y6hKcXbnpRgHJYJkOuApglZLHGd58xH/FkCB ziAqh7vyVAg2SxS1FRfWEpyl+ZwZjh7X+XrCo/quypzORiGk5RqRfr/lginbG4uf61DC TLD4uPGS9ZsmmMom40kHqPW1lgFYmrdU4Dluq6bp4SiEFmOLp9Y7drwWUUZkNXH/Zlm5 Eud4mbrhj11SqHMicXeDogpyrtkfkz4auAcz2RGcN+cI5B9kklHrBviMu84j4zv0hfvF OrKhwFAxwwCJ4eq6qVL8vY/eq0cdn+MYIMCe8p9NMTS36dyyPLPfLgHyn2+X9zwbQj+d SoEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1-v6si25213140pge.439.2018.06.08.07.19.39; Fri, 08 Jun 2018 07:19:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598AbeFHOTP convert rfc822-to-8bit (ORCPT + 99 others); Fri, 8 Jun 2018 10:19:15 -0400 Received: from mga07.intel.com ([134.134.136.100]:20232 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485AbeFHOTN (ORCPT ); Fri, 8 Jun 2018 10:19:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2018 07:19:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,490,1520924400"; d="scan'208";a="57624678" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 08 Jun 2018 07:19:12 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 8 Jun 2018 07:19:12 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 8 Jun 2018 07:19:11 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.82]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.51]) with mapi id 14.03.0319.002; Fri, 8 Jun 2018 22:19:10 +0800 From: "Kang, Luwei" To: Alexander Shishkin CC: "kvm@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "chao.p.peng@linux.intel.com" , "thomas.lendacky@amd.com" , "bp@suse.de" , "Liang, Kan" , "Janakarajan.Natarajan@amd.com" , "dwmw@amazon.co.uk" , "linux-kernel@vger.kernel.org" , "peterz@infradead.org" , "mathieu.poirier@linaro.org" , "kstewart@linuxfoundation.org" , "gregkh@linuxfoundation.org" , "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "david@redhat.com" , "bsd@redhat.com" , "yu.c.zhang@linux.intel.com" , "joro@8bytes.org" Subject: RE: [PATCH v9 06/12] KVM: x86: Add Intel Processor Trace virtualization mode Thread-Topic: [PATCH v9 06/12] KVM: x86: Add Intel Processor Trace virtualization mode Thread-Index: AQHT8XjJo6LEi6JP4kSBus/OADmacqRUXUUAgAIgrNA= Date: Fri, 8 Jun 2018 14:19:09 +0000 Message-ID: <82D7661F83C1A047AF7DC287873BF1E167FEFF92@SHSMSX101.ccr.corp.intel.com> References: <1526964735-16566-1-git-send-email-luwei.kang@intel.com> <1526964735-16566-7-git-send-email-luwei.kang@intel.com> <20180607132638.snnnt5ecwisfgkmy@um.fi.intel.com> In-Reply-To: <20180607132638.snnnt5ecwisfgkmy@um.fi.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > From: Chao Peng > > > > Intel PT virtualization can be work in one of 2 possible modes: > > a. system-wide: trace both host and guest and output to host buffer; > > b. host-guest: trace host/guest simultaneous and output to their > > respective buffer. > > I think we discussed this before. That's not the choice that the user needs to > make. The only choice that I see is what happens if the guest wants to use PT > while it's already in use by the host. Otherwise, each of them gets to use PT > as they would. > Hi, Thanks for your reply first. If guest want to use PT that we need to expose this feature to guest and guest will save these trace packets to guest buffer. Host will can't get the trace which are made by KVM guest. This is Host_Guest mode. On the other hand, host may also want to trace hypervisor and KVM guest execution trace and output these trace in native. This is SYSTEM mode. PT can't be exposed to guest in this mode or KVM guest trace will be lost in native buffer. These are two different use case and can't coexist. Thanks, Luwei Kang