From: Yan Li <elliot.li.tech@gmail.com>
To: Laurent Vivier <Laurent.Vivier@bull.net>
Cc: Yan Li <elliot.li.tech@gmail.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>,
joerg.roedel@amd.com, rjmaomao@gmail.com,
Yinghai Lu <yhlu.kernel@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
nancydreaming@gmail.com
Subject: Re: [PATCH 2/2] Suppress false "mtrr all empty" warning message when running as VMware guest
Date: Wed, 24 Sep 2008 21:10:19 +0800 [thread overview]
Message-ID: <20080924131018.GA17256@yantp.cn.ibm.com> (raw)
In-Reply-To: <1222260854.4166.3.camel@frecb07144>
On Wed, Sep 24, 2008 at 02:54:14PM +0200, Laurent Vivier wrote:
> Le mercredi 24 septembre 2008 à 20:24 +0800, Yan Li a écrit :
> > +#ifdef CONFIG_VMWARE_GUEST_DETECT
> > + /* the "mtrr all blank" warning will be deferred until
> > + * after DMI scanning and we know the machine is not a
> > + * VMware guest
> > + */
> > + printk(KERN_INFO "CPU MTRRs all blank\n");
> > + return EMTRR_ALL_BLANK;
> > +#else
> > WARN(!kvm_para_available(), KERN_WARNING
> > "WARNING: strange, CPU MTRRs all blank?\n");
> > return 0;
> > +#endif
> > }
>
> perhaps something like:
>
> #ifdef CONFIG_VMWARE_GUEST_DETECT
> WARN(!kvm_para_available() && !is_vmware_guest(), KERN_WARNING
> "WARNING: strange, CPU MTRRs all blank?\n");
> #else
> WARN(!kvm_para_available(), KERN_WARNING
> "WARNING: strange, CPU MTRRs all blank?\n");
> ...
>
> ???
As stated in the comments: the warning has to be deferred. The reason
is that "is_vmware_guest()" replies on DMI and can only be used after
dmi_scan(). These mtrr codes here are run very early during
setup_arch() when the DMI is not available. So when I've detected all
MTRRs are blank, I returned a status code to setup_arch(), who will
call "is_vmware_guest()" later, after dmi_scan(), to decide whether to
issue a warning or not.
--
Li, Yan
"Everything that is really great and inspiring is created by the
individual who can labor in freedom."
- Albert Einstein, in Out of My Later Years (1950)
next prev parent reply other threads:[~2008-09-24 13:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a120cfa37281607d8dc361deda1a35419accd193.1222258080.git.elliot.li.tech@gmail.com>
2008-09-24 12:24 ` Yan Li
2008-09-24 12:54 ` Laurent Vivier
2008-09-24 13:10 ` Yan Li [this message]
2008-09-24 14:16 ` Joerg Roedel
2008-09-25 2:51 ` Yan Li
2008-09-24 16:39 ` Yinghai Lu
2008-09-25 2:52 ` Yan Li
2008-09-25 14:18 ` Yan Li
2008-09-25 17:13 ` Yinghai Lu
2008-09-26 9:50 ` Yan Li
2008-10-01 20:03 ` Pavel Machek
2008-10-05 12:05 ` Yan Li
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=20080924131018.GA17256@yantp.cn.ibm.com \
--to=elliot.li.tech@gmail.com \
--cc=Laurent.Vivier@bull.net \
--cc=hpa@zytor.com \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nancydreaming@gmail.com \
--cc=rjmaomao@gmail.com \
--cc=tglx@linutronix.de \
--cc=yhlu.kernel@gmail.com \
/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
all inboxes | Powered by JetHome®