]> xenbits.xensource.com Git - people/royger/xen.git/commit
tools/libxc: Calculate xstate cpuid leaf from guest information
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 24 Nov 2015 14:49:49 +0000 (14:49 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Apr 2016 20:55:18 +0000 (21:55 +0100)
commit75f9455e9263289864b7b3e55579133807995de6
treecff15efc6719ac81a4a8b4990b9a7441ddbbb1a3
parent3e0c8272f200457d9a735070b66a0da808ac3924
tools/libxc: Calculate xstate cpuid leaf from guest information

The existing logic is broken for heterogeneous migration.  By always
advertising the host maximum xstate, a migration to a less capable host always
fails as Xen cannot accomodate the xcr0_accum in the migration stream.

By calculating xstate from the feature information (which a multi-host
toolstack will have levelled appropriately), the guest will have the current
hosts maximum xstate advertised, allowing for correct migration to less
capable hosts.

In addition, some further improvements and corrections:
 - don't discard the known flags in sub-leaves 2..63 ECX
 - zap sub-leaves beyond 62
 - zap all bits in leaf 1, EBX/ECX.  No XSS features are currently supported.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_cpuid_x86.c