Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1390926ybn; Wed, 25 Sep 2019 17:38:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyW+WDjsoVSYuwv1ZS99YCZ149jU+tDdYKtIbwLF0n00H+/w8cTjXLPnuQgfb9OhmVu1XgU X-Received: by 2002:a05:6402:121a:: with SMTP id c26mr863422edw.100.1569458287714; Wed, 25 Sep 2019 17:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458287; cv=none; d=google.com; s=arc-20160816; b=CfUJiCG84vaP7ZXeYrBWiCqzD4I96OBquV/ZdFshSipVsh+k81TNF1bNaYlTPDRvLk tQsN30pTvD9SaK5DwXR8iMbmSt/MxDD2l+0lD014GGI7pmDTQbhNsR8ysVKHPKSJX7LP 83Zbr8FoZwwUm0GrYOsguC5W7c+lOTmdtcfyowDA+DQ+WPlS1/TWfHqJbBQQchTpHwon WwM4hqY/UCeFLrxiY3e8gopRCy0md4ohP2p4dvdoBi+CrqHVgbN9+EmS71ER5r6K43R7 t8PjsKIohxH5DxfPMVeqhNuiVtoKW963AwNkw+FrSoH5SfEnVLx9cKkzy+x5l7n9zRbu n7Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9yp7szi3vTJArCmdcQZPN+3Ec+hf4bFjK4nmzhNr7MU=; b=O1fgD9zuWwOVZ6m+Nqdl1oF/NLm6lcDulXtjJYpxLw8nBwMvoisvIQKnO715PPD3C8 OREN8cf2I4JTE2rjk5eUOa8O0YvV3ycwC/o80pbnFfbPa05hQk1ATjl2rkB1ilBE58NZ vx/FFTBDDSjCOTlOG1Q/JxdwsZ21eHnLjMx77XESW2eGn5muhO2z22/PheA5wMjjNvvO uYgF3XtSYQs64L1blIGybohXcWoVU2a1HbCW5bHmL2ilGZCCv2szSehYSaV3Q9cGicc7 SVT43Bvmzyh+QDHZjZt72ZT6wujz+F3eUvmcxMjDaKPCUJsH/3DXz9TPioK3U4B2HQz0 QnpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si243334ejt.143.2019.09.25.17.37.44; Wed, 25 Sep 2019 17:38:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392018AbfIXAv5 (ORCPT + 99 others); Mon, 23 Sep 2019 20:51:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57220 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390912AbfIXAv5 (ORCPT ); Mon, 23 Sep 2019 20:51:57 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D28A110C0940; Tue, 24 Sep 2019 00:51:56 +0000 (UTC) Received: from mail (ovpn-120-159.rdu2.redhat.com [10.10.120.159]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A398B10013A1; Tue, 24 Sep 2019 00:51:53 +0000 (UTC) Date: Mon, 23 Sep 2019 20:51:52 -0400 From: Andrea Arcangeli To: Paolo Bonzini Cc: Vitaly Kuznetsov , "Dr. David Alan Gilbert" , Marcelo Tosatti , Peter Xu , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/17] KVM: monolithic: x86: drop the kvm_pmu_ops structure Message-ID: <20190924005152.GA4658@redhat.com> References: <20190920212509.2578-1-aarcange@redhat.com> <20190920212509.2578-14-aarcange@redhat.com> <057fc5f2-7343-943f-ed86-59f1ad5122e5@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <057fc5f2-7343-943f-ed86-59f1ad5122e5@redhat.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Tue, 24 Sep 2019 00:51:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 12:21:43PM +0200, Paolo Bonzini wrote: > On 20/09/19 23:25, Andrea Arcangeli wrote: > > Cleanup after this was finally left fully unused. > > > > Signed-off-by: Andrea Arcangeli > > --- > > arch/x86/include/asm/kvm_host.h | 3 --- > > arch/x86/kvm/pmu.h | 19 ------------------- > > arch/x86/kvm/pmu_amd.c | 15 --------------- > > arch/x86/kvm/svm.c | 1 - > > arch/x86/kvm/vmx/pmu_intel.c | 15 --------------- > > arch/x86/kvm/vmx/vmx.c | 2 -- > > 6 files changed, 55 deletions(-) > > Is there any reason not to do the same for kvm_x86_ops? This was covered in the commit header of patch 2: To reduce the rejecting parts while tracking upstream, this doesn't attempt to entirely remove the kvm_x86_ops structure yet, that is meant for a later cleanup. The pmu ops have been already cleaned up in this patchset because it was left completely unused right after the conversion from pointer to functions to external functions. Lot more patches are needed to get rid of kvm_x86_ops entirely because there are lots of places checking the actual value of the method before making the indirect call. I tried to start that, but then it got into potentially heavily rejecting territory, so I thought it was simpler to start with what I had, considering from a performance standpoint it's optimal already as far as retpolines are concerned. > (As an aside, patch 2 is not copying over the comments in the struct > kvm_x86_ops declarations. Granted there aren't many, but we should not > lose the few that exist). Yes sorry, this was actually unintentional and the comment need to be retained in the header declaration. Thanks, Andrea