Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5487811pxb; Mon, 7 Feb 2022 03:14:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzumiVJripaLZNNjN5ijoRCEjZZkubOMr7DJaX0dVyWDWz/Ee8A9JBQlAF2BFUcgFFgBV1s X-Received: by 2002:a05:6402:2802:: with SMTP id h2mr13235753ede.255.1644232459321; Mon, 07 Feb 2022 03:14:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644232459; cv=none; d=google.com; s=arc-20160816; b=pQYGFTbRra7DtVa4XuRFIzdoYvkmXuwWFoNt3VSwdqHlmIU4q6pQFPDP5KtFfz7wMz uMyqo7QnCyvtDJo+yL88vsUMd8VxA1r6B+djwGFQjQmn/FhkdObsBH0lgp9CaYe7RFsY V3e5D9/AyM+9BW1MZEXoLuM3pQXuSerjRBwEY/lEbxbCHvgdeRJZ/YyThsXfHFUGy6eB irL/71Ak2au9QKbh8FICSL2DwhwdYUlU9FQKA9TIkN6h2scZkBn9WqrwR83x5wczqLLa UkTdRfTUT8UZRDH1Nxjzb38lFQJjN4uOkBI4VMra2VhpM2Yhhlmk2Oa4h07VDIkKxmF6 888A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=c53te4gb4gbQ2BA9zEe7ibUShf/XoqZxMo0RjmKCsS4=; b=gGkHObqB5BKsgd7fR4pUN5q8wYX5SNg+AzePYS2MtReZekeoEHf1+sWZ2T3Byg8hHE KeHfpytQrIYFvV7/SSWBwVmOnmYaroxjjjZ4G7bFpi0gMUEt8P6yMiDlSSaSC1/kNutS B0DHuy4G1RLyxXkcrvtr/LWUme7Nc1lXBZGLse5Qb37lm0M82qL7pdsRqw8aZ7rGVjOv kl+YRhy+WG1K0hW4GLHTMxUldQXYxT0PvAiGSbSOWJUoTSfe3Ausgi6OjL7OS9mn2aEr dJ4hiD9JzKNhOGXQMehf/jghhxsObly7nXF+LbIX+jK/3BZImBSX3CRQtGSHqt40O2WO 29cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="PR/a8+x7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o21si8247405edc.574.2022.02.07.03.13.55; Mon, 07 Feb 2022 03:14:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="PR/a8+x7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352887AbiBCReF (ORCPT + 99 others); Thu, 3 Feb 2022 12:34:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240552AbiBCReD (ORCPT ); Thu, 3 Feb 2022 12:34:03 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9375FC061714 for ; Thu, 3 Feb 2022 09:34:02 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id m14so6386426wrg.12 for ; Thu, 03 Feb 2022 09:34:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c53te4gb4gbQ2BA9zEe7ibUShf/XoqZxMo0RjmKCsS4=; b=PR/a8+x78qbvbyaHDAU3p5hE/7/RoI+gQzvv1o2U09FLV+kWLGCNNZ2fVy4y4j+qnX Q+y8lLK3rZxA3bMRX+y/XjfwazG4/ulNOMg/rZqoNRJV2UAfn7K1skGS4YVhXrIaBUdJ zaCBmsbQARI910hgblR2GJkNV6y/yimrKnjp+pAZuzkXx9J9JsF15eFxGjzIHvSJ5k4G WZ9U2Hhtvz7mgodvtg1ir5vdp7jt7pinWUDqN+RpCiaKCwMSVjqIBYLUKXK4r+KXKoFB 8enYxo0LoQr+p3anbqvtABuh9EydkrwzM/lB6fuwd326H3xgiaKnTfomOAdYrUI6OK5q jaAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c53te4gb4gbQ2BA9zEe7ibUShf/XoqZxMo0RjmKCsS4=; b=oor8LXIhf4eZQqHte1i9max34iCiSyJwU0vlArNkcUyML2RmLkhETetLp5pUT0Zhc2 zR4Fh/jzsbifDXzzUiUpiWRe9sKhTKc6A0amEXhtJCFKUV3zA65vqYfhDDlxdnedo9N5 YYT/yTL/GkMmJ7rE1XFJtrDxaKgAlNlkafTLxotzZIP42/qz5blR2J+9KhPQDf04YBQr U2U+UPIN1BXoL7m/GuYk8Kj5PYpQkVNn86EaprirLqnnh38o6D5CIbrFM7gx6+Ii2v8A H7anc313lUD/mySKPboYx+l6Db52ZC1SHePgEk+rZKSTn2RsLSSHzm7nx9mw/444Ir+H Yaaw== X-Gm-Message-State: AOAM531+rN/GC5gjcIanFVh1mP6YBjsvJhQA1Wm3uH0yE5mteNZtngq9 v0VHFgy522mGk295ErvE0XGtUFKYrc+IhP6vuU5h2Q== X-Received: by 2002:a5d:550f:: with SMTP id b15mr19836625wrv.384.1643909641056; Thu, 03 Feb 2022 09:34:01 -0800 (PST) MIME-Version: 1.0 References: <20220117085307.93030-1-likexu@tencent.com> <20220117085307.93030-3-likexu@tencent.com> <20220202144308.GB20638@worktop.programming.kicks-ass.net> In-Reply-To: From: David Dunn Date: Thu, 3 Feb 2022 09:33:49 -0800 Message-ID: Subject: Re: [PATCH kvm/queue v2 2/3] perf: x86/core: Add interface to query perfmon_event_map[] directly To: Jim Mattson Cc: Peter Zijlstra , Like Xu , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Like Xu , Stephane Eranian Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jim, I agree. It seems inevitable that the demands on the vPMU will continue to grow. On the current path, we will keep adding complexity to perf until it essentially has a raw MSR interface used by KVM. Your proposal gives a clean separation where KVM notifies perf when the PMC will stop counting. That handles both vPMU and TDX. And it allows KVM to provide the full expressiveness to guests. Dave Dunn On Wed, Feb 2, 2022 at 2:35 PM Jim Mattson wrote: > Given what's coming with TDX, I wonder if we should just bite the > bullet and cede the PMU to the guest while it's running, even for > non-TDX guests. That would solve (1) and (2) as well.