All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: "Zhang,
	Xiantao" <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org,
	hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
Subject: [PATCH] [4/2] rename_kvm_cpu_cache_x86
Date: Thu, 29 Nov 2007 11:00:47 +0100	[thread overview]
Message-ID: <474E8DCF.4020609@linux.vnet.ibm.com> (raw)

From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date: Thu, 29 Nov 2007 10:54:00 +0100
Subject: [PATCH] [4/2] rename_kvm_cpu_cache_x86

Renamed the kvm_vcpu_cache structure to kvm_x86_vcpu_cache to make clear to anyone who see's that variable in the code in future that it's x86 only.
Equivalent to perl -p -i -e "s/kvm_vcpu_cache/kvm_x86_vcpu_cache/g" drivers/kvm/*

Signed-off-by: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---

[diffstat]
 svm.c |    6 +++---
 vmx.c |    6 +++---
 x86.c |   12 ++++++------
 x86.h |    2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

[diff]
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 928fb35..d12ff34 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -578,7 +578,7 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)
 	struct page *page;
 	int err;
 
-	svm = kmem_cache_zalloc(kvm_vcpu_cache, GFP_KERNEL);
+	svm = kmem_cache_zalloc(kvm_x86_vcpu_cache, GFP_KERNEL);
 	if (!svm) {
 		err = -ENOMEM;
 		goto out;
@@ -612,7 +612,7 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)
 uninit:
 	kvm_vcpu_uninit(&svm->vcpu);
 free_svm:
-	kmem_cache_free(kvm_vcpu_cache, svm);
+	kmem_cache_free(kvm_x86_vcpu_cache, svm);
 out:
 	return ERR_PTR(err);
 }
@@ -623,7 +623,7 @@ static void svm_free_vcpu(struct kvm_vcpu *vcpu)
 
 	__free_page(pfn_to_page(svm->vmcb_pa >> PAGE_SHIFT));
 	kvm_vcpu_uninit(vcpu);
-	kmem_cache_free(kvm_vcpu_cache, svm);
+	kmem_cache_free(kvm_x86_vcpu_cache, svm);
 }
 
 static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 8e43feb..5c61cc2 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -2519,13 +2519,13 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
 	kfree(vmx->host_msrs);
 	kfree(vmx->guest_msrs);
 	kvm_vcpu_uninit(vcpu);
-	kmem_cache_free(kvm_vcpu_cache, vmx);
+	kmem_cache_free(kvm_x86_vcpu_cache, vmx);
 }
 
 static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
 {
 	int err;
-	struct vcpu_vmx *vmx = kmem_cache_zalloc(kvm_vcpu_cache, GFP_KERNEL);
+	struct vcpu_vmx *vmx = kmem_cache_zalloc(kvm_x86_vcpu_cache, GFP_KERNEL);
 	int cpu;
 
 	if (!vmx)
@@ -2570,7 +2570,7 @@ free_guest_msrs:
 uninit_vcpu:
 	kvm_vcpu_uninit(&vmx->vcpu);
 free_vcpu:
-	kmem_cache_free(kvm_vcpu_cache, vmx);
+	kmem_cache_free(kvm_x86_vcpu_cache, vmx);
 	return ERR_PTR(err);
 }
 
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index b8a1b52..47de514 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -48,8 +48,8 @@
 
 struct kvm_x86_ops *kvm_x86_ops;
 
-struct kmem_cache *kvm_vcpu_cache;
-EXPORT_SYMBOL_GPL(kvm_vcpu_cache);
+struct kmem_cache *kvm_x86_vcpu_cache;
+EXPORT_SYMBOL_GPL(kvm_x86_vcpu_cache);
 
 
 struct kvm_stats_debugfs_item debugfs_entries[] = {
@@ -2012,10 +2012,10 @@ int kvm_arch_init(void *opaque, unsigned int vcpu_size,
 		goto out_fail;
 
 	/* A kmem cache lets us meet the alignment requirements of fx_save. */
-	kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size,
+	kvm_x86_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size,
 					   __alignof__(struct kvm_vcpu),
 					   0, NULL);
-	if (!kvm_vcpu_cache) {
+	if (!kvm_x86_vcpu_cache) {
 		r = -ENOMEM;
 		goto out_free;
 	}
@@ -2044,7 +2044,7 @@ int kvm_arch_init(void *opaque, unsigned int vcpu_size,
 	return 0;
 
 out:
-	kmem_cache_destroy(kvm_vcpu_cache);
+	kmem_cache_destroy(kvm_x86_vcpu_cache);
 out_free:
 	kvm_mmu_module_exit();
 out_fail:
@@ -2055,7 +2055,7 @@ void kvm_arch_exit(void)
 {
 	kvm_x86_ops = NULL;
 	kvm_mmu_module_exit();
-	kmem_cache_destroy(kvm_vcpu_cache);
+	kmem_cache_destroy(kvm_x86_vcpu_cache);
 }
 
 int kvm_emulate_halt(struct kvm_vcpu *vcpu)
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 2080a65..da73280 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -224,7 +224,7 @@ struct kvm_x86_ops {
 };
 
 extern struct kvm_x86_ops *kvm_x86_ops;
-extern struct kmem_cache *kvm_vcpu_cache;
+extern struct kmem_cache *kvm_x86_vcpu_cache;
 
 int kvm_mmu_module_init(void);
 void kvm_mmu_module_exit(void);


-- 

Grüsse / regards, 
Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385
Ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Ehrhardt-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen 
Geschäftsführung: Herbert Kircher 
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

             reply	other threads:[~2007-11-29 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29 10:00 Christian Ehrhardt [this message]
     [not found] ` <474E8DCF.4020609-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-11-29 10:33   ` [PATCH] [4/2] rename_kvm_cpu_cache_x86 Zhang, Xiantao
2007-11-29 12:22   ` Carsten Otte

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=474E8DCF.4020609@linux.vnet.ibm.com \
    --to=ehrhardt-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
    --cc=hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.