Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4075676imm; Mon, 14 May 2018 02:08:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrrWYQJ4yjQskqBDY+MoiX+2X7y5+KbRxpABqg28R3CPsS3f2/TjP14QXTIkw1uL2HM7iKg X-Received: by 2002:a17:902:28ab:: with SMTP id f40-v6mr9103056plb.208.1526288896969; Mon, 14 May 2018 02:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526288896; cv=none; d=google.com; s=arc-20160816; b=waT5r2PSLqMAkmfgDvUPqMG9QgemdiKFv9RXAuCHhq8nDLIQx3MMSFcIBhOMLEYl/8 fKCz0OTdXRYo0O3mMC8F3Xp38GZtB8Y8Bbq3ys4zffYEyKyg1uVNixvwPS4FaFnRO/t+ E1/exWHhQdsGojnqv/G5Yw4snQ09dW6iXBkLHweYHqS3cD1x7KYivC+muqQKDgM2vcps kRgoCAcOL4xpr+PABwtJctisrH+Ad9NLRvX+egcRriKtLm+L1T3gmemxTSRV3OuwkRH6 fM2J8lBZF5OfP4mFJ0vYW+c6FUK4MZLsan0PsfQsrQk+qe9M1o5rQ6V5lpBQAOO9zxJ8 8sow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=oSARMHova8ckAQXE+qqZL+iAS6nh8fBZNoiR3BUv6yc=; b=ROZAhqEtplLg6SuMZrRLWL09E6O19qMM0RS0C+tiboJw/3J3HuX82eSq3/EQbdDdiJ RKZ9bQTi3FY5e++bcel4H+a1f6PiPHIpjn9XfalXZGl5IsAUdV+wLmKVMfzlsXJMtF0P rkNQ4NP3UgyGdo4xAohMdgybJu/A0EKmUvWW9pitwywvYbllVRxMCZ99St7QIdDyDrEa rEK60XjphKpcyUSwoLq3sCOYDypgRucnUX3WTRDD/AzP9AV4Q3pN2La7kHApAxKe3yi/ nbFbvdWvnEWPrx0ymC2eUuE6omiZpQEE8aS2W9QoAMBYwoOpdNDyA+SqKpv/UengOtm3 VYhg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4-v6si3288937pgr.366.2018.05.14.02.08.02; Mon, 14 May 2018 02:08:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbeENJGf (ORCPT + 99 others); Mon, 14 May 2018 05:06:35 -0400 Received: from mga03.intel.com ([134.134.136.65]:19817 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305AbeENJDJ (ORCPT ); Mon, 14 May 2018 05:03:09 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 02:03:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="39701872" Received: from skx-d.bj.intel.com ([10.238.154.68]) by fmsmga008.fm.intel.com with ESMTP; 14 May 2018 02:03:04 -0700 From: Luwei Kang To: kvm@vger.kernel.org Cc: 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, Kan.liang@intel.com, Janakarajan.Natarajan@amd.com, dwmw@amazon.co.uk, linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, 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, Luwei Kang Subject: [PATCH v8 04/12] perf/x86/intel/pt: add new capability for Intel PT Date: Mon, 14 May 2018 18:57:04 +0800 Message-Id: <1526295432-20640-5-git-send-email-luwei.kang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1526295432-20640-1-git-send-email-luwei.kang@intel.com> References: <1526295432-20640-1-git-send-email-luwei.kang@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CPUID(EAX=14H,ECX=0):EBX[bit 3] = 1 indicates support of output to Trace Transport subsystem. MSR IA32_RTIT_CTL.FabricEn[bit 6] is reserved if CPUID.(EAX=14H, ECX=0):ECX[bit 3] = 0. This is use for emulate IA32_RTIT_CTL MSR read/write in KVM. KVM guest write IA32_RTIT_CTL will trap to root mode and a #GP would be injected to guest if set IA32_RTIT_CTL.FabricEn with CPUID.(EAX=14H, ECX=0):ECX[bit 3] = 0. Signed-off-by: Luwei Kang --- arch/x86/events/intel/pt.c | 1 + arch/x86/include/asm/intel_pt.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index c80e2f5..f65f97a 100644 --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c @@ -68,6 +68,7 @@ PT_CAP(topa_output, 0, CPUID_ECX, BIT(0)), PT_CAP(topa_multiple_entries, 0, CPUID_ECX, BIT(1)), PT_CAP(single_range_output, 0, CPUID_ECX, BIT(2)), + PT_CAP(output_subsys, 0, CPUID_ECX, BIT(3)), PT_CAP(payloads_lip, 0, CPUID_ECX, BIT(31)), PT_CAP(num_address_ranges, 1, CPUID_EAX, 0x3), PT_CAP(mtc_periods, 1, CPUID_EAX, 0xffff0000), diff --git a/arch/x86/include/asm/intel_pt.h b/arch/x86/include/asm/intel_pt.h index 4270421..2de4db0 100644 --- a/arch/x86/include/asm/intel_pt.h +++ b/arch/x86/include/asm/intel_pt.h @@ -16,6 +16,7 @@ enum pt_capabilities { PT_CAP_topa_output, PT_CAP_topa_multiple_entries, PT_CAP_single_range_output, + PT_CAP_output_subsys, PT_CAP_payloads_lip, PT_CAP_num_address_ranges, PT_CAP_mtc_periods, -- 1.8.3.1