Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1027360iob; Thu, 12 May 2022 09:32:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxw4ZfI3IcUdYwZDRmYxPCg+7Q88yTwEzxB/m0hYhV8IoqZot58JJkurX3celtcoRGifbnj X-Received: by 2002:a17:907:d16:b0:6f8:c054:29ac with SMTP id gn22-20020a1709070d1600b006f8c05429acmr692742ejc.96.1652373123665; Thu, 12 May 2022 09:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652373123; cv=none; d=google.com; s=arc-20160816; b=TCtyUUUGRpvk56/J6jvHdAA88SzV+ZMrPH2g73GbC9NQ0vhbFWiVX42jUluMbZH5Bk FmWWZLA95jF+3Pyog7VvagS0++uE/tP1t8UI+m8GQw79DAg1PDfcNY8GGno44uL4hPfO pTs09jYoZheK7OKeViIMU0FyVJ4AmSFtvzFLGm9yo0QQ9a6ncNIt9Xg824dgaL9pq4JL aYpxXDb9uM8pYK1CmkjmyW3L4VtNX1Zc84nWxOVdcDYdyYWKs06EmxOsXyLX4QWkP215 mnu8c5KoATlLvDCktppYyyOnVfDSflw1pXr7TAuywrknZ1CVxuLgRIJ1zqXSI1VzM4wM NerQ== 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=W61e8Beb9C0rrwvWLXvghQlyTT+OB/E10KtzePQGPL4=; b=At5XRrYortt0CMDGx2/9nWMX4JFODTR6ciPCNzGHwCzM26bB0pdjEK2cxgXXn5LMlr E754KMMd7Jj4z02rsehfMK8ewdQMD/FI2jLTrph/KBrdGnbFt73tKqQ4wjTXIqElGb6I 9TwJ+KAsawxLc/ChfonCdyxut9+rbV2NQQvO9IAbPcJ+nuWlcTlqcIsbuc5fzKvnsGal OFwUozy+8J/nmP37EmEO3yqkeKecG5JeO4OwLDQO2MWe3QxM84t9lFktqeK7RrhoC0P0 3mCFZWG25vC7tg3hRBRuIPHB0Z7i7undRgi57E/NkpL/6Rodjgi0MoRLrs7abrtB9YcB ILdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qC9ruXYK; 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 hp19-20020a1709073e1300b006f488ae9ee3si5990545ejc.6.2022.05.12.09.31.36; Thu, 12 May 2022 09:32:03 -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=@google.com header.s=20210112 header.b=qC9ruXYK; 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 S1344930AbiEKQqo (ORCPT + 99 others); Wed, 11 May 2022 12:46:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231752AbiEKQqm (ORCPT ); Wed, 11 May 2022 12:46:42 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C165C3E5DE for ; Wed, 11 May 2022 09:46:41 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id l16so3380068oil.6 for ; Wed, 11 May 2022 09:46:41 -0700 (PDT) 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=W61e8Beb9C0rrwvWLXvghQlyTT+OB/E10KtzePQGPL4=; b=qC9ruXYKycYwwp57PRsAW7znvOrSbuqcW3DHuxmCh8nzW+k7q0H4EMctn5Db56iE9w BQUNkHYBv0e1KN8wS5B4c2X+nV6NdLj1L4+1sX5mdPb/HhrVcO7hftDDTa6Ivf8VhygV zYT2wAKPWZTlwaSOMHoTgc+0Ds3IOtsZe823PbdqC/ZytU6UZCucfxBpiXtxoHVJw9Nk pGaXtQOIXbfEt6GDSauFwDf8DnFn2HVx4NjifRnqW2BscLvu8RGaq1RkZn+PAVSUG1yn UgabdoqhuYNsW4wT9mH483cVT0UhHo4AmOtsiAbsMTgLCs8NNkxmzPOW0oUCMwTiCRlO 5xKw== 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=W61e8Beb9C0rrwvWLXvghQlyTT+OB/E10KtzePQGPL4=; b=kXivjcC4Dma3/N2oHGU3Ji1oWVdNVIzQti3FDAsmlN0fyKH+A3uHjVYwuE+JGZT5Q0 QZy8LfzWo0egavZCSTyxo/iIiNZhfjlJdxCviuuEWj7fEotZYDCXa2oO8owlG9Hs9UiU QXlaUGA/YlRW8zDx6AWbugif8s42TQbbz/js+8wcbLUHcv7T2vnrbN/VWFRL6Cy+TvUx 9wYt5ECuJRpw15myGg1umlIW5RuvletNoUOZEqtS3UeuvoaMi5fUVMdpatteNoQfaKaD DSmfUauNVaflU/bSK1fJAYJ/I/e2J+4HJc35Z/4qhFHw1sv5+D+VrXMubo0JBG33anid pMdg== X-Gm-Message-State: AOAM531rwyacpRryXYbi9/IW1X/CWy1PLIsvjDjboqzsbTwVsWwqmygL xUxjki7HMzkJbZwzg9wcOUuH8d9ysUh09nzSG5VR7A== X-Received: by 2002:a05:6808:a11:b0:325:e5c1:5912 with SMTP id n17-20020a0568080a1100b00325e5c15912mr3000582oij.204.1652287600719; Wed, 11 May 2022 09:46:40 -0700 (PDT) MIME-Version: 1.0 References: <20220412195846.3692374-1-zhanwei@google.com> In-Reply-To: From: Wei Zhang Date: Wed, 11 May 2022 18:45:00 +0200 Message-ID: Subject: Re: [PATCH 0/2] KVM: x86: Fix incorrect VM-exit profiling To: Sean Christopherson Cc: Suleiman Souhlal , Sangwhan Moon , Ingo Molnar , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Yes, the profiling is about finding out which instructions in the guest trigger VM exits and the corresponding frequencies. Basically this will give a histogram array in /proc/profile. So if 'array[A] == T', we know that the instruction at (_stext + A) triggers VM exits T times. readprofile command could read the information and show a summary. On Tue, May 10, 2022 at 1:57 AM Sean Christopherson wrote: > > On Tue, Apr 12, 2022, Wei Zhang wrote: > > The profile=kvm boot option has been useful because it provides a > > convenient approach to profile VM exits. > > What exactly are you profiling? Where the guest executing at any given exit? Mostly > out of curiosity, but also in the hope that we might be able to replace profiling with > a dedicated KVM stat(s).