x86/cpuid: Offer ITSC to domains which are automatically non-migrateable
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 9 Jan 2017 12:54:55 +0000 (12:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Jan 2017 14:32:30 +0000 (14:32 +0000)
Dom0 doesn't have a toolstack to explicitly decide that ITSC is safe to offer.
For domains which are automatically built with disable_migrate set, offer ITSC
automatically.

This is important for HVM-based dom0, and for when cpuid faulting is imposed
on the control domain.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpuid.c

index ac2f34429c3ce771e3bbfb7456ade924adbf87c7..eb829d797ec4b4b3db5579b64bef344881dacf7d 100644 (file)
@@ -427,6 +427,9 @@ int init_domain_cpuid_policy(struct domain *d)
 
     *d->arch.cpuid = is_pv_domain(d) ? pv_max_policy : hvm_max_policy;
 
+    if ( d->disable_migrate )
+        d->arch.cpuid->extd.itsc = cpu_has_itsc;
+
     recalculate_cpuid_policy(d);
 
     for ( i = 0; i < MAX_CPUID_INPUT; i++ )