lkml.org 
[lkml]   [2022]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/mm/cpa: Generalize __set_memory_enc_pgtable()
From


On 2/23/22 06:38, Borislav Petkov wrote:
...

> +static void amd_enc_status_change_prepare(unsigned long vaddr, int npages, bool enc)
> +{
> +}
> +
> +static bool amd_enc_status_change_finish(unsigned long vaddr, int npages, bool enc)
> +{
> + if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
> + return false;
^^^^^

We should return true otherwise set_memory_{decrypt,encrypt} will fail
for the SME case.

thanks

\
 
 \ /
  Last update: 2022-02-23 15:34    [W:0.049 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site