Message ID | 20221109082802.27543-1-likexu@tencent.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp216558wru; Wed, 9 Nov 2022 00:30:58 -0800 (PST) X-Google-Smtp-Source: AMsMyM5GJoKENxQcMpE5iuafB5Tw6Rp8IPrLdLlFSHU9wyZs/PfQyMGfCxeOcBXMcsFooMLKbqj1 X-Received: by 2002:a05:6a00:1702:b0:56d:7145:dff2 with SMTP id h2-20020a056a00170200b0056d7145dff2mr51414527pfc.34.1667982658201; Wed, 09 Nov 2022 00:30:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667982658; cv=none; d=google.com; s=arc-20160816; b=gUtVq5ZGElPAa+1BkVQWc6ixX8LWWacitTSWcVJAOF8Rhi0dLMp3lHYyWDDsOrwCq2 UumiySK91wM1Wy5UupQeyEXqWndyqyJesQv101/YAzhAf25hhm0V763ad/Q82f5HwSLb Q0rlCbqIeYAb3e7Z4lqpRy1q3I/R4Wl4yb/K1QcRkkD+JSqmAaTFz7v2vb38nE1kIPQq fbJaK3MYiNLyiT8yPLd43BEPkMuQgivQ+zfKvd1+G8IMiVqitKU+86wnzL2GXAuoheUs MCaTf1qnREGOXzKivAxKku7leCvO0CBlZthL8CjLxa6fgyn1dNZqftjeug3ciVnlEXOc uKxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=78wOAFoq040DHfWfXhuh/eRfSwCY7cV0LLdcrbr5FpQ=; b=I5Njd+ZM0M34mkQl/N4TZSnlt0qEMpv9C0OFjeGV3n7t6ireTGGgNgm7efYcHg5C2E 8TFSEPrHMFSUU97S/z6Kpltc9GWSmVlzf9nBuwGeQy0nbsJbnhefs30K4xgbtoFPw5V2 cSUDNq76miuEu7lw+rJiaydvqKmQ3upX4omdX9RCv32XTjSmhsMqHxqWR0h4M2MIHPkY SwUKVRdidssjLy05GzYZBoM7Q4va1sea0gYLGHssn8IeF/tpQO4OtLGdh4SZfoNdk/i6 P8clSbg+vuHcu3Cu6s6Xii0bHFZcj4umxGXyFg97+Yc/v0r7GQc6aodl3sP5J2LJ9NmN bGAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m96a2T6T; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a056a00084200b0056e3400fddfsi18411177pfk.195.2022.11.09.00.30.45; Wed, 09 Nov 2022 00:30:58 -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=@gmail.com header.s=20210112 header.b=m96a2T6T; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiKII2x (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 9 Nov 2022 03:28:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230014AbiKII23 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Nov 2022 03:28:29 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66CD1EAF7; Wed, 9 Nov 2022 00:28:21 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id g24so16453702plq.3; Wed, 09 Nov 2022 00:28:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=78wOAFoq040DHfWfXhuh/eRfSwCY7cV0LLdcrbr5FpQ=; b=m96a2T6TKlcIdHb8fBTDV8Ljo0gCAxle4TIb+xgJhjUtNsnipBU161Rvd5qfngeEL3 7VnhjOOY6oS08a7qcBDvzu81yJ2FstGiSfAGo0Vd8TpzAnGjrQFxKCmSnlrR78KbPHI1 wOV+3PAx512qGAI7bGyQ3icOrZeDTJwKJquUReuB3ELj0Rb3LDW84+KlESwZ9CMR9nhu XIifOILTrYemXJSzkpKpVtuZi7ZUO52upwmWZZZVxJc4m2wVDL1nPc6wHIIJz+/x/Rvo 5bzrqgL6cvUYMdL94X/DLFIobtaa/MQvcXTNqqvAu4X+za0B12bHzjeHk4xlfue/EVkC hduw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=78wOAFoq040DHfWfXhuh/eRfSwCY7cV0LLdcrbr5FpQ=; b=yy6QrD+5ZH1Sb+m88OdW6MAgRrxaslRyowE1nTjsrO+pi0EM8DEFyiaLx5OQTA+Kfn NVJU+hOlAeDcq1Kmw9Gq95FYUEO/QbqtiOIbbWeh92VDw5u0dqm7UWawSzDD1gbrK0qx Zu7cSIRMNywo1zaHsB+t3MpbU4U0Gfg5X4D9VfkwZcODm1pz+WDdHVws+oTz1Yc6TSJm xfrHqR5YXSgX5ypBns1GvW9EZtrRsUQJ8biH9vyr5uU/Wyma4nKtOCWdJuN7oEW19E+S aU6I3JQ/FXhpHuEZxZ/IAArlgYLETwr2o3uFmFnlBGcib6Jj1Iv3Xe94El/wa8PKqnM7 b2Dw== X-Gm-Message-State: ACrzQf3NqnrwrSM3a//L2KedvkWQpU/SFYaxdKFYHHkKGRRdBB9CwYKK y5ffIBWDlDB6HfRVSazgRuE= X-Received: by 2002:a17:903:289:b0:186:a8a8:e99a with SMTP id j9-20020a170903028900b00186a8a8e99amr59617639plr.104.1667982501170; Wed, 09 Nov 2022 00:28:21 -0800 (PST) Received: from localhost.localdomain ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id b14-20020a63d30e000000b00470537b9b0asm6587700pgg.51.2022.11.09.00.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 00:28:20 -0800 (PST) From: Like Xu <like.xu.linux@gmail.com> X-Google-Original-From: Like Xu <likexu@tencent.com> To: Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH v3 0/3] KVM: x86/pmu: Enable guest PEBS for SPR and later models Date: Wed, 9 Nov 2022 16:27:59 +0800 Message-Id: <20221109082802.27543-1-likexu@tencent.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749006583838607476?= X-GMAIL-MSGID: =?utf-8?q?1749006583838607476?= |
Series |
KVM: x86/pmu: Enable guest PEBS for SPR and later models
|
|
Message
Like Xu
Nov. 9, 2022, 8:27 a.m. UTC
Hi, Finally, SPR will go live in early 2023. Virtualization support for SPR PEBS (kvm.x86.vpmu.pebs_ept) has officially available in the Intel SDM (June 2022), and this patch set is validated on a late stepping machine. Let's see if this new revision will satisfy everyone's appetite. Previous: https://lore.kernel.org/kvm/20220922051929.89484-1-likexu@tencent.com/ V2 -> V3 Changelog: - Add more commit message about the pdit/pdir stuff; (Sean) - Refine confusing comments on event precise level and TNT+; (Sean) - Use pmc_get_pebs_precise_level() instead of need_max_precise(); (Sean) - Move HYBRID_CPU change in a separate patch; (Sean) - Land KVM changes before perf core changes; (Sean) - Aalign code indentation; (Sean) // VScode is quite good for kernel dev. Like Xu (3): KVM: x86/pmu: Disable guest PEBS on hybird cpu due to heterogeneity KVM: x86/pmu: Add PRIR++ and PDist support for SPR and later models perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models arch/x86/events/intel/core.c | 1 + arch/x86/events/intel/ds.c | 4 ++- arch/x86/kvm/pmu.c | 45 ++++++++++++++++++++++++--------- arch/x86/kvm/vmx/capabilities.h | 4 ++- 4 files changed, 40 insertions(+), 14 deletions(-)
Comments
On Wed, 09 Nov 2022 16:27:59 +0800, Like Xu wrote: > Finally, SPR will go live in early 2023. Virtualization support for SPR > PEBS (kvm.x86.vpmu.pebs_ept) has officially available in the Intel SDM > (June 2022), and this patch set is validated on a late stepping machine. > > Let's see if this new revision will satisfy everyone's appetite. > > Previous: > https://lore.kernel.org/kvm/20220922051929.89484-1-likexu@tencent.com/ > V2 -> V3 Changelog: > - Add more commit message about the pdit/pdir stuff; (Sean) > - Refine confusing comments on event precise level and TNT+; (Sean) > - Use pmc_get_pebs_precise_level() instead of need_max_precise(); (Sean) > - Move HYBRID_CPU change in a separate patch; (Sean) > - Land KVM changes before perf core changes; (Sean) > - Aalign code indentation; (Sean) // VScode is quite good for kernel dev. > > [...] Applied 2-3 to kvm-x86 pmu. I want to get Paolo's input before proceeding on the whole "disable vPMU for Hybrid PMUs" snafu. IIUC, applying these patches won't make the situation worse, please holler if that's incorrect. Thanks! [2/3] KVM: x86/pmu: Add PRIR++ and PDist support for SPR and later models https://github.com/kvm-x86/linux/commit/974850be0125 [3/3] perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models https://github.com/kvm-x86/linux/commit/13738a364736 -- https://github.com/kvm-x86/linux/tree/next https://github.com/kvm-x86/linux/tree/fixes