From: Luwei Kang <luwei.kang@intel.com>
To: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
jolsa@redhat.com, namhyung@kernel.org, tglx@linutronix.de,
bp@alien8.de, hpa@zytor.com, pbonzini@redhat.com,
sean.j.christopherson@intel.com, vkuznets@redhat.com,
wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org,
pawan.kumar.gupta@linux.intel.com, ak@linux.intel.com,
thomas.lendacky@amd.com, fenghua.yu@intel.com,
kan.liang@linux.intel.com, Luwei Kang <luwei.kang@intel.com>
Subject: [PATCH v2 0/5] PEBS virtualization enabling via Intel PT
Date: Thu, 19 Mar 2020 22:33:45 +0800 [thread overview]
Message-ID: <1584628430-23220-1-git-send-email-luwei.kang@intel.com> (raw)
Intel new hardware(Atom processors based on the Tremont
microarchitecture) introduces some Processor Event-Based Sampling(PEBS)
extensions that output the PEBS record to Intel PT stream instead of DS
area. The PEBS record will be packaged in a specific format when
outputting to Intel PT.
This patch set will enable PEBS functionality in KVM Guest by PEBS output
to Intel PT, base on PEBS virtualization enabling via DS patch set[1].
Compared to the v1, the common code of PEBS virtualization enabling(PEBS
via DS and PEBS via Intel PT) has been moved to PEBS via DS patch set.
This patch set only includes the PEBS via PT specific changes.
Patch 1 is an extension to get fixed function counter by reload MSRs;
Patch 2,3 implement the CPUID and MSRs emulation;
Patch 4 will add the counter reload MSRs to MSR list during VM-entry/exit;
Patch 5 will swith the PEBS records to Intel PT buffer if PEBS via PT is
enabled in KVM guest.
[1]: https://lore.kernel.org/kvm/1583431025-19802-1-git-send-email-luwei.kang@intel.com/
Luwei Kang (5):
KVM: x86/pmu: Add base address parameter for get_fixed_pmc function
KVM: x86/pmu: Expose PDCM feature when PEBS output to PT
KVM: x86/pmu: PEBS output Intel PT MSRs emulation
KVM: x86/pmu: Add counter reload register to MSR list
KVM: VMX: Switch PEBS records output to Intel PT buffer
arch/x86/events/perf_event.h | 5 --
arch/x86/include/asm/kvm_host.h | 2 +
arch/x86/include/asm/msr-index.h | 6 +++
arch/x86/kvm/pmu.h | 6 +--
arch/x86/kvm/vmx/capabilities.h | 9 +++-
arch/x86/kvm/vmx/pmu_intel.c | 112 ++++++++++++++++++++++++++++++++++-----
arch/x86/kvm/vmx/vmx.c | 3 ++
arch/x86/kvm/vmx/vmx.h | 2 +-
arch/x86/kvm/x86.c | 32 +++++++++++
9 files changed, 154 insertions(+), 23 deletions(-)
--
1.8.3.1
next reply other threads:[~2020-03-19 6:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 14:33 Luwei Kang [this message]
2020-03-19 14:33 ` [PATCH v2 1/5] KVM: x86/pmu: Add base address parameter for get_fixed_pmc function Luwei Kang
2020-03-19 14:33 ` [PATCH v2 2/5] KVM: x86/pmu: Expose PDCM feature when PEBS output to PT Luwei Kang
2020-03-19 14:33 ` [PATCH v2 3/5] KVM: x86/pmu: PEBS output Intel PT MSRs emulation Luwei Kang
2020-03-19 14:33 ` [PATCH v2 4/5] KVM: x86/pmu: Add counter reload register to MSR list Luwei Kang
2020-03-19 14:33 ` [PATCH v2 5/5] KVM: VMX: Switch PEBS records output to Intel PT buffer Luwei Kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1584628430-23220-1-git-send-email-luwei.kang@intel.com \
--to=luwei.kang@intel.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=jolsa@redhat.com \
--cc=joro@8bytes.org \
--cc=kan.liang@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®