Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4071695pxb; Tue, 10 Nov 2020 07:18:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFPzUBfwAwcbpGd4TWEU2IODhiJ3jMQb5ESblPYRfekJk1/ii5XTM/jOjrxXqPgXJCRYCG X-Received: by 2002:a17:906:60c8:: with SMTP id f8mr21323647ejk.14.1605021491294; Tue, 10 Nov 2020 07:18:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605021491; cv=none; d=google.com; s=arc-20160816; b=VE91USeZzR54XWVk36/t0JoyMUVAB7zX5By3/jiBFtjUNQCFAoYOlO6FNS+R13m41d O4MiWZAoSxbI5svGlZdCrSXvvp4Yk1JQdsHZe/scHoLjnf0g1Ipfo0vO4Ep3LDu1KwTx Qnr4kZLkUlJsunVHRTpOkgQ+f9opsMU7SzZS4xB+7yTALoE5IMaKUejGckiV/d9zZZDI Slw/xeAnbbveXXpc0ZgP3X4bhOCOLolcMj/2JNRULdBrpCt27bU7ifwvMCzkWjKVYS/b vK6Tfp/EvuWEu/rEMyAUEiLIJnkbWjqqJJ1y3XQawn+cq8M749EQgKA9R6W+/n+EpXqR UwvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yfbAAv9z74vMPfwpK6dKFLRG/wgLDIDQH7gNqCp74iM=; b=lJyrJf/QhKPDYUjP1Vf4/BVG68r4qVXrC6IaDG3KvV6CTZovpe7VdnuX/SgZknAJQU ADa7cU9dy2h4ec5O4tqppbSbnfC2+PfOI9EkBxq6UpQVA6cQwmjdsX3wjgjan65WMQkx b830Vliq62Qg46GkwqGwbs5ml/Dv39+hRWXd3kNKPglUgUTOk8q/b8rOdqvsiX35EjJJ r5wXJteurOHAPOejR2sSVMPEE1xWs4HmtlmXsZQtj/KBTFFN0qj5ijnjgEAS5NZS7mZd dNwwBNTe/JQy5kahgUEgoDlort/uF/+MYbZy0H1HTC1lzW4pYgTDUZiPJPA3HF6sY01q /8Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="X/P7RGRF"; 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 s19si9798711edx.88.2020.11.10.07.17.47; Tue, 10 Nov 2020 07:18:11 -0800 (PST) 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=pass header.i=@infradead.org header.s=casper.20170209 header.b="X/P7RGRF"; 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 S1732405AbgKJPNe (ORCPT + 99 others); Tue, 10 Nov 2020 10:13:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730981AbgKJPNe (ORCPT ); Tue, 10 Nov 2020 10:13:34 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04B16C0613CF; Tue, 10 Nov 2020 07:13:34 -0800 (PST) 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=yfbAAv9z74vMPfwpK6dKFLRG/wgLDIDQH7gNqCp74iM=; b=X/P7RGRFOzuHDkfSWhHrq0oxGU a4SpAv+nTkiRzo1hMZ6JbF/TxR0o3K7jPnjwja3ywnq25LMYqArUclBG/EjYHBlIMfc6oGtg3Wbwk G6Ul3i3sNWw7cyTNjE86U3KtFq0FLG3FulaFLveDm8rgk/kka2L/zXCgmpa7H46K/FYHwu8XcAywp /FYsD0RUE/NuD+DxxfzdrzaWkm1dWexiGL3YQ/vEGF4nI9+c+4BzyoBd8aJcp1ClrwHPPaOPyplL9 z2CxWO2G8ZzL1ZBoijg3CPMH0yZs5yIAzSZ/pZXBFaNkneeYl0XqnrR50NOLmRQwE8iCr/IRbSwwJ venWvckA==; 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 1kcVKO-0006L3-9E; Tue, 10 Nov 2020 15:13:00 +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 32FC5301E02; Tue, 10 Nov 2020 16:12:57 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 19AE920289CB5; Tue, 10 Nov 2020 16:12:57 +0100 (CET) Date: Tue, 10 Nov 2020 16:12:57 +0100 From: Peter Zijlstra To: Like Xu Cc: Paolo Bonzini , kvm@vger.kernel.org, Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Kan Liang , luwei.kang@intel.com, Thomas Gleixner , wei.w.wang@intel.com, Tony Luck , Stephane Eranian , Mark Gross , Srinivas Pandruvada , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC v2 00/17] KVM: x86/pmu: Add support to enable Guest PEBS via DS Message-ID: <20201110151257.GP2611@hirez.programming.kicks-ass.net> References: <20201109021254.79755-1-like.xu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201109021254.79755-1-like.xu@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 09, 2020 at 10:12:37AM +0800, Like Xu wrote: > The Precise Event Based Sampling(PEBS) supported on Intel Ice Lake server > platforms can provide an architectural state of the instruction executed > after the instruction that caused the event. This patch set enables the > the PEBS via DS feature for KVM (also non) Linux guest on the Ice Lake. > The Linux guest can use PEBS feature like native: > > # perf record -e instructions:ppp ./br_instr a > # perf record -c 100000 -e instructions:pp ./br_instr a > > If the counter_freezing is not enabled on the host, the guest PEBS will > be disabled on purpose when host is using PEBS facility. By default, > KVM disables the co-existence of guest PEBS and host PEBS. Uuhh, what?!? counter_freezing should never be enabled, its broken. Let me go delete all that code.