2015-06-01 18:35:40

by Toshi Kani

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

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 <[email protected]>
> >
> > 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 <[email protected]>
> 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 <[email protected]>

Reviewed-by: Toshi Kani <[email protected]>

Thanks,
-Toshi