Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2298286imj; Mon, 18 Feb 2019 03:39:20 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib0g3x+TdOjHWbT8kpU5mZrPoe7WqrHIMv4s7/Ph1h3iE4apOrR707hCJUC7mjUEcaBdoBB X-Received: by 2002:a62:9604:: with SMTP id c4mr23812203pfe.200.1550489960778; Mon, 18 Feb 2019 03:39:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550489960; cv=none; d=google.com; s=arc-20160816; b=ItilOx1Go05RGoE2Rvyfwim7GJE+8LsN/Wisgu+lyn7YSv7Ge++wYQW4hxNEyeajOc k96v20v+CtRg8dpHsGDoNCHECfcEWMOBp5//xvayVWa213oXBGETS6BQOi/OI3KLjyjJ 0sA3Ry88tZAEVVpjNIS2fbEOFr76SKK6OZtQMZxRx98GZP0A5QdPOqxAn/9GAxTTXKLi uThAfE1Ql0bBkFgCy2gl5mBVoguj65r/gLT/Miz4/QKGJMGOuXlOhX7TVTz2ZeGm2dsS 0QCLBI5qcgJddU1sQlV/czPzlC2hLwlL6C8irZDTZqVIr6cIFBp7nrylrO2EFkyftY5I Ft1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=p4TvCf1umtbcqvs7q75n4l9RwT6Fjzc7MeMJZCihc0g=; b=zo9DaznOTtyDHMy8Lv/ThMmexV0nZ3qNy5x9d/IU798P6k8ptXPjfHi76rPOSRiyK2 6zmPKche5+ujUS+/qhfR4QKPfaGn0yWtKew7G/6r8fhq0npo+GMhzItoP5ijJt0giAqG DIwLQUsUeGt8tp+Y23haluU4MfKACA/B+Bn/Hfyqfnpout1IIKeK9eC25XU+FkqA5WgC LjjPm1mSLrMcXC/Siq4zfFpfxuYJRGEVdNkXLs9+nkVN1i5ulWM7LMjThRqZ6ebqw4Zh ppwFeRAZ7UpFpqqKeEwUh/5mkCVTUSzZ/J9v0IbX3ubnxmPxqvtKWpdTO1TUInbuQhiB kmNA== 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 p9si12845587pfe.167.2019.02.18.03.39.05; Mon, 18 Feb 2019 03:39:20 -0800 (PST) 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 S1729411AbfBRL0s (ORCPT + 99 others); Mon, 18 Feb 2019 06:26:48 -0500 Received: from mga18.intel.com ([134.134.136.126]:35783 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727423AbfBRL0s (ORCPT ); Mon, 18 Feb 2019 06:26:48 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Feb 2019 03:26:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,384,1544515200"; d="scan'208";a="275885427" Received: from vmm.bj.intel.com ([10.240.192.123]) by orsmga004.jf.intel.com with ESMTP; 18 Feb 2019 03:26:43 -0800 From: Luwei Kang To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com, peterz@infradead.org, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, kan.liang@linux.intel.com, ak@linux.intel.com, konrad.wilk@oracle.com, Janakarajan.Natarajan@amd.com, mattst88@gmail.com, tim.c.chen@linux.intel.com, Luwei Kang Subject: [PATCH v2 0/2] Inject a PMI for KVM Guest when ToPA buffer is filled Date: Mon, 18 Feb 2019 19:26:06 -0500 Message-Id: <1550535968-7652-1-git-send-email-luwei.kang@intel.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Each intel processor trace table of physical addresses (ToPA) entry has an INT bit. If this bit is set, the processor will signal a performance-monitoring interrupt (PMI) when the corresponding trace output region is filled. This patch set will inject a PMI for Intel Processor Trace when ToPA buffer is filled. >From v1: - Exported a global function pointers may not a good chioce. Add a new member in kvm_guest_cbs to send Intel PT PMI for KVM guest. Luwei Kang (2): KVM: x86: Inject PMI for KVM guest KVM: x86: Add support of clear Trace_ToPA_PMI status arch/x86/events/intel/core.c | 6 +++++- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/msr-index.h | 8 ++++++++ arch/x86/kvm/vmx/pmu_intel.c | 8 +++++++- arch/x86/kvm/x86.c | 10 ++++++++++ include/linux/perf_event.h | 1 + 6 files changed, 32 insertions(+), 2 deletions(-) -- 1.8.3.1