From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Subject: [PATCH] [4/2] rename_kvm_cpu_cache_x86 Date: Thu, 29 Nov 2007 11:00:47 +0100 Message-ID: <474E8DCF.4020609@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: "Zhang, Xiantao" , 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 Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org From: Christian Ehrhardt 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 --- [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 =3D kmem_cache_zalloc(kvm_vcpu_cache, GFP_KERNEL); + svm =3D kmem_cache_zalloc(kvm_x86_vcpu_cache, GFP_KERNEL); if (!svm) { err =3D -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 =3D kmem_cache_zalloc(kvm_vcpu_cache, GFP_KERNEL); + struct vcpu_vmx *vmx =3D 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[] =3D { @@ -2012,10 +2012,10 @@ int kvm_arch_init(void *opaque, unsigned int vcpu_s= ize, goto out_fail; = /* A kmem cache lets us meet the alignment requirements of fx_save. */ - kvm_vcpu_cache =3D kmem_cache_create("kvm_vcpu", vcpu_size, + kvm_x86_vcpu_cache =3D kmem_cache_create("kvm_vcpu", vcpu_size, __alignof__(struct kvm_vcpu), 0, NULL); - if (!kvm_vcpu_cache) { + if (!kvm_x86_vcpu_cache) { r =3D -ENOMEM; goto out_free; } @@ -2044,7 +2044,7 @@ int kvm_arch_init(void *opaque, unsigned int vcpu_siz= e, 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 =3D 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=FCsse / 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=E4ftsf=FChrung: Herbert Kircher = Sitz der Gesellschaft: B=F6blingen 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