@@ -134,6 +136,17 @@ int hv_common_cpu_init(unsigned int cpu)You used "pgcount" here in response to a comment on v2 of the
if (!(*inputarg))
return -ENOMEM;
+ if (hv_isolation_type_en_snp()) {
+ ret = set_memory_decrypted((unsigned long)*inputarg, pgcount);
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.