[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/cpuid: Fix feature flags reported to dom0



>>> On 12.01.17 at 20:55, <andrew.cooper3@xxxxxxxxxx> wrote:
> c/s a11e8c9 "x86/pv: Use per-domain policy information in pv_cpuid()" switched
> PV domains from using a (hardware for dom0, toolstack-chosen from domU) value
> masked against pv_featureset[], to actually using the value calculated by
> recalculate_cpuid_policy().
> 
> For domU, this is no practical change as the content is still chosen by the
> toolstack.  For dom0 however, we no longer have two sources of information
> potentially clearing bits.  Modern Linux seems to care about having CMP_LEGACY
> set in its view of CPUID on an Intel box.
> 
> The deliberate setting of HTT, X2APIC and CMP_LEGACY in {pv,hvm}_featureset[]
> is necessary for domUs, as the toolstack may have (tried to) set up topology
> information in a different representation than the hardware uses.  The bits
> therefore needed to be set in the masks used in the older logic, to avoid
> clobbering the toolstacks information.
> 
> Move the HTT/X2APIC/CMP_LEGACY logic from calculate_{pv,hvm}_max_policy()
> (where the meaning of {pv,hvm}_featureset[] has changed subtly) to
> recalculate_cpuid_policy() where the masking logic now lives.
> 
> This will cause {pv,hvm}_max_policy to actually contain real hardware values
> (so dom0 sees real hardware values), but still allows the toolstack to set
> bits not present in real hardware for domUs.
> 
> Reported-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Tested-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.