From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jim Mattson <jmattson@google.com>,
Sean Christopherson <sean.j.christopherson@intel.com>,
Wanpeng Li <wanpengli@tencent.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] KVM: VMX: rename 'kvm_area' to 'vmxon_region'
Date: Thu, 5 Mar 2020 19:37:24 +0100 [thread overview]
Message-ID: <20200305183725.28872-2-vkuznets@redhat.com> (raw)
In-Reply-To: <20200305183725.28872-1-vkuznets@redhat.com>
The name 'kvm_area' is misleading (as we have way too many areas which are
KVM related), what alloc_kvm_area()/free_kvm_area() functions really do is
allocate/free VMXON region for all CPUs. Rename accordingly.
No functional change intended.
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/kvm/vmx/vmx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 40b1e6138cd5..dab19e4e5f2b 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2635,7 +2635,7 @@ int alloc_loaded_vmcs(struct loaded_vmcs *loaded_vmcs)
return -ENOMEM;
}
-static void free_kvm_area(void)
+static void free_vmxon_regions(void)
{
int cpu;
@@ -2645,7 +2645,7 @@ static void free_kvm_area(void)
}
}
-static __init int alloc_kvm_area(void)
+static __init int alloc_vmxon_regions(void)
{
int cpu;
@@ -2654,7 +2654,7 @@ static __init int alloc_kvm_area(void)
vmcs = alloc_vmcs_cpu(false, cpu, GFP_KERNEL);
if (!vmcs) {
- free_kvm_area();
+ free_vmxon_regions();
return -ENOMEM;
}
@@ -7815,7 +7815,7 @@ static __init int hardware_setup(void)
return r;
}
- r = alloc_kvm_area();
+ r = alloc_vmxon_regions();
if (r)
nested_vmx_hardware_unsetup();
return r;
@@ -7826,7 +7826,7 @@ static __exit void hardware_unsetup(void)
if (nested)
nested_vmx_hardware_unsetup();
- free_kvm_area();
+ free_vmxon_regions();
}
static bool vmx_check_apicv_inhibit_reasons(ulong bit)
--
2.24.1
next prev parent reply other threads:[~2020-03-05 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 18:37 [PATCH v2 0/2] KVM: VMX: cleanup VMXON region allocation Vitaly Kuznetsov
2020-03-05 18:37 ` Vitaly Kuznetsov [this message]
2020-03-05 18:37 ` [PATCH v2 2/2] KVM: VMX: untangle VMXON revision_id setting when using eVMCS Vitaly Kuznetsov
2020-03-05 20:10 ` Sean Christopherson
2020-03-06 10:06 ` Vitaly Kuznetsov
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=20200305183725.28872-2-vkuznets@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