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=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 145F6C433E0 for ; Tue, 30 Jun 2020 17:37:29 +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 E2E482074D for ; Tue, 30 Jun 2020 17:37:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2E482074D 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 1jqKC2-00015T-Iu; Tue, 30 Jun 2020 17:37:14 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jqKC1-00015O-Ed for xen-devel@lists.xenproject.org; Tue, 30 Jun 2020 17:37:13 +0000 X-Inumbo-ID: 544516c4-baf8-11ea-8678-12813bfff9fa Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 544516c4-baf8-11ea-8678-12813bfff9fa; Tue, 30 Jun 2020 17:37:12 +0000 (UTC) Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +Np/BWtx/I4QIB4sV5N2Yq25bSkFW8TR+l9C7IrlpO9A1kqCJ8vK73ynl0/IQN9QoHpofXj80+ e7BVcFeZVcfooUrBJS/9ZnIDnYSfKCf3/gvZRoYiUb97YPL8ZG0l7SGUoIQN8nMnx8msLVYQwC wX/dI0iqcdbTHpiIQn42pSfQQqbUE6biBGKUW2ZHHha+CuMy5IV+6qLCh7/VIfCdfS105OsL8g YMtgPMSq18GHQEKdo6mQBPI61qr2b6ox9edoV+zRRjbl3h4c8g4fZH0slpIBq/9U7g9z3HnHKU 8qc= X-SBRS: 2.7 X-MesageID: 21312351 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,298,1589256000"; d="scan'208";a="21312351" Subject: Re: [PATCH v4 01/10] x86/vmx: add Intel PT MSR definitions To: =?UTF-8?Q?Micha=c5=82_Leszczy=c5=84ski?= , References: <2ff9ecee8367e814a29b17a34203bda0e3c48d74.1593519420.git.michal.leszczynski@cert.pl> From: Andrew Cooper Message-ID: Date: Tue, 30 Jun 2020 18:37:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <2ff9ecee8367e814a29b17a34203bda0e3c48d74.1593519420.git.michal.leszczynski@cert.pl> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) 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: tamas.lengyel@intel.com, luwei.kang@intel.com, Wei Liu , Jan Beulich , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 30/06/2020 13:33, Michał Leszczyński wrote: > diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h > index b328a47ed8..0203029be9 100644 > --- a/xen/include/asm-x86/msr-index.h > +++ b/xen/include/asm-x86/msr-index.h > @@ -69,6 +69,43 @@ > #define MSR_MCU_OPT_CTRL 0x00000123 > #define MCU_OPT_CTRL_RNGDS_MITG_DIS (_AC(1, ULL) << 0) > > +/* Intel PT MSRs */ > +#define MSR_RTIT_OUTPUT_BASE 0x00000560 > + > +#define MSR_RTIT_OUTPUT_MASK 0x00000561 > + > +#define MSR_RTIT_CTL 0x00000570 > +#define RTIT_CTL_TRACEEN (_AC(1, ULL) << 0) > +#define RTIT_CTL_CYCEN (_AC(1, ULL) << 1) In addition to what Jan has said, please can we be consistent with an underscore (or not) before EN.  Preferably with, so these would become TRACE_EN and CYC_EN. That said, there are a lot of bit definitions which aren't used at all.  IMO, it would be better to introduce defines when you use them. Thanks, ~Andrew