RE: [PATCH v1 0/4] Enable PEBS when only have PEBS via PT w/o DS

From: Kang, Luwei
Date: Sun Nov 17 2019 - 06:51:54 EST




> -----Original Message-----
> From: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
> Sent: Friday, November 15, 2019 4:38 PM
> To: Kang, Luwei <luwei.kang@xxxxxxxxx>; kvm-pmu@xxxxxxxxxxxxxxxxx
> Cc: ak@xxxxxxxxxxxxxxx; kan.liang@xxxxxxxxxxxxxxx; Kang, Luwei <luwei.kang@xxxxxxxxx>; peterz@xxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; alexander.shishkin@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v1 0/4] Enable PEBS when only have PEBS via PT w/o DS
>
> You forgot to CC Peter and LKML.
>
> Luwei Kang <luwei.kang@xxxxxxxxx> writes:
>
> > This patchset is purely perf event system changes that to enable the
> > PEBS when the system only supports PEBS via Intel PT w/o DS.
> > Currently, there don't have such hardware which only supports PEBS via
> > PT w/o DS but it is possible in KVM guest. In Tremont Atom platforms,
> > PEBS via PT is the only way to enabled PEBS in KVM guest.
>
> I don't understand what this says. If PEBS-via-PT is available and DS is not available, what happens and why?

This is an internal review before sending it to community.
In current software implementation, PEBS depends on the HW support of DS feature even if we have PEBS via PT( e.g. in intel_ds_init() function). This patchset just removes the dependency of PEBS and DS because there have a new path PEBS via Intel PT. I think there don't have any problem in host, but PEBS may not work in KVM guest when only have PEBS via PT w/o DS.

Thanks,
Luwei Kang

>
> Regards,
> --
> Alex