From: Ingo Molnar <mingo@kernel.org>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org, Avi Kivity <avi@redhat.com>,
Gleb Natapov <gleb@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
Marcelo Tostatti <mtosatti@redhat.com>,
Ingo Molnar <mingo@redhat.com>,
kvm@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] x86, add hypervisor name to dump_stack()
Date: Wed, 24 Oct 2012 14:58:29 +0200 [thread overview]
Message-ID: <20121024125829.GA22534@gmail.com> (raw)
In-Reply-To: <5087DBD9.9010707@redhat.com>
* Prarit Bhargava <prarit@redhat.com> wrote:
> > Looks useful, but please don't waste a full new line on it
> > but embedd it in the already existing status line that
> > prints details like release and version.
>
> Ingo, I thought about doing that but since x86_hyper can be
> NULL (... maybe it should initialized to "Bare-metal" or "No
> Hypervisor"?) I didn't want to break up the printk line. I'll
> look into doing it a different way...
You don't have to break it up - just initialize a name string
to:
const char *machine_name = "x86";
const char *kernel_type = "native";
if (x86_hyperv) {
machine_name = x86_hyperv->name;
kernel_type = "guest";
}
And print it as:
"[%s %s kernel]", machine_name, kernel_type
That way we'll get nice:
... [x86 native kernel]
... [KVM guest kernel]
... [Xen guest kernel]
etc.
Printouts. Please use the naming I outlined above, that's how we
refer to these kernels within arch/x86/.
(The above code is pseudocode, untested.)
Thanks,
Ingo
prev parent reply other threads:[~2012-10-24 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 14:27 [PATCH] x86, add hypervisor name to dump_stack() Prarit Bhargava
2012-10-24 9:49 ` Ingo Molnar
2012-10-24 12:15 ` Prarit Bhargava
2012-10-24 12:58 ` Ingo Molnar [this message]
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=20121024125829.GA22534@gmail.com \
--to=mingo@kernel.org \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=prarit@redhat.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).