Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp963104pxp; Wed, 16 Mar 2022 22:47:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV1d5ZgqDVOnYhJnaLmjSDvM3KNzDj7qfIVtQsCsulQyBV4EbvGhoe+IfQU+jAwlMXmHBp X-Received: by 2002:a63:7b49:0:b0:37f:ed43:4fc4 with SMTP id k9-20020a637b49000000b0037fed434fc4mr2364700pgn.387.1647496037635; Wed, 16 Mar 2022 22:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647496037; cv=none; d=google.com; s=arc-20160816; b=mP18UXvJvQ8TwRT9yjeNzxcyfc+lKB+PMQwBTP4XF6MA1MSp0T+1WNRgEnsKv0oaKs xuxHF+4jSPnKSN/ev8pWaCOkv1Gq2WdzSCYI9J9pAjoeQiLTQxTzfwX6rquYviTLdxa8 7B+E98eLWFJM/hC9xeSawwJGqQSpSfzWOA4yk7OFvjFFvKBVFmj3tLaEWszJ1+u50fie DiT0uR5WWfu9ZKr8xszbvvj1yCCIx/lspJCVTxJL/mC+q3qJfzN7x+UMMktoq8ohZMSw XTtZNo55uSk/ZfVJzuWn+WGzyfQfP05W2HWjmv4h7vi+Y36QcABwMFTy0Ho2A6fwMvAx kk7Q== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=ZnF7RElcuXdfPSzWNjGS7zFij6QjXShEfRCK1+fTBZY=; b=j6AdgsFsqzkgpzvQhEyU3YAUHd1HC/uA8l6LLcK8eDPgfx2lxSJjkaURdq5c+Npy62 k0mpgJ762LeRPagvAkYAJNzooFs522NVPDWkAR093bbxhmoDF84+K6YKTggV3aHAz/be XYcwlbBZyOwUy56YHTzbT4hN+RZZxhBxkO4pFA0261ba2477v3NXIm1vVKVPdED4/7MN NxEyntzXCGRFZlXuTGc7TLCUQyxmPqLGmNbaCnM0bF9VajKjrN1JG3ewkIAQ5F4vbGKA 9c1Wnva3/HwtpT7pxGDovM1mV0et28d4xGgK3RnzMgn1KBxVafr4uDmqIkOMMi8M5KGR ilnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RTALE2mL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s10-20020a17090a948a00b001bf74668c2csi6625345pjo.54.2022.03.16.22.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:47:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RTALE2mL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 735EFF61FD; Wed, 16 Mar 2022 21:42:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349426AbiCOOtd (ORCPT + 99 others); Tue, 15 Mar 2022 10:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238359AbiCOOtb (ORCPT ); Tue, 15 Mar 2022 10:49:31 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BD71740E65 for ; Tue, 15 Mar 2022 07:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647355698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZnF7RElcuXdfPSzWNjGS7zFij6QjXShEfRCK1+fTBZY=; b=RTALE2mLJzT5ZjaJ+PNs//LxDFCmyhceEti5s1wEb9pOAqO5A+fOpUr9ITLK3rO019+xCR pjkh8qCdJzY3ODZqfQcmdlJhvIEECKAEtsvRw2y9oGrxWZbcqG+KkKVj6rdz6mkSFLOlUD HGnGZ7aNFKtlkmGBIsHcyLTnz2Ex8sM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-573-5xNwKlzZNH2YhHZEef272w-1; Tue, 15 Mar 2022 10:48:17 -0400 X-MC-Unique: 5xNwKlzZNH2YhHZEef272w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C48DF101AA52; Tue, 15 Mar 2022 14:48:16 +0000 (UTC) Received: from starship (unknown [10.40.192.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FEDC401B28E; Tue, 15 Mar 2022 14:48:14 +0000 (UTC) Message-ID: <57c2d5d64f9d65e442744fa8b7f188ed3fd37c1c.camel@redhat.com> Subject: Re: [PATCH 3/3] KVM: x86: Trace all APICv inhibit changes and capture overall status From: Maxim Levitsky To: Chao Gao , Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 15 Mar 2022 16:48:12 +0200 In-Reply-To: <20220315144249.GA5496@gao-cwp> References: <20220311043517.17027-1-seanjc@google.com> <20220311043517.17027-4-seanjc@google.com> <20220315144249.GA5496@gao-cwp> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Tue, 2022-03-15 at 22:42 +0800, Chao Gao wrote: > On Fri, Mar 11, 2022 at 04:35:17AM +0000, Sean Christopherson wrote: > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > @@ -9053,15 +9053,29 @@ bool kvm_apicv_activated(struct kvm *kvm) > > } > > EXPORT_SYMBOL_GPL(kvm_apicv_activated); > > > > + > > stray newline. > > > +static void set_or_clear_apicv_inhibit(unsigned long *inhibits, > > + enum kvm_apicv_inhibit reason, bool set) > > +{ > > + if (set) > > + __set_bit(reason, inhibits); > > + else > > + __clear_bit(reason, inhibits); > > + > > + trace_kvm_apicv_inhibit_changed(reason, set, *inhibits); > > Note that some calls may not toggle any bit. Do you want to log them? > I am afraid that a VM with many vCPUs may get a lot of traces that actually > doesn't change inhibits. I also think so. Best regards, Maxim Levitsky > > Anyway, this series looks good to me. >