Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3121695pxb; Fri, 5 Nov 2021 10:05:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqutGnPCNRGI+Uf3jeKTQaTFHaxr+FX6PPl9J6fIbbLvnmR4xnHlJaF9jasO0IYXyw9/QD X-Received: by 2002:a92:ad0c:: with SMTP id w12mr40959035ilh.20.1636131947058; Fri, 05 Nov 2021 10:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636131947; cv=none; d=google.com; s=arc-20160816; b=WHNMpa1VIzfFsD+RLgEqO+aB95VmqTUdFYzWEpemwXvP7f2hZ4nMYgXABLz6JGRe5g HdM0gDpoUSQZHZM+DE5UD/xmMXIAFSi8Zrf4MwmRDz9M5bHhagpgqlEqsZOkHN59qbYX pqecJLyrKI+RwJA8W0oRD4L3no68rMoeiJ1FxC07GJ4BnzkNOU1LtgBhpNI+yPlfHasp PBjoCheLv76rTIvuDdXed6Ddu5/WmxUCcWLAxwxQa7e8/zvYVZb167nN4UeGCotZBwGh ZoiZIpx+FgIfjhl0QociZbP+Tui6fsYnH7/Kd1BNKGLVylGGrBpwhgciZOyJsJ8N/06c pNIg== 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=byGIoYkr0QhWpJdm4ULxfBziUavg2KJpzYT4Nf5tt3s=; b=tF2fMFQFBCPobx5oSpwmIqUaccHm4N3AUic/GCANQnIwjb7cKvnNmJnZn0xmDj1KiP iC6TesfpYjPqYTgzzDRCWxk8NykVEX0Uem3deMjwreAjqPoXe9cE+2eRuQ1GSpYrMeSv QTjqYErbe4HEiVHTaWa2caWJEaO6zwvVtEWCDx3ZAFq0qKCP/htpocpWcsDLD2ZZeoq8 xYIK9iPDt67rt89R0nSP0xsWpLqkpqzh3ANAMtwSXRXiPxAIrySXBPNkvxKiHeXjz4b9 0y5gRA01h1y2s6K6j5d4Lcio68s8Y3by6QC4IIOXtYmXFAEIX2RTvrhLP0yYlh3WMTvl LqIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ET3Vcrdl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si16030900ilv.137.2021.11.05.10.05.16; Fri, 05 Nov 2021 10:05:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ET3Vcrdl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233356AbhKEPjg (ORCPT + 99 others); Fri, 5 Nov 2021 11:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233464AbhKEPjg (ORCPT ); Fri, 5 Nov 2021 11:39:36 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B975C061205 for ; Fri, 5 Nov 2021 08:36:56 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id o14so11322217plg.5 for ; Fri, 05 Nov 2021 08:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=byGIoYkr0QhWpJdm4ULxfBziUavg2KJpzYT4Nf5tt3s=; b=ET3VcrdlIP9HQjIDJYvleAng264LiCDGiockoUj9mbSqEWzbMx4qIQqWOTpsiVOMoe 1h2RLIl/OmPIwSOfCYZVSooUajDezEagxfrmhvnSAX1xfHGuq/m77W/pZRoFHyKMSlt5 yghjjy59VBDJDhvOJe9UqC78t4dhwZS9Gyxc6r4vGnDdtp5dvtrNEPZ9Ntd9zPYISgBq AzttVafq5l13ol9SzSy7qAv3CfpcPU1NRHg9G6aPGFcGz262CLVN9y0Je8jmJoSbbieX BzSEdjHVz15M4iIto1KnnO6AtzngJaBOluJrVaLxSk/P/QHyY3SeXcFmHNfkNCyYwVx6 3llw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=byGIoYkr0QhWpJdm4ULxfBziUavg2KJpzYT4Nf5tt3s=; b=l80zeJTcCJ2n+17g51+QmYsKr3dGYMyWk+JQhNczHmVt2Qa5lwJIARoFxyEcAYRt2J 7M34GPzLe4QLfI1jdGVSimgvUeQl2jnFZay9Nwv+ztjiN/RvJPknxnpVEGLuLThCDMhT B9aDKUHMrzAeppSvk1uyT5pmkQd7m+55i0wdz77fejyl5GHnVn7TdbKw2hwcwjTEX2Ja jPsO8PgJgAU4B3W6kIPOvhMCOJO6Qg5l6Wr5oXwW4QynyFJWqPRlWSn6qgtm3nVRbEpt pWKunTePr5lOODV/Nk8c2uPphxwQlBgWmdLKQ3c6u7OxlV8RIeUbdlohNmm50Xppz26B fBOw== X-Gm-Message-State: AOAM532Bwf3dE8vxxXXouKaNoQJ19tvtJmTuDPinsdfmrw/yOAnBsxh1 TanMv9m70RV0BivD9eF0TW+4BA== X-Received: by 2002:a17:902:aa08:b0:13f:eb2e:8ce8 with SMTP id be8-20020a170902aa0800b0013feb2e8ce8mr52619170plb.0.1636126615651; Fri, 05 Nov 2021 08:36:55 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id w192sm2422905pfd.21.2021.11.05.08.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 08:36:54 -0700 (PDT) Date: Fri, 5 Nov 2021 15:36:51 +0000 From: Sean Christopherson To: Like Xu Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] KVM: x86: Copy kvm_pmu_ops by value to eliminate layer of indirection Message-ID: References: <20211103070310.43380-1-likexu@tencent.com> <20211103070310.43380-2-likexu@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 05, 2021, Sean Christopherson wrote: > On Wed, Nov 03, 2021, Like Xu wrote: > I would also say land this memcpy() above kvm_ops_static_call_update(), then the > enabling patch can do the static call updates in kvm_ops_static_call_update() > instead of adding another helper. Ugh, kvm_ops_static_call_update() is defined in kvm_host.h. That's completely unnecessary, it should have exactly one caller, kvm_arch_hardware_setup(). As a prep match, move kvm_ops_static_call_update() to x86.c, then it can reference the pmu ops.