revisit rdtscp exclusion on xen
When determining the means by which a TSC reading is performed, the i86pc boot logic explicitly prevents Xen systems from using rdtscp:
/* ... * * The Xen hypervisor does not correctly report whether rdtscp is * supported or not, so we must assume that it is not. */ if ((get_hwenv() & HW_XEN_HVM) == 0 && is_x86_feature(x86_featureset, X86FSET_TSCP)) patch_tsc_read(TSC_TSCP); ...
Looking at the corresponding logic on Linux and FreeBSD, I see no such exclusion. Some initial searches for bug reports or changes relating to rdtscp on Xen suggests that it did improperly advertise that capability for a period, with some evidence suggesting 2007-2009. Indeed, there is chatter on the xen-devel list in 2009 about adding handling for the TSC_AUX MSR, which would be required for RDTSCP to function properly in a guest. Given its utility, it's likely that RDTSCP is advertised properly and working as desired on modern Xen platforms and is safe to use there. This should be confirmed (testing on AWS, for example) and perhaps we could lift the restriction.
No data to display