Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp297973pxb; Fri, 15 Jan 2021 03:39:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQ1qS9lWxZ8bhBtwhSWQtfZZKsoBr6orD4L/q3Kdceg8yzJYtzWABnsa3azmCXiB0Hek48 X-Received: by 2002:a17:906:1291:: with SMTP id k17mr8930461ejb.288.1610710760538; Fri, 15 Jan 2021 03:39:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610710760; cv=none; d=google.com; s=arc-20160816; b=ckIjl/SmACPEaU5/iMltRty2EmkV6FrlZRq63Dv0Ueit2iZohaIPOCB9xVD4B9xCQl NzBijZZXgWFD80HK4reurayTFwBSLOLPHrXa3UDi1o3XmtaYvtWE5qXLn8SMj8H9/JzC 2d3d+zmK1z8dKhKhCi3pfASOX5szC3EOIOrR8J6+dMydO7HEU5mThGHxkjRGoxVv0veg VWKE134WXki1UzHrfHEl+K9TGgNddA2hOwoPBPJtv7yq9Oaxi5YRFrAp7XAp2IRpE56+ 9p9PqR9oWiJgf+Bnof0FCQamCplsriPVcGOXDTE2BWWMfXycU45nVfPaGXqddkbshDx6 brdA== 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=n7b0j6ZnpjR0uvwKHqBC1yHKTSPAWtivnsJi023r8K0=; b=lXivp1kuVHrCHszCaqQpX8ObitF9qj1Yny42o9e6r9TkLmOTvuz+G8McQ8fUsENvcB 89s8V7oY1/SBnzew6cp0m738rR5PO7QG8YXWS1cxmnSowoPOsq5hSooHCYFUWGWDfIfW 0SQyHNtBva4AeghGHlX3xj8uWdsPTqsPXXglq7gIeVUpsTWgXnmkRl80B2PnZ7uhJJRs nRmZm5b6EI22h0fxmWDxfeWjYW990DI/6CYDngQajqOs+AylJOhG2Od9ziTYudW2qcR4 tqIglLTYA67wXlf64U9NMN656dqICWolSv5E4VGy03ELUY/RhLsgrRZyUmE9IjuClBAD qkzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qNRd6LPZ; 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 j15si4189352edv.474.2021.01.15.03.38.56; Fri, 15 Jan 2021 03:39:20 -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=qNRd6LPZ; 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 S1726137AbhAOLgj (ORCPT + 99 others); Fri, 15 Jan 2021 06:36:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbhAOLgi (ORCPT ); Fri, 15 Jan 2021 06:36:38 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 530B6C061757; Fri, 15 Jan 2021 03:35:58 -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=n7b0j6ZnpjR0uvwKHqBC1yHKTSPAWtivnsJi023r8K0=; b=qNRd6LPZfN2CdKG5QAOhJagyVF cPLXOcZm47U6c3wfPxXh9E9m5YyF9zFOHBHQgyrKXY/wc7YovPAXM0gKwIm/PHBjvQY3E2TdYaeKS Ep7ZBLzdqMIOZ+DbNOEceKeXj2A5cbL5fnxjtNCh9BWyQQSYyIiiI4aZ0KEEtKHk0zUbKycAYvNkw UV37TFJa/Mr/JAe6eKekEmRALKpWkPg8Dpcwh1gzbbFsSqsl6Jwuiz44luGK7pUzUquPKB8Riu1EW nTGKa8IgDVu3N/5xK9YgEsZe73OeIkiIRM6uUHb1GESY+AQorfEfm+TBtpRZEFBGCY1pD9Fbjshne rNHMPRww==; 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.94 #2 (Red Hat Linux)) id 1l0NMZ-008qrT-49; Fri, 15 Jan 2021 11:34:17 +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 E63A0301324; Fri, 15 Jan 2021 12:33:46 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CA6622C9CD1CD; Fri, 15 Jan 2021 12:33:46 +0100 (CET) Date: Fri, 15 Jan 2021 12:33:46 +0100 From: Peter Zijlstra To: Like Xu Cc: Paolo Bonzini , eranian@google.com, kvm@vger.kernel.org, Ingo Molnar , Sean Christopherson , Thomas Gleixner , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Andi Kleen , Kan Liang , wei.w.wang@intel.com, luwei.kang@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 05/17] KVM: x86/pmu: Reprogram guest PEBS event to emulate guest PEBS counter Message-ID: References: <20210104131542.495413-1-like.xu@linux.intel.com> <20210104131542.495413-6-like.xu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210104131542.495413-6-like.xu@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 04, 2021 at 09:15:30PM +0800, Like Xu wrote: > When a guest counter is configured as a PEBS counter through > IA32_PEBS_ENABLE, a guest PEBS event will be reprogrammed by > configuring a non-zero precision level in the perf_event_attr. > > The guest PEBS overflow PMI bit would be set in the guest > GLOBAL_STATUS MSR when PEBS facility generates a PEBS > overflow PMI based on guest IA32_DS_AREA MSR. > > The attr.precise_ip would be adjusted to a special precision > level when the new PEBS-PDIR feature is supported later which > would affect the host counters scheduling. This seems like a random collection of changes, all required, but loosely related. > The guest PEBS event would not be reused for non-PEBS > guest event even with the same guest counter index. /me rolls eyes at the whole destroy+create nonsense...