Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1746557rwd; Sun, 28 May 2023 01:37:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VRuJBR4GNWH9iHv9hVyaHsBU4bhiKc+f+Sk5Kuk4bOQ2kCbf0GsrSt+3D7SRntMNpqTNP X-Received: by 2002:a05:6a20:d48d:b0:105:6d0e:c046 with SMTP id im13-20020a056a20d48d00b001056d0ec046mr5071466pzb.26.1685263071990; Sun, 28 May 2023 01:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685263071; cv=none; d=google.com; s=arc-20160816; b=nowwdu2adyx7EQwSuQX7Qxilu3uaYYlUGvOVhFmX57YK+Rqov3KJ7YsaJyr+xfUFfY NxOkGKaU8zgIF5lnuDus3n5f38z/6bLomMHtX8PNRCZpOY6bMxlWKMXJj4mf89JmMLYy cGdwWhndkLpgEIlSLOsvtMZntVLqEbzYfNnm0EnUhV55Ibu4MCR3DAlK/+R7zGAtVAd5 +Aw9voekUtjVRzhXyiAGWV6U/ahBi5Nw/zRNGcvIF1Lq5BLVhdnCTLdtjM59uK4LvR72 MoSGERuFc67Rp4VFB3HudccwPkHPthvcAPz8Mo5aSMdG9Xfk5ms2Zd826ERzcgKIPxnK MVwg== 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=N6+DTVV6loeaE15ramj1mf1WcHodhXhBfUTYWqPaF2Q=; b=fFTuDLp8WNVvbzg9uIWKLft7RYOSyW0hY6f3R2LMkwFPscmahKaWG2Balxp+dqN1JL 9npuRpnCPvb8L7kLyhOUWKGCq+KsUgRVNgCc8tGFZHmHnxIviVYRnCj/ESwal2IKrWvC ZXXhbWxX7rBsXDOwYDawJWhTRQCcfH8U29q8a/4tRWYkjdZIcC+RESYJAUDqmWnR1az/ vDBfYyMWV5H3+886XT53x97KFyMn3P/B2UAPyg1vURKhcox6yG+E0pdkBQPXmMM3mDya zIgFFXN1osVgYD3YXT5lNgTad5Y0ZGUjaVJb8RLBJ4wVlQllo41E0W6Vt+AHKarfWV7Q y3wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Zd+RzCVU; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t144-20020a635f96000000b0053f25281d11si7534943pgb.527.2023.05.28.01.37.38; Sun, 28 May 2023 01:37:51 -0700 (PDT) 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=20221208 header.b=Zd+RzCVU; 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 S229621AbjE1I0K (ORCPT + 99 others); Sun, 28 May 2023 04:26:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjE1I0J (ORCPT ); Sun, 28 May 2023 04:26:09 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71AF3DC; Sun, 28 May 2023 01:26:05 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-5144a9c11c7so2040510a12.2; Sun, 28 May 2023 01:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685262365; x=1687854365; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=N6+DTVV6loeaE15ramj1mf1WcHodhXhBfUTYWqPaF2Q=; b=Zd+RzCVUYoy0Vci8TjnR01H0gZ3uYqrknhR0CCz+8agwdl3C+LBAfzGgyd7I74IREf bWQaq6rKNMdEEJ2VBvtIn37hQ1JEhtfMIluw4PYAsvVcNHY0zXefKL5HZlZsIaTZIbQq xt5LLLT8qmwgJG4Ko/tj+nazSpF6KRrzPDoC2Irs9wGApwpbCn35kpbsXhiiaV0kmBgt U4soZyeIwwaOWXk+r8ozXs3K0w1V7y8vuqVdgGq4vmg9KoSQ29rTJosLICoIF/APp8vK Z+f66Wb9QfTikmWotezjnmhej8aopEyS8evxPmk29Z5gqb2ClVnM0bYM8YNZXDHU3rpN xeeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685262365; x=1687854365; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=N6+DTVV6loeaE15ramj1mf1WcHodhXhBfUTYWqPaF2Q=; b=TGjhwPhrCYZq8JUS+ILiEc/CbWcSt8Me4ur3PjIBfLg2yu9ndpEYeuKUhYxAu4SVzR KMvW/KnJ4hdDU4HkrPKnREtxIXDSRsMSfn38Gyz9gl7Vc+pX5AujNLP976c7VZc9V6/t 4V7I0j9LD/XJ23sOvxsK4ODKu6FS+AtnuGDmV1igb5sPI5w8aDJK0WffpLN9GvR4y7WB bFOywl6A0BY5A/Enbwjmj/gUn8LrfstL9wLhxqkEUFvtFey2BRg1u6t+FJhWe7oDhbzC /v8B292VhCmqpFQHiyxAfrmolJI2BydAFvH1Zamhvh9lkH0r+tTIHrd0jEulMRe6n73X Kc7w== X-Gm-Message-State: AC+VfDyL0GOsi9wwkVneT8oj/1qzoIMKe8ebDY3ofsU7WhlzkoOzoS/G GzTCesNjuGxQ99eKnMYyEWmo+yAA5Hg= X-Received: by 2002:a05:6a20:2591:b0:10b:e88f:5983 with SMTP id k17-20020a056a20259100b0010be88f5983mr5846674pzd.43.1685262364681; Sun, 28 May 2023 01:26:04 -0700 (PDT) Received: from localhost ([192.55.54.50]) by smtp.gmail.com with ESMTPSA id w13-20020a65534d000000b00476d1385265sm4619232pgr.25.2023.05.28.01.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 01:26:04 -0700 (PDT) Date: Sun, 28 May 2023 01:26:02 -0700 From: Isaku Yamahata To: Like Xu Cc: Zhi Wang , isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , David Matlack , Kai Huang Subject: Re: [PATCH v13 021/113] KVM: TDX: Make pmu_intel.c ignore guest TD case Message-ID: <20230528082602.GC1234772@ls.amr.corp.intel.com> References: <017a06174fa054ae264a2caba6f7f55e00f258e8.1678643052.git.isaku.yamahata@intel.com> <20230402115019.000046fd@gmail.com> <36fb638a-c9ff-0139-3e8e-7e8ff0bbff1f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <36fb638a-c9ff-0139-3e8e-7e8ff0bbff1f@gmail.com> 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,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 19, 2023 at 04:21:21PM +0800, Like Xu wrote: > On 2/4/2023 4:50 pm, Zhi Wang wrote: > > Hi Like: > > > > Would you mind to take a look on this patch? It would be nice to have > > a r-b also from you. :) > > > > On Sun, 12 Mar 2023 10:55:45 -0700 > > isaku.yamahata@intel.com wrote: > > > > > From: Isaku Yamahata > > > > > > Because TDX KVM doesn't support PMU yet (it's future work of TDX KVM > > > support as another patch series) and pmu_intel.c touches vmx specific > > It would be nice to have pmu support for tdx-guest from the very beginning. It's supported in the public github repo. https://github.com/intel/tdx/tree/kvm-upstream-workaround As this patch series has 100+ patches, I don't want to bloat this patch more. > If you guys are more open on the tdx development model, I'd like to help on > those features. This mainling list is the place. > > > structure in vcpu initialization, as workaround add dummy structure to > > > struct vcpu_tdx and pmu_intel.c can ignore TDX case. > > If the target is not to provide a workaround, how about other variants: > - struct lbr_desc lbr_desc; > - pebs ds_buffer; > ? > > We also need tdx selftest to verify the unavailability of these features. > Also, it would be great to have TDX's "System Profiling Mode" featue back in > the specification. I don't think it's productive. Once merging this patch series, we can move on to TDX PMU support (or whatever still missing feature) as second (or later) step. -- Isaku Yamahata