Re: [PATCH 1/2] VMware guest detection for x86 and x86-64

From: H. Peter Anvin
Date: Thu Sep 25 2008 - 00:55:09 EST


Greg KH wrote:

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?


We pretty much have to, just as we have to work around bugs in, say, AMD's microcode. We have avoided it so far, but it's gotten to a breaking point, and rather than having ad hoc hacks scattered all over the place I want a centralized test site setting a single global variable.

Unfortunately, hypervisor vendors haven't adopted a uniform detection scheme (CPUID level 0x40000000 is sometimes mentioned as a pseudo-standard, but it's not universal, and not all virtualization solutions even can override CPUID.)

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/