qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Cc: pbonzini@redhat.com, vkuznets@redhat.com, qemu-devel@nongnu.org,
	kvm@vger.kernel.org, jmattson@google.com
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	[thread overview]
Message-ID: <20200929040851.GK31514@linux.intel.com> (raw)
In-Reply-To: <1595895050-105504-5-git-send-email-krish.sadhukhan@oracle.com>

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,


  reply	other threads:[~2020-09-29  4:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  0:10 [PATCH 0/6 v3] KVM: x86: Fill in conforming {vmx|svm}_x86_ops and {vmx|svm}_nested_ops via macros Krish Sadhukhan
2020-07-28  0:10 ` [PATCH 1/6 v3] KVM: x86: Change names of some of the kvm_x86_ops functions to make them more semantical and readable Krish Sadhukhan
2020-09-29  4:03   ` Sean Christopherson
2020-07-28  0:10 ` [PATCH 2/6 v3] KVM: SVM: Fill in conforming svm_x86_ops via macro Krish Sadhukhan
2020-09-29  4:06   ` Sean Christopherson
2020-07-28  0:10 ` [PATCH 3/6 v3] KVM: nSVM: Fill in conforming svm_nested_ops " Krish Sadhukhan
2020-07-28  0:10 ` [PATCH 4/6 v3] KVM: VMX: Fill in conforming vmx_x86_ops " Krish Sadhukhan
2020-09-29  4:08   ` Sean Christopherson [this message]
2020-07-28  0:10 ` [PATCH 5/6 v3] KVM: nVMX: Fill in conforming vmx_nested_ops " Krish Sadhukhan
2020-07-28  0:10 ` [PATCH 6/6 v3] QEMU: x86: Change KVM_MEMORY_ENCRYPT_* #defines to make them conformant to the kernel Krish Sadhukhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200929040851.GK31514@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jmattson@google.com \
    --cc=krish.sadhukhan@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).