lkml.org 
[lkml]   [2008]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-09-24 15:13    [W:0.093 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site