Problem with auto-detecting a HV environment from within Linux

Greg KH greg at kroah.com
Thu Feb 25 16:44:36 UTC 2010


Hi guys,

In looking at the HV code, there doesn't seem to be a way to
automatically detect if we are running in a HV environment in order to
know to load the drivers in the first place.

Normally, we trigger off of things like PCI ids, or some other
externally visible id to know if we can properly load the drivers.

This also is a problem for distros, as they need to know to include the
drivers or not, through their device update processes (i.e. rpm and
install tools can detect pci dependancies of a machine to know to set
things properly.)

So, is there a way to "know" ahead of time if we are in a HV guest
environment?  I was told that there is a Microsoft VGA adapter that is
exposed to the guest, could we trigger off of this device?  Or is there
some other unique PCI id that we could use?

thanks,

greg k-h



More information about the devel mailing list