On 29/02/2024 12:47 pm, Jan Beulich wrote: >> @@ -830,11 +846,10 @@ void recalculate_cpuid_policy(struct domain *d) >> } >> >> /* >> - * Allow the toolstack to set HTT, X2APIC and CMP_LEGACY. These bits >> + * Allow the toolstack to set HTT and CMP_LEGACY. These bits >> * affect how to interpret topology information in other cpuid leaves. >> */ >> __set_bit(X86_FEATURE_HTT, max_fs); >> - __set_bit(X86_FEATURE_X2APIC, max_fs); >> __set_bit(X86_FEATURE_CMP_LEGACY, max_fs); >> >> /* > ... these adjustments, just still in calculate_pv_featureset(). I > haven't gone further backwards to check if/when this exposure has > really appeared. I wouldn't be surprised if it's been like that > for all the time since we gained x2APIC support in the hypervisor.
4.7 has: cpufeatureset.h:140:XEN_CPUFEATURE(X2APIC, 1*32+21) /*!A Extended xAPIC */ so will expose it to PV guests. 4.6 has this gem I'd forgotten, in pv_cpuid(): if ( !cpu_has_apic ) __clear_bit(X86_FEATURE_X2APIC % 32, &c); but I don't see any (sensible) logic to hide x2APIC from the view of a PV guest. So PV guests really have see x2APIC from the host forever (and irrespective of Xen's x2APIC support). ~Andrew