RE: [PATCH 9/9] x86/hyperv: Remove hv_isolation_type_en_snp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Dexuan Cui <decui@xxxxxxxxxxxxx>
> Sent: Friday, August 11, 2023 3:19 PM
> To: ak@xxxxxxxxxxxxxxx; arnd@xxxxxxxx; bp@xxxxxxxxx;
> ...
> In ms_hyperv_init_platform(), do not distinguish between a SNP VM with
> the paravisor and a SNP VM without the paravisor.
> 
> Replace hv_isolation_type_en_snp() with
> !hyperv_paravisor_present && hv_isolation_type_snp().
> 
> The hv_isolation_type_en_snp() in drivers/hv/hv.c and
> drivers/hv/hv_common.c can be changed to hv_isolation_type_snp() since
> we know !hyperv_paravisor_present is true there.
> 
> Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx>

Some of the existing hv_isolation_type_snp()'s need to test 
hyperv_paravisor_present as well, e.g.

diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
@@ -52,7 +52,7 @@ static int hyperv_init_ghcb(void)
 	void *ghcb_va;
 	void **ghcb_base;
 
-	if (!hv_isolation_type_snp())
+	if (!hyperv_paravisor_present || !hv_isolation_type_snp())
 		return 0;
 
 	if (!hv_ghcb_pg)

The new version of this patch is here:
https://github.com/dcui/tdx/commit/323de396984e3c222ded23dce46155ae48a1992a

After Tianyu posts his v6 of the fully enlightened SNP patchset,
I'll rebase to his patchset and post v2.




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux