lkml.org 
[lkml]   [2023]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH V3 07/16] drivers: hv: Decrypt percpu hvcall input arg page in sev-snp enlightened guest
From
On 2/1/2023 2:02 AM, Michael Kelley (LINUX) wrote:
>> @@ -134,6 +136,17 @@ int hv_common_cpu_init(unsigned int cpu)
>> if (!(*inputarg))
>> return -ENOMEM;
>>
>> + if (hv_isolation_type_en_snp()) {
>> + ret = set_memory_decrypted((unsigned long)*inputarg, pgcount);
> You used "pgcount" here in response to a comment on v2 of the
> patch. But the corresponding re-encryption in hv_common_cpu_die()
> uses a fixed value of "1". The two cases should be consistent. Either
> assert that hv_root_partition will never be true in an SNP VM, in which
> case hard coding "1" is OK. Or properly calculate the number of pages
> in both cases so they are consistent.
>

Agree. We should keep the logic in both hv_common_cpu_init() and
hv_common_cpu_die(). Will fix it.

\
 
 \ /
  Last update: 2023-03-27 00:08    [W:0.306 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site