[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200323162305.GL28711@linux.intel.com>
Date: Mon, 23 Mar 2020 09:23:05 -0700
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Paul Mackerras <paulus@...abs.org>,
Christian Borntraeger <borntraeger@...ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
David Hildenbrand <david@...hat.com>,
Cornelia Huck <cohuck@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, Marc Zyngier <maz@...nel.org>,
James Morse <james.morse@....com>,
Julien Thierry <julien.thierry.kdev@...il.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
linux-mips@...r.kernel.org, kvm@...r.kernel.org,
kvm-ppc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.cs.columbia.edu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/9] KVM: VMX: Configure runtime hooks using
vmx_x86_ops
On Mon, Mar 23, 2020 at 01:27:28PM +0100, Vitaly Kuznetsov wrote:
> Sean Christopherson <sean.j.christopherson@...el.com> 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 <sean.j.christopherson@...el.com>
> > ---
> > 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.
Powered by blists - more mailing lists