lkml.org 
[lkml]   [2020]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v1 01/11] perf/x86/core: Support KVM to assign a dedicated counter for guest PEBS
    On Fri, Mar 06, 2020 at 01:56:55AM +0800, Luwei Kang wrote:
    > From: Kan Liang <kan.liang@linux.intel.com>
    >
    > The PEBS event created by host needs to be assigned specific counters
    > requested by the guest, which means the guest and host counter indexes
    > have to be the same or fail to create. This is needed because PEBS leaks
    > counter indexes into the guest. Otherwise, the guest driver will be
    > confused by the counter indexes in the status field of the PEBS record.
    >
    > A guest_dedicated_idx field is added to indicate the counter index
    > specifically requested by KVM. The dedicated event constraints would
    > constrain the counter in the host to the same numbered counter in guest.
    >
    > A intel_ctrl_guest_dedicated_mask field is added to indicate the enabled
    > counters for guest PEBS events. The IA32_PEBS_ENABLE MSR will be switched
    > during the VMX transitions if intel_ctrl_guest_owned is set.
    >

    > + /* the guest specified counter index of KVM owned event, e.g PEBS */
    > + int guest_dedicated_idx;

    We've always objected to guest 'owned' counters, they destroy scheduling
    freedom. Why are you expecting that to be any different this time?

    \
     
     \ /
      Last update: 2020-03-06 14:54    [W:4.208 / U:0.332 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site