In general, Invariant TSC is not a feature which can be advertised to guests,
because it cannot be guaranteed across migrate. domain_cpuid() goes so far as
to deliberately clobber the feature flag under a number of circumstances.
Because ITSC is absent from the static {pv,hvm}_featureset masks, c/s
b648feff
"xen/x86: Improvements to in-hypervisor cpuid sanity checks" caused ITSC to be
unconditionally masked out.
As an interim solution, include the hosts idea of ITSC along with the static
{pv,hvm}_featureset when restricting the guests view of features. This causes
the hardware domain, and VMs explicitly configured with ITSC and no-migrate to
be offered ITSC (subject to hardware availability).
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <JBeulich@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
break;
case 0x80000007:
- *edx &= hvm_featureset[FEATURESET_e7d];
+ *edx &= (hvm_featureset[FEATURESET_e7d] |
+ (host_featureset[FEATURESET_e7d] & cpufeat_mask(X86_FEATURE_ITSC)));
break;
case 0x80000008:
break;
case 0x80000007:
- d &= pv_featureset[FEATURESET_e7d];
+ d &= (pv_featureset[FEATURESET_e7d] |
+ (host_featureset[FEATURESET_e7d] & cpufeat_mask(X86_FEATURE_ITSC)));
break;
case 0x80000008: