aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorXiubo Li <lixiubo@cmss.chinamobile.com>2015-02-26 01:58:26 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2015-03-10 09:37:45 -0400
commit1170adc6dd9e94d3cefb6eefe1f44b308d882515 (patch)
tree6625ec8a8c6697d5c485cb2812a38e2e611725b8 /virt
parent20e87b72244f922f420d83b0b15b42d17b92acae (diff)
KVM: Use pr_info/pr_err in kvm_main.c
WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... + printk(KERN_INFO "kvm: exiting hardware virtualization\n"); WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... + printk(KERN_ERR "kvm: misc device register failed\n"); Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index e7d1bf8f2366..49900fc21f89 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2817,8 +2817,7 @@ static void hardware_enable_nolock(void *junk)
2817 if (r) { 2817 if (r) {
2818 cpumask_clear_cpu(cpu, cpus_hardware_enabled); 2818 cpumask_clear_cpu(cpu, cpus_hardware_enabled);
2819 atomic_inc(&hardware_enable_failed); 2819 atomic_inc(&hardware_enable_failed);
2820 printk(KERN_INFO "kvm: enabling virtualization on " 2820 pr_info("kvm: enabling virtualization on CPU%d failed\n", cpu);
2821 "CPU%d failed\n", cpu);
2822 } 2821 }
2823} 2822}
2824 2823
@@ -2894,12 +2893,12 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
2894 val &= ~CPU_TASKS_FROZEN; 2893 val &= ~CPU_TASKS_FROZEN;
2895 switch (val) { 2894 switch (val) {
2896 case CPU_DYING: 2895 case CPU_DYING:
2897 printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n", 2896 pr_info("kvm: disabling virtualization on CPU%d\n",
2898 cpu); 2897 cpu);
2899 hardware_disable(); 2898 hardware_disable();
2900 break; 2899 break;
2901 case CPU_STARTING: 2900 case CPU_STARTING:
2902 printk(KERN_INFO "kvm: enabling virtualization on CPU%d\n", 2901 pr_info("kvm: enabling virtualization on CPU%d\n",
2903 cpu); 2902 cpu);
2904 hardware_enable(); 2903 hardware_enable();
2905 break; 2904 break;
@@ -2916,7 +2915,7 @@ static int kvm_reboot(struct notifier_block *notifier, unsigned long val,
2916 * 2915 *
2917 * And Intel TXT required VMX off for all cpu when system shutdown. 2916 * And Intel TXT required VMX off for all cpu when system shutdown.
2918 */ 2917 */
2919 printk(KERN_INFO "kvm: exiting hardware virtualization\n"); 2918 pr_info("kvm: exiting hardware virtualization\n");
2920 kvm_rebooting = true; 2919 kvm_rebooting = true;
2921 on_each_cpu(hardware_disable_nolock, NULL, 1); 2920 on_each_cpu(hardware_disable_nolock, NULL, 1);
2922 return NOTIFY_OK; 2921 return NOTIFY_OK;
@@ -3346,7 +3345,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
3346 3345
3347 r = misc_register(&kvm_dev); 3346 r = misc_register(&kvm_dev);
3348 if (r) { 3347 if (r) {
3349 printk(KERN_ERR "kvm: misc device register failed\n"); 3348 pr_err("kvm: misc device register failed\n");
3350 goto out_unreg; 3349 goto out_unreg;
3351 } 3350 }
3352 3351
@@ -3357,7 +3356,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
3357 3356
3358 r = kvm_init_debug(); 3357 r = kvm_init_debug();
3359 if (r) { 3358 if (r) {
3360 printk(KERN_ERR "kvm: create debugfs files failed\n"); 3359 pr_err("kvm: create debugfs files failed\n");
3361 goto out_undebugfs; 3360 goto out_undebugfs;
3362 } 3361 }
3363 3362