Message ID | 20210707153456.3976348-2-ltykernel@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | x86/Hyper-V: Add Hyper-V Isolation VM support | expand |
On Wed, Jul 07, Tianyu Lan wrote: > +++ b/include/asm-generic/mshyperv.h > @@ -34,8 +34,18 @@ struct ms_hyperv_info { > void __percpu **ghcb_base; It would be cool if the cover letter states which commit id this series is based on. Thanks, Olaf
Hi Olaf: On 7/8/2021 3:34 PM, Olaf Hering wrote: > On Wed, Jul 07, Tianyu Lan wrote: > >> +++ b/include/asm-generic/mshyperv.h >> @@ -34,8 +34,18 @@ struct ms_hyperv_info { > >> void __percpu **ghcb_base; > > It would be cool if the cover letter states which commit id this series is based on. Thanks for your reminder. I will add this in the later version. This patchset is rebased on Hyper-V next branch with Swiotlb “Restricted DMA“ patches from Claire Chang <tientzu@chromium.org> https://lore.kernel.org/lkml/20210624155526.2775863-1-tientzu@chromium.org/
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 10b2a8c10cb6..8aed689db621 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -334,6 +334,8 @@ static void __init ms_hyperv_init_platform(void) if (ms_hyperv.priv_high & HV_ISOLATION) { ms_hyperv.isolation_config_a = cpuid_eax(HYPERV_CPUID_ISOLATION_CONFIG); ms_hyperv.isolation_config_b = cpuid_ebx(HYPERV_CPUID_ISOLATION_CONFIG); + ms_hyperv.shared_gpa_boundary = + (u64)1 << ms_hyperv.shared_gpa_boundary_bits; pr_info("Hyper-V: Isolation Config: Group A 0x%x, Group B 0x%x\n", ms_hyperv.isolation_config_a, ms_hyperv.isolation_config_b); diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h index 3ae56a29594f..2914e27b0429 100644 --- a/include/asm-generic/mshyperv.h +++ b/include/asm-generic/mshyperv.h @@ -34,8 +34,18 @@ struct ms_hyperv_info { u32 max_vp_index; u32 max_lp_index; u32 isolation_config_a; - u32 isolation_config_b; + union { + u32 isolation_config_b; + struct { + u32 cvm_type : 4; + u32 Reserved11 : 1; + u32 shared_gpa_boundary_active : 1; + u32 shared_gpa_boundary_bits : 6; + u32 Reserved12 : 20; + }; + }; void __percpu **ghcb_base; + u64 shared_gpa_boundary; }; extern struct ms_hyperv_info ms_hyperv;