Re: [PATCH 2/4] x86/pat: Merge pat_init_cache_modes() into its caller

From: Toshi Kani
Date: Mon Jun 01 2015 - 14:35:57 EST


On Sun, 2015-05-31 at 12:23 +0200, Borislav Petkov wrote:
> On Sun, May 31, 2015 at 11:48:04AM +0200, Borislav Petkov wrote:
> > From: Borislav Petkov <bp@xxxxxxx>
> >
> > This way we can pass pat MSR value directly.
>
> This breaks xen as that function is used there, doh. :-\
>
> JÃrgen,
>
> can you check the enlighten.c changes below please?
>
> I'm reading xen's PAT config from MSR_IA32_CR_PAT and handing it down to
> pat_init_cache_modes(). That shouldn't change current behavior AFAICT
> because pat_init_cache_modes() did it itself before.
>
> Right?
>
> Thanks.
>
> ---
> Author: Borislav Petkov <bp@xxxxxxx>
> Date: Sat May 30 13:09:55 2015 +0200
>
> x86/pat: Emulate PAT when it is disabled
>
> In the case when PAT is disabled on the command line with "nopat" or
> when virtualization doesn't support PAT (correctly) - see
>
> 9d34cfdf4796 ("x86: Don't rely on VMWare emulating PAT MSR correctly").
>
> we emulate it using the PWT and PCD cache attribute bits. Get rid of
> boot_pat_state while at it.
>
> Based on a conglomerate patch from Toshi Kani.
>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>

Reviewed-by: Toshi Kani <toshi.kani@xxxxxx>

Thanks,
-Toshi



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/