Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1263366ybt; Thu, 2 Jul 2020 00:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo1/ELDM3KSZah5/ToCO5bcVhvUeXO/R2OuXCxdqo8zO1MvbgeTh4ukRs3eaQdFodtzaNe X-Received: by 2002:a17:906:4356:: with SMTP id z22mr9445697ejm.414.1593675731515; Thu, 02 Jul 2020 00:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593675731; cv=none; d=google.com; s=arc-20160816; b=K54wgdUOP2prngFgo6M8PBV5bERRQxSwTjQftT0LVt+Kt0hrCLrxLXVLAc5+4i6FTJ 28sbO4jI0pF2i1wCxhlhXjDMhLrnJ1PNWBhyKwyGiRiEP1sNdwIdrFl/FFDk/NA6sWxK QJtTYAZe4KfhdJuZoN/zVtqy/JD3h8d6kYbcNXawMRs37ONkCJCMV2aFS+Ec6/0vFWcV wZ4TPP9hNOBDuKI2CcyFAgn/ZK6jLJV311PuZF3amhnkBON4b3QZgbIfbu4FXzvnkpxv wnU5ZcB2cNXj1WyXHgk0SfpoNbQPBJWYdC/zbAWNNMH4/CqHBRE8EY8TlIVLnrf3/0ih QeZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XTabvSLO7S5tELpoXrJiNFuMzsHwzZp5WpQClf4PKdk=; b=OQzdw5Vf7ojJUYZMmqAOQS76batsPk3+aUZ29/l26D5ye9VJ5+1dp8Lqyr3XbSQZPx NhfF55gtpcEspRMWz4HsWl+S54wh+pmP1MwOwAOrNwsxkf9c+8daSDu3fzo4L9YlZnM4 0boFDQjpwdJcCH2AXw1aRjwcdwlRJZeTq3/mJqLlYBvRQgB0uh4H4M1XDkNtCvljWBmJ WSd6fE/tmwfCgyEVyDo7Had0ATLGLYmla3OC8ngCHvklplX5kJ20yCZOjK9PgVS10JCJ HGrVw/X109j+rUvA60s59D+3TC5gqlrzgLyzT5UdEy0kbBEp/faKjm0/DNjRvWYgwj15 /MeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=sFgSl9Gc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb1si5270802ejb.565.2020.07.02.00.41.48; Thu, 02 Jul 2020 00:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=sFgSl9Gc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727906AbgGBHld (ORCPT + 99 others); Thu, 2 Jul 2020 03:41:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgGBHlc (ORCPT ); Thu, 2 Jul 2020 03:41:32 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3F09C08C5C1; Thu, 2 Jul 2020 00:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XTabvSLO7S5tELpoXrJiNFuMzsHwzZp5WpQClf4PKdk=; b=sFgSl9Gcs3uRIVF548A0umcLQi AYzzAb0cgK1h5LwXjvrGL5QlYbYgclSEKGtQ5tkEMf9oqwvekDTGpGihN6spqQLWxbkv/xGizG/Y9 WWbPTB0Iq57rX8tmEYegHLfU11KypvtrGRBwXATY74N33TY8slcS0ZuB3KmZzMu4Ec9XG7HKckpdu rOFuSDmVjg5Xrt7ubIC7FrM3G/SvlhhnOCBwz/THMKv05SdGA07BTmTeMHazs9aLXXO6tNurvl+DJ GRdsJmn5y8ZcZwdJsvQNTXJH4R1hW+S8N/7bfXH860MbylzsTrc9vCqhkRsCYb+e5JvsiNKhHQ/jH Z+kv+yYA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqtq9-0006AV-NN; Thu, 02 Jul 2020 07:41:04 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7240E3003D8; Thu, 2 Jul 2020 09:40:59 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 366CA23D44E56; Thu, 2 Jul 2020 09:40:59 +0200 (CEST) Date: Thu, 2 Jul 2020 09:40:59 +0200 From: Peter Zijlstra To: Like Xu Cc: Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , ak@linux.intel.com, wei.w.wang@intel.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "Liang, Kan" Subject: Re: [PATCH v12 00/11] Guest Last Branch Recording Enabling Message-ID: <20200702074059.GX4781@hirez.programming.kicks-ass.net> References: <20200613080958.132489-1-like.xu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200613080958.132489-1-like.xu@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 13, 2020 at 04:09:45PM +0800, Like Xu wrote: > Like Xu (10): > perf/x86/core: Refactor hw->idx checks and cleanup > perf/x86/lbr: Add interface to get LBR information > perf/x86: Add constraint to create guest LBR event without hw counter > perf/x86: Keep LBR records unchanged in host context for guest usage > Wei Wang (1): > perf/x86: Fix variable types for LBR registers > arch/x86/events/core.c | 26 +-- > arch/x86/events/intel/core.c | 109 ++++++++----- > arch/x86/events/intel/lbr.c | 51 +++++- > arch/x86/events/perf_event.h | 8 +- > arch/x86/include/asm/perf_event.h | 34 +++- These look good to me; but at the same time Kan is sending me Architectural LBR patches. Kan, if I take these perf patches and stick them in a tip/perf/vlbr topic branch, can you rebase the arch lbr stuff on top, or is there anything in the arch-lbr series that badly conflicts with this work? Paolo, would that topic branch work for you too, to then stick these patches in top? > KVM: vmx/pmu: Expose LBR to guest via MSR_IA32_PERF_CAPABILITIES > KVM: vmx/pmu: Unmask LBR fields in the MSR_IA32_DEBUGCTLMSR emualtion > KVM: vmx/pmu: Pass-through LBR msrs when guest LBR event is scheduled > KVM: vmx/pmu: Emulate legacy freezing LBRs on virtual PMI > KVM: vmx/pmu: Reduce the overhead of LBR pass-through or cancellation > KVM: vmx/pmu: Release guest LBR event via lazy release mechanism > arch/x86/kvm/pmu.c | 12 +- > arch/x86/kvm/pmu.h | 5 + > arch/x86/kvm/vmx/capabilities.h | 23 ++- > arch/x86/kvm/vmx/pmu_intel.c | 253 +++++++++++++++++++++++++++++- > arch/x86/kvm/vmx/vmx.c | 86 +++++++++- > arch/x86/kvm/vmx/vmx.h | 17 ++ > arch/x86/kvm/x86.c | 13 -- > 12 files changed, 559 insertions(+), 78 deletions(-)