[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR21MB1688093876677DEE259C9914D7809@BYAPR21MB1688.namprd21.prod.outlook.com>
Date: Mon, 20 Mar 2023 18:16:37 +0000
From: "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
To: Saurabh Sengar <ssengar@...ux.microsoft.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>,
"arnd@...db.de" <arnd@...db.de>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: RE: [PATCH v3 4/5] x86/hyperv: VTL support for Hyper-V
From: Saurabh Sengar <ssengar@...ux.microsoft.com> Sent: Monday, March 20, 2023 3:04 AM
>
[snip]
> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index 35b16b177035..4af218e70395 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -11,6 +11,10 @@
> #include <asm/paravirt.h>
> #include <asm/mshyperv.h>
>
> +#define HV_VTL_NORMAL 0x0
> +#define HV_VTL_SECURE 0x1
> +#define HV_VTL_MGMT 0x2
> +
> union hv_ghcb;
>
> DECLARE_STATIC_KEY_FALSE(isolation_type_snp);
> @@ -272,6 +276,12 @@ static inline int hv_set_mem_host_visibility(unsigned long
> addr, int numpages,
> #endif /* CONFIG_HYPERV */
>
>
> +#ifdef CONFIG_HYPERV_VTL_MODE
Hmmm. CONFIG_HYPERV_VTL_MODE isn't defined until Patch 5 of this series.
I guess this works because of #ifdef behavior with non-existent values, but
it is a little bit weird to be referencing a CONFIG_ option that hasn't been
defined yet.
> +void __init hv_vtl_init_platform(void);
> +#else
> +static inline void __init hv_vtl_init_platform(void) {}
> +#endif
> +
> #include <asm-generic/mshyperv.h>
>
> #endif
> diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
> index 61363ce0b335..0dd385cdc332 100644
> --- a/arch/x86/kernel/cpu/mshyperv.c
> +++ b/arch/x86/kernel/cpu/mshyperv.c
> @@ -520,6 +520,7 @@ static void __init ms_hyperv_init_platform(void)
>
> /* Register Hyper-V specific clocksource */
> hv_init_clocksource();
> + hv_vtl_init_platform();
> #endif
> /*
> * TSC should be marked as unstable only after Hyper-V
> --
> 2.34.1
Powered by blists - more mailing lists