]> xenbits.xensource.com Git - people/royger/xen.git/commit
x86/viridian: don't put Xen version information in CPUID leaf 2
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 23 Mar 2017 14:51:14 +0000 (15:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 23 Mar 2017 14:51:14 +0000 (15:51 +0100)
commit422db534e80869aef8a89e220604c17ae4bea8a0
treec75921c7e6fee92975a0a37dd1bfc4828941a6a3
parentfd9ca53f6669a7bef6ed4b22b3bcfe634a5abf74
x86/viridian: don't put Xen version information in CPUID leaf 2

The Hypervisor Top Level Functional Specification v5.0a states in section
2.5:

"The hypervisor version information is encoded in leaf 0x40000002. Two
version numbers are provided: the main version and the service version.
The main version includes a major and minor version number and a build
number. These correspond to Microsoft Windows release numbers."

It also goes on to advise clients (i.e. guest versions of Windows) to use
the following algorithm to determine compatibility with the hypervisor
enlightenments:

if <your-main-version> greater than <hypervisor-main-version>
{
your version is compatible
}
else if <your-main-version> equal to <hypervisor-main-version> and
 <your-service-version> greater than or equal to <hypervisor-service-version>
{
your version is compatible
}
else
{
your version is NOT compatible
}

So, clearly putting Xen hypervisor version information in that leaf is
spurious, but we probably get away with it because Xen's major version
is lower than the major version of Windows in which Hyper-V first
appeared (Server 2008).

This patch changes the leaf to use the kernel major and minor
versions, and build number from Windows Server 2008 (64-bit) by default.
These default values can be overriden from the Xen command line using new
'viridian-version' parameter.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
docs/misc/xen-command-line.markdown
xen/arch/x86/hvm/viridian.c