From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADCA4C3F2CD for ; Mon, 23 Mar 2020 16:23:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 822A32051A for ; Mon, 23 Mar 2020 16:23:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oI2L3rz+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 822A32051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YejFRWe379c3mihbk1YOZOU6ocnr0IULnp3DhTgV94M=; b=oI2L3rz+AhJCBH 4aS2kTtkj80/GDB/1PWW55arrwJKw1JeL5bLQPAs7M0jLzRqRv48u9BavL7lH8+tAJlDFlgy4LcRa pogHeOFO+2iaTmi/X98FPme/g6aj3tGvzLbtCc+2cnEs/TSauZctT9MvGLwvcGtnlLrgxmIAP8lao CU5E8h/1ADrQb/AlcTLG1u4+qmx9AwrcyP3eHn+bHnrEQ5g7qBZICA3CjqUaUGH/GNytQHbVjE6NP G8kYSp31EKgZkFpf4wfHvLmujwNM4IEJvKAAvj36qq+8cPVi8vuX6LE89+TDWDYW7UHjCvlP9OJLs DV6CDeGWvq9XmEIqaf/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGPrB-0006SA-3H; Mon, 23 Mar 2020 16:23:17 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGPr7-0006Re-Pp for linux-arm-kernel@lists.infradead.org; Mon, 23 Mar 2020 16:23:15 +0000 IronPort-SDR: Ik4plwKF1ilLl1Gub9yqjxNLNHaLNrlmBd5XkqbV/R1aHlchJ/0I33aZ1k86rGum97OTZMuNX6 xCmWzc1QDHog== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2020 09:23:07 -0700 IronPort-SDR: MSUbytwPG21W6dHu5U5WS4F+QkOtlYnEVMtPHZM2yy05ToGOBSa/Iia6kA8iGdkqDv5h8AChKj rBEIy+2a4Nvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,297,1580803200"; d="scan'208";a="357139587" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by fmsmga001.fm.intel.com with ESMTP; 23 Mar 2020 09:23:05 -0700 Date: Mon, 23 Mar 2020 09:23:05 -0700 From: Sean Christopherson To: Vitaly Kuznetsov Subject: Re: [PATCH v3 4/9] KVM: VMX: Configure runtime hooks using vmx_x86_ops Message-ID: <20200323162305.GL28711@linux.intel.com> References: <20200321202603.19355-1-sean.j.christopherson@intel.com> <20200321202603.19355-5-sean.j.christopherson@intel.com> <87ftdz9ryn.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87ftdz9ryn.fsf@vitty.brq.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200323_092313_904968_2AC6FF1E X-CRM114-Status: GOOD ( 14.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wanpeng Li , Janosch Frank , kvm@vger.kernel.org, David Hildenbrand , Marc Zyngier , Joerg Roedel , Cornelia Huck , linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , Christian Borntraeger , James Morse , linux-arm-kernel@lists.infradead.org, Paolo Bonzini , Suzuki K Poulose , kvmarm@lists.cs.columbia.edu, Julien Thierry , Jim Mattson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 23, 2020 at 01:27:28PM +0100, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > > Configure VMX's runtime hooks by modifying vmx_x86_ops directly instead > > of using the global kvm_x86_ops. This sets the stage for waiting until > > after ->hardware_setup() to set kvm_x86_ops with the vendor's > > implementation. > > > > Signed-off-by: Sean Christopherson > > --- > > arch/x86/kvm/vmx/nested.c | 15 ++++++++------- > > arch/x86/kvm/vmx/nested.h | 3 ++- > > arch/x86/kvm/vmx/vmx.c | 27 ++++++++++++++------------- > > 3 files changed, 24 insertions(+), 21 deletions(-) > > > > diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c > > index 4ff859c99946..87fea22c3799 100644 > > --- a/arch/x86/kvm/vmx/nested.c > > +++ b/arch/x86/kvm/vmx/nested.c > > @@ -6241,7 +6241,8 @@ void nested_vmx_hardware_unsetup(void) > > } > > } > > > > -__init int nested_vmx_hardware_setup(int (*exit_handlers[])(struct kvm_vcpu *)) > > +__init int nested_vmx_hardware_setup(struct kvm_x86_ops *ops, > > + int (*exit_handlers[])(struct kvm_vcpu *)) > > { > > int i; > > > > @@ -6277,12 +6278,12 @@ __init int nested_vmx_hardware_setup(int (*exit_handlers[])(struct kvm_vcpu *)) > > exit_handlers[EXIT_REASON_INVVPID] = handle_invvpid; > > exit_handlers[EXIT_REASON_VMFUNC] = handle_vmfunc; > > > > - kvm_x86_ops->check_nested_events = vmx_check_nested_events; > > - kvm_x86_ops->get_nested_state = vmx_get_nested_state; > > - kvm_x86_ops->set_nested_state = vmx_set_nested_state; > > - kvm_x86_ops->get_vmcs12_pages = nested_get_vmcs12_pages; > > - kvm_x86_ops->nested_enable_evmcs = nested_enable_evmcs; > > - kvm_x86_ops->nested_get_evmcs_version = nested_get_evmcs_version; > > + ops->check_nested_events = vmx_check_nested_events; > > + ops->get_nested_state = vmx_get_nested_state; > > + ops->set_nested_state = vmx_set_nested_state; > > + ops->get_vmcs12_pages = nested_get_vmcs12_pages; > > + ops->nested_enable_evmcs = nested_enable_evmcs; > > + ops->nested_get_evmcs_version = nested_get_evmcs_version; > > > A lazy guy like me would appreciate 'ops' -> 'vmx_x86_ops' rename as it > would make 'git grep vmx_x86_ops' output more complete. Ah, didn't think about that, obviously. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel