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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 34E11C433E1 for ; Wed, 17 Jun 2020 12:53:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 130E32098B for ; Wed, 17 Jun 2020 12:53:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 130E32098B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jlXZd-0001tH-2G; Wed, 17 Jun 2020 12:53:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jlXZc-0001tB-11 for xen-devel@lists.xenproject.org; Wed, 17 Jun 2020 12:53:48 +0000 X-Inumbo-ID: 9542b9f6-b099-11ea-bb8b-bc764e2007e4 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9542b9f6-b099-11ea-bb8b-bc764e2007e4; Wed, 17 Jun 2020 12:53:47 +0000 (UTC) Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: hFbQ4rmH6qBHHMliPvv+BVE5yCWgnHfKKS/Tpff7AFdUQbh5OcnX19iN/TFhP3Un6irs+K3dsX nVpcWjz0GwpMCH0syRTI21OTlAxJPjzph3YfiwoaUuZmhoNNt/RzF4UBJe11WpaguFYyJ9cofB q+zEIVhIA2yuTUCeoZyGGZeWQUWo4hOn3UOTHT76s9bk54EPS6feDMMii68pbS6S7f4WiWQhrB CYgKZ1oe28o+wBgNcyIcSwoKDleFBXxpfZEFLESogC6kjZ6z4S/RVv9aACfY7UH32xW+lahws+ MUg= X-SBRS: 2.7 X-MesageID: 20567749 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,522,1583211600"; d="scan'208";a="20567749" Date: Wed, 17 Jun 2020 14:53:39 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: "Kang, Luwei" Subject: Re: [PATCH v1 0/7] Implement support for external IPT monitoring Message-ID: <20200617125339.GB735@Air-de-Roger> References: <1548605014.8764792.1592320576239.JavaMail.zimbra@cert.pl> <1555629278.8787770.1592333278517.JavaMail.zimbra@cert.pl> <20200617092103.GZ735@Air-de-Roger> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "Tian, Kevin" , Stefano Stabellini , Julien Grall , "Nakajima, Jun" , Wei Liu , Andrew Cooper , =?utf-8?Q?Micha=C5=82_Leszczy=C5=84ski?= , Ian Jackson , George Dunlap , Jan Beulich , Xen-devel Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wed, Jun 17, 2020 at 12:37:13PM +0000, Kang, Luwei wrote: > > How does KVM deal with this, do they insert/modify trace packets on trapped > > and emulated instructions by the VMM? > > The KVM includes instruction decoder and emulator(arch/x86/kvm/emulate.c), and the guest's memory can be set to write-protect as well. But it doesn't support Intel PT packets software emulator. For KVM, the Intel PT feature will be exposed to KVM guest and KVM guest can use Intel PT feature like native. But if such feature is exposed to the guest for it's own usage, won't it be missing packets for instructions emulated by the VMM? Thanks, Roger.