[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ccfa85b7-b484-7052-f991-78ad05ce7fe7@redhat.com>
Date: Tue, 24 Sep 2019 02:15:39 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>,
Andrea Arcangeli <aarcange@...hat.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
"Dr. David Alan Gilbert" <dgilbert@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Peter Xu <peterx@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 15/17] KVM: retpolines: x86: eliminate retpoline from
vmx.c exit handlers
On 23/09/19 22:23, Sean Christopherson wrote:
>
> +int nested_vmx_handle_vmx_instruction(struct kvm_vcpu *vcpu)
> +{
> + switch (to_vmx(vcpu)->exit_reason) {
> + case EXIT_REASON_VMCLEAR:
> + return handle_vmclear(vcpu);
> + case EXIT_REASON_VMLAUNCH:
> + return handle_vmlaunch(vcpu);
> + case EXIT_REASON_VMPTRLD:
> + return handle_vmptrld(vcpu);
> + case EXIT_REASON_VMPTRST:
> + return handle_vmptrst(vcpu);
> + case EXIT_REASON_VMREAD:
> + return handle_vmread(vcpu);
> + case EXIT_REASON_VMRESUME:
> + return handle_vmresume(vcpu);
> + case EXIT_REASON_VMWRITE:
> + return handle_vmwrite(vcpu);
> + case EXIT_REASON_VMOFF:
> + return handle_vmoff(vcpu);
> + case EXIT_REASON_VMON:
> + return handle_vmon(vcpu);
> + case EXIT_REASON_INVEPT:
> + return handle_invept(vcpu);
> + case EXIT_REASON_INVVPID:
> + return handle_invvpid(vcpu);
> + case EXIT_REASON_VMFUNC:
> + return handle_vmfunc(vcpu);
> + }
> +
Do you really need that? Why couldn't the handle_* functions simply be
exported from nested.c to vmx.c?
Paolo
Powered by blists - more mailing lists