rename_kvm_cpu_cache_x86
From: Christian Ehrhardt <[email protected]>
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/*
---
[diffstat]
svm.c | 6 +++--- vmx.c | 6 +++--- x86.c | 12 ++++++------ x86.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-)
[diff]
drivers/kvm/svm.c +3 -3
@@ -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)
drivers/kvm/vmx.c +3 -3
@@ -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); }
drivers/kvm/x86.c +6 -6
@@ -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)
drivers/kvm/x86.h +1 -1
@@ -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 );
Signature · 19 lines
Grüsse / regards, Christian Ehrhardt IBM Linux Technology Center, Open Virtualization +49 7031/16-3385 [email protected] [email protected] 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
A message that is not in the archive (sent off-list or not yet received): 474E8DCF.4020609-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Quoted 11 lines · Christian Ehrhardt
From: Christian Ehrhardt <[email protected]>
Date: Thu, 29 Nov 2007 10:54:00 +0100
Subject: [PATCH] [4/2]rename_kvm_cpu_cache_x86Renamed the
kvm_vcpu_cachestructure tokvm_x86_vcpu_cacheto 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 <[email protected]>---
Don't know this is necessary, since you have moved out its declaration from kvm.h to x86.h.
-------------------------------------------------------------------------
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
Carsten Otte
Acked-byQuoted 11 lines · Christian Ehrhardt
From: Christian Ehrhardt <[email protected]>
Date: Thu, 29 Nov 2007 10:54:00 +0100
Subject: [PATCH] [4/2]rename_kvm_cpu_cache_x86Renamed the
kvm_vcpu_cachestructure tokvm_x86_vcpu_cacheto 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 <[email protected]>---
-------------------------------------------------------------------------
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