From: Avi Kivity Subject: [PATCH] KVM: printk log levels Date: Thu, 30 Nov 2006 09:08:59 -0000 Message-ID: <20061130090859.1942725017B@cleopatra.q> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: akpm-3NddpPZAyC0@public.gmane.org, mingo-X9Un+BFzKDI@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org Return-path: To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org 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: Roland Drier Here's a trivial patch that adds log levels to all printks. This avoids ugly things like Message from syslogd@roland-xeon-2 at Wed Nov 29 14:01:01 2006 ... roland-xeon-2 kernel: [81842.565619] msrs: 6 popping up in a console on my system when starting a guest. Signed-off-by: Avi Kivity Index: linux-2.6/drivers/kvm/vmx.c =================================================================== --- linux-2.6.orig/drivers/kvm/vmx.c +++ linux-2.6/drivers/kvm/vmx.c @@ -1153,7 +1153,7 @@ static int vmx_vcpu_setup(struct kvm_vcp vcpu->guest_msrs[j] = vcpu->host_msrs[j]; ++vcpu->nmsrs; } - printk("msrs: %d\n", vcpu->nmsrs); + printk(KERN_DEBUG "kvm: msrs: %d\n", vcpu->nmsrs); nr_good_msrs = vcpu->nmsrs - NR_BAD_MSRS; vmcs_writel(VM_ENTRY_MSR_LOAD_ADDR, Index: linux-2.6/drivers/kvm/svm.c =================================================================== --- linux-2.6.orig/drivers/kvm/svm.c +++ linux-2.6/drivers/kvm/svm.c @@ -990,7 +990,7 @@ static int io_interception(struct kvm_vc addr_mask = io_adress(vcpu, _in, &kvm_run->io.address); if (!addr_mask) { - printk("%s: get io address failed\n", __FUNCTION__); + printk(KERN_DEBUG "%s: get io address failed\n", __FUNCTION__); return 1; } @@ -1030,7 +1030,7 @@ static int invalid_op_interception(struc static int task_switch_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { - printk("%s: task swiche is unsupported\n", __FUNCTION__); + printk(KERN_DEBUG "%s: task swiche is unsupported\n", __FUNCTION__); kvm_run->exit_reason = KVM_EXIT_UNKNOWN; return 0; } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV