All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] Add loglevels to all printk()s
Date: Wed, 29 Nov 2006 14:11:01 -0800	[thread overview]
Message-ID: <adahcwhrjii.fsf@cisco.com> (raw)

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.

---

--- kvm-5/kernel/vmx.c	2006-11-28 05:35:33.000000000 -0800
+++ kvm-5.new/kernel/vmx.c	2006-11-29 13:43:18.000000000 -0800
@@ -1153,7 +1153,7 @@
 		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,
--- kvm-5/kernel/svm.c	2006-11-28 05:10:47.000000000 -0800
+++ kvm-5.new/kernel/svm.c	2006-11-29 13:43:56.000000000 -0800
@@ -990,7 +990,7 @@
 
 		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 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

             reply	other threads:[~2006-11-29 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 22:11 Roland Dreier [this message]
     [not found] ` <adahcwhrjii.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2006-11-30  8:59   ` [PATCH] Add loglevels to all printk()s Avi Kivity
     [not found]     ` <456E9D54.50306-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-30 14:49       ` Roland Dreier

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=adahcwhrjii.fsf@cisco.com \
    --to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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.