Re: [PATCH] X86: __set_clr_pte_enc() miscalculates physical address

2021-03-23 Thread Greg KH
On Mon, Mar 22, 2021 at 04:02:11PM -0500, Tom Lendacky wrote: > On 3/18/21 3:26 PM, Isaku Yamahata wrote: > > __set_clr_pte_enc() miscalculates physical address to operate. > > pfn is in unit of PG_LEVEL_4K, not PGL_LEVEL_{2M, 1G}. > > Shift size to get physical address should be PAGE_SHIFT, > > no

Re: [PATCH] X86: __set_clr_pte_enc() miscalculates physical address

2021-03-22 Thread Tom Lendacky
On 3/18/21 3:26 PM, Isaku Yamahata wrote: > __set_clr_pte_enc() miscalculates physical address to operate. > pfn is in unit of PG_LEVEL_4K, not PGL_LEVEL_{2M, 1G}. > Shift size to get physical address should be PAGE_SHIFT, > not page_level_shift(). > > Fixes: dfaaec9033b8 ("x86: Add support for ch

Re: [PATCH] X86: __set_clr_pte_enc() miscalculates physical address

2021-03-18 Thread Greg KH
On Thu, Mar 18, 2021 at 01:26:57PM -0700, Isaku Yamahata wrote: > __set_clr_pte_enc() miscalculates physical address to operate. > pfn is in unit of PG_LEVEL_4K, not PGL_LEVEL_{2M, 1G}. > Shift size to get physical address should be PAGE_SHIFT, > not page_level_shift(). > > Fixes: dfaaec9033b8 ("x

[PATCH] X86: __set_clr_pte_enc() miscalculates physical address

2021-03-18 Thread Isaku Yamahata
__set_clr_pte_enc() miscalculates physical address to operate. pfn is in unit of PG_LEVEL_4K, not PGL_LEVEL_{2M, 1G}. Shift size to get physical address should be PAGE_SHIFT, not page_level_shift(). Fixes: dfaaec9033b8 ("x86: Add support for changing memory encryption attribute in early boot") Re