[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080925025550.GA15249@kroah.com>
Date: Wed, 24 Sep 2008 19:55:50 -0700
From: Greg KH <greg@...ah.com>
To: Yan Li <elliot.li.tech@...il.com>
Cc: 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 1/2] VMware guest detection for x86 and x86-64
On Thu, Sep 25, 2008 at 10:47:48AM +0800, Yan Li wrote:
> On Wed, Sep 24, 2008 at 07:23:25PM -0700, Greg KH wrote:
> > On Wed, Sep 24, 2008 at 08:22:10PM +0800, Yan Li wrote:
> > > Detects whether we are running as a VMware guest or not. Detection is
> > > based upon DMI vendor string.
> > >
> > > It provides a function:
> > > int is_vmware_guest(void)
> > > that can be used easily to detect if we are running as a VMware guest
> > > or not.
> >
> > Why do we need to do this within the kernel, what is that going to
> > achieve?
> >
> > People can do this easily in userspace if they need to detect this, I
> > think there's a patch for util-linux-ng adding such a simple utility
> > that handles almost all of the known virtualization engines right now.
>
> Hi Greg,
>
> For me this is used in the next patch (for mtrr/main.c) to suppress an
> unnecessary warning when running as a VMware guest:
> http://lkml.org/lkml/2008/9/24/144
But that has been stated it's a vmware bug, not a kernel bug :)
> We already have code to suppress warning under KVM so the above patch
> suppress warnings for VMware guest also.
>
> H. Peter Anvin and Alok kataria are also proposing we may need a more
> general approach for detecting hypervisors that can be used for some
> other quirks.
Well, having a config option like this isn't the way to go as it will be
forced on for all distros and users anyway.
A simple cpuid test is the easier way to do this, that's what the
userspace tools do, if it's really needed in the kernel. But hopefully,
such things shouldn't be needed within the kernel as it's not Linux's
fault that the hypervisor has bugs in it :)
We wouldn't be wanting to work around bugs in Microsoft's hypervisor,
would we?
thanks,
greg k-h
--
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