Re: Use CPUID to communicate with the hypervisor.

From: H. Peter Anvin
Date: Mon Sep 29 2008 - 14:06:44 EST


Alok Kataria wrote:
Shouldn't you check the hypervisor signature here?

Nope the whole idea of not checking the hypervisor signature is that we
should keep this interface generic.

Unfortunately, given current evidence this is entirely unrealistic.

So for instance right now, VMware has defined 40000010 leaf, if either
kvm/xen think it could be useful they could just define that leaf to
return nonzero value and the kernel will start using it for them.
Likewise, if in future either kvm/xen come up with a need to define a
new CPUID leaf they can define the semantics for that leaf, and the
corresponding kernel side stuff. If VMware, think that this new leaf is
useful, we can then support that leaf in our hypervisor or return zero
otherwise.

This is only true if you can also except M$ and other hypervisor vendors to stick to it. So far, hypervisor vendors have hardly shown any inclination toward standardization.

Hence I really don't think it is sane.

-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/