[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6 v3] KVM: VMX: Fill in conforming vmx_x86_ops via macro
From: |
Sean Christopherson |
Subject: |
Re: [PATCH 4/6 v3] KVM: VMX: Fill in conforming vmx_x86_ops via macro |
Date: |
Mon, 28 Sep 2020 21:08:51 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Jul 28, 2020 at 12:10:48AM +0000, Krish Sadhukhan wrote:
> The names of some of the vmx_x86_ops functions do not have a corresponding
> 'vmx_' prefix. Generate the names using a macro so that the names are
> conformant. Fixing the naming will help in better readability and
> maintenance of the code.
>
> Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
> ---
> arch/x86/kvm/vmx/nested.c | 2 +-
> arch/x86/kvm/vmx/vmx.c | 234
> +++++++++++++++++++++++-----------------------
> arch/x86/kvm/vmx/vmx.h | 2 +-
> 3 files changed, 120 insertions(+), 118 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index d1af20b..a898b53 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -3016,7 +3016,7 @@ static int nested_vmx_check_vmentry_hw(struct kvm_vcpu
> *vcpu)
>
> preempt_disable();
>
> - vmx_prepare_switch_to_guest(vcpu);
> + vmx_prepare_guest_switch(vcpu);
I very strongly prefer the VMX version, i.e. rename
kvm_x86_ops.prepare_guest_switch()
instead of renamed vmx_prepare_switch_to_guest(). prepare_guest_switch() can be
misinterpreted as switching to a different guest, and
vmx_prepare_switch_to_guest()
explicitly pairs with vmx_prepare_switch_to_host().
>
> /*
> * Induce a consistency check VMExit by clearing bit 1 in GUEST_RFLAGS,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 4/6 v3] KVM: VMX: Fill in conforming vmx_x86_ops via macro,
Sean Christopherson <=