[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080924131018.GA17256@yantp.cn.ibm.com>
Date: Wed, 24 Sep 2008 21:10:19 +0800
From: Yan Li <elliot.li.tech@...il.com>
To: Laurent Vivier <Laurent.Vivier@...l.net>
Cc: Yan Li <elliot.li.tech@...il.com>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
joerg.roedel@....com, rjmaomao@...il.com,
Yinghai Lu <yhlu.kernel@...il.com>,
Thomas Gleixner <tglx@...utronix.de>, nancydreaming@...il.com
Subject: Re: [PATCH 2/2] Suppress false "mtrr all empty" warning message
when running as VMware guest
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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists