public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: x86: VMX: untangle VMXON revision_id setting when using eVMCS
Date: Thu, 05 Mar 2020 17:34:42 +0100	[thread overview]
Message-ID: <8736amg3q5.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20200305154130.GB11500@linux.intel.com>

Sean Christopherson <sean.j.christopherson@intel.com> writes:

> On Thu, Mar 05, 2020 at 11:01:23AM +0100, Vitaly Kuznetsov wrote:
>> As stated in alloc_vmxon_regions(), VMXON region needs to be tagged with
>> revision id from MSR_IA32_VMX_BASIC even in case of eVMCS. The logic to
>> do so is not very straightforward: first, we set
>> hdr.revision_id = KVM_EVMCS_VERSION in alloc_vmcs_cpu() just to reset it
>> back to vmcs_config.revision_id in alloc_vmxon_regions(). Simplify this by
>> introducing 'enum vmx_area_type' parameter to what is now known as
>> alloc_vmx_area_cpu().
>
> I'd strongly prefer to keep the alloc_vmcs_cpu() name and call the new enum
> "vmcs_type".  The discrepancy could be resolved by a comment above the
> VMXON_REGION usage, e.g.
>
> 		/* The VMXON region is really just a special type of VMCS. */
> 		vmcs = alloc_vmcs_cpu(VMXON_REGION, cpu, GFP_KERNEL);

I have no strong opinion (but honestly I don't really know what VMXON
region is being used for), Paolo already said 'queued' but I think I'll
send v2 with the suggested changes (including patch prefixes :-)

-- 
Vitaly


  reply	other threads:[~2020-03-05 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 10:01 [PATCH 0/2] KVM: x86: VMX: cleanup VMXON region allocation Vitaly Kuznetsov
2020-03-05 10:01 ` [PATCH 1/2] KVM: x86: VMX: rename 'kvm_area' to 'vmxon_region' Vitaly Kuznetsov
2020-03-05 15:36   ` Sean Christopherson
2020-03-05 15:58     ` Vitaly Kuznetsov
2020-03-05 16:00       ` Sean Christopherson
2020-03-05 10:01 ` [PATCH 2/2] KVM: x86: VMX: untangle VMXON revision_id setting when using eVMCS Vitaly Kuznetsov
2020-03-05 15:41   ` Sean Christopherson
2020-03-05 16:34     ` Vitaly Kuznetsov [this message]
2020-03-05 16:43       ` Paolo Bonzini
2020-03-05 15:35 ` [PATCH 0/2] KVM: x86: VMX: cleanup VMXON region allocation Paolo Bonzini

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=8736amg3q5.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=wanpengli@tencent.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