kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Like Xu <like.xu@linux.intel.com>
To: "Liuxiangdong (Aven,
	Cloud Infrastructure Service Product Dept.)" 
	<liuxiangdong5@huawei.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Xiexiangyou <xiexiangyou@huawei.com>,
	"Fangyi (Eric)" <eric.fangyi@huawei.com>,
	kvm <kvm@vger.kernel.org>, Wei Wang <wei.w.wang@intel.com>
Subject: Re: [PATCH v3 00/17] KVM: x86/pmu: Add support to enable Guest PEBS via DS
Date: Mon, 25 Jan 2021 10:41:06 +0800	[thread overview]
Message-ID: <584b4e9a-37e7-1f2a-0a67-42034329a9dc@linux.intel.com> (raw)
In-Reply-To: <EEC2A80E7137D84ABF791B01D40FA9A601EC200E@DGGEMM506-MBX.china.huawei.com>

+ kvm@vger.kernel.org

Hi Liuxiangdong,

On 2021/1/22 18:02, Liuxiangdong (Aven, Cloud Infrastructure Service 
Product Dept.) wrote:
> Hi Like,
> 
> Some questions about 
> https://lore.kernel.org/kvm/20210104131542.495413-1-like.xu@linux.intel.com/ <https://lore.kernel.org/kvm/20210104131542.495413-1-like.xu@linux.intel.com/>

Thanks for trying the PEBS feature in the guest,
and I assume you have correctly applied the QEMU patches for guest PEBS.

> 
> 1)Test in IceLake

In the [PATCH v3 10/17] KVM: x86/pmu: Expose CPUIDs feature bits PDCM, DS, 
DTES64, we only support Ice Lake with the following x86_model(s):

#define INTEL_FAM6_ICELAKE_X		0x6A
#define INTEL_FAM6_ICELAKE_D		0x6C

you can check the eax output of "cpuid -l 1 -1 -r",
for example "0x000606a4" meets this requirement.

> 
> HOST:
> 
> CPU family:                      6
> 
> Model:                           106
> 
> Model name:                      Intel(R) Xeon(R) Platinum 8378A CPU $@ $@
> 
> microcode: sig=0x606a6, pf=0x1, revision=0xd000122

As long as you get the latest BIOS from the provider,
you may check 'cat /proc/cpuinfo | grep code | uniq' with the latest one.

> 
> Guest:  linux kernel 5.11.0-rc2

I assume it's the "upstream tag v5.11-rc2" which is fine.

> 
> We can find pebs/intel_pt flag in guest cpuinfo, but there still exists 
> error when we use perf

Just a note, intel_pt and pebs are two features and we can write
pebs records to intel_pt buffer with extra hardware support.
(by default, pebs records are written to the pebs buffer)

You may check the output of "dmesg | grep PEBS" in the guest
to see if the guest PEBS cpuinfo is exposed and use "perf record
–e cycles:pp" to see if PEBS feature actually  works in the guest.

> 
> # perf record –e cycles:pp
> 
> Error:
> 
> cycles:pp: PMU Hardware doesn’t support sampling/overflow-interrupts. Try 
> ‘perf stat’
> 
> Could you give some advice?

If you have more specific comments or any concerns, just let me know.

> 
> 2)Test in Skylake
> 
> HOST:
> 
> CPU family:                      6
> 
> Model:                           85
> 
> Model name:                      Intel(R) Xeon(R) Gold 6146 CPU @
> 
>                                    3.20GHz
> 
> microcode        : 0x2000064
> 
> Guest: linux 4.18
> 
> we cannot find intel_pt flag in guest cpuinfo because 
> cpu_has_vmx_intel_pt() return false.

You may check vmx_pebs_supported().

> 
> SECONDARY_EXEC_PT_USE_GPA/VM_EXIT_CLEAR_IA32_RTIT_CTL/VM_ENTRY_LOAD_IA32_RTIT_CTL 
> are both disable.
> 
> Is it because microcode is not supported?
> 
> And, isthere a new macrocode which can support these bits? How can we get this?

Currently, this patch set doesn't support guest PEBS on the Skylake
platforms, and if we choose to support it, we will let you know.

---
thx,likexu

> 
> Thanks,
> 
> Liuxiangdong
> 


       reply	other threads:[~2021-01-25  2:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EEC2A80E7137D84ABF791B01D40FA9A601EC200E@DGGEMM506-MBX.china.huawei.com>
2021-01-25  2:41 ` Like Xu [this message]
2021-01-25 14:47   ` Liuxiangdong (Aven, Cloud Infrastructure Service Product Dept.)
2021-01-26  7:08     ` Xu, Like
2021-01-29  2:52       ` Liuxiangdong (Aven, Cloud Infrastructure Service Product Dept.)
2021-02-01  8:43         ` Xu, Like
2021-01-04 13:15 Like Xu
2021-01-14 19:10 ` Sean Christopherson
2021-01-15  2:02   ` Xu, Like
2021-01-15 17:57     ` Sean Christopherson
2021-01-15 18:27       ` Andi Kleen
2021-01-15 18:51         ` Sean Christopherson
2021-01-15 19:11           ` Andi Kleen
2021-01-22  9:56           ` Peter Zijlstra
2021-01-25  8:08             ` Like Xu
2021-01-25 11:13               ` Peter Zijlstra
2021-01-25 12:07                 ` Xu, Like
2021-01-25 12:18                   ` Peter Zijlstra
2021-01-25 12:53                     ` Xu, Like

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=584b4e9a-37e7-1f2a-0a67-42034329a9dc@linux.intel.com \
    --to=like.xu@linux.intel.com \
    --cc=eric.fangyi@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuxiangdong5@huawei.com \
    --cc=wei.w.wang@intel.com \
    --cc=xiexiangyou@huawei.com \
    --subject='Re: [PATCH v3 00/17] KVM: x86/pmu: Add support to enable Guest PEBS via DS' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox