Re: [tip:x86/urgent] x86/PAT: Fix Xorg regression on CPUs that don't support PAT

From: Junichi Nomura
Date: Wed May 31 2017 - 05:47:46 EST


On 05/31/17 02:59, Mikulas Patocka wrote:
>>> 2. use the PAT patch and revert the change to the function pat_ap_init
>>> - i.e. change it to the original:
>>> static void pat_ap_init(u64 pat)
>>> {
>>> if (!boot_cpu_has(X86_FEATURE_PAT)) {
>>
>> Joy.
>
> It is interesting - does it mean that the boot cpu does have PAT and the
> secondary CPUs don't?

It seems pat_init() is called twice for boot cpu, from mtrr_bp_pat_init()
and generic_set_all(). The 2nd call ends up calling pat_ap_init() and it's
before boot_cpu_data is copied to cpu_data[0].

--
Jun'ichi Nomura, NEC Corporation / NEC Solution Innovators, Ltd.