On 8/2/2023 5:16 PM, Wei Liu wrote: > On Thu, Jul 27, 2023 at 12:54:44PM -0700, Nuno Das Neves wrote: >> This is a more flexible approach for determining whether to allocate the >> output page. > >> This will be used in both mshv_vtl and root partition. >> >> Signed-off-by: Nuno Das Neves <nunodasneves@xxxxxxxxxxxxxxxxxxx> >> --- >> drivers/hv/hv_common.c | 30 +++++++++++++++++++++++++----- >> 1 file changed, 25 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c >> index 99d9b262b8a7..16f069beda78 100644 >> --- a/drivers/hv/hv_common.c >> +++ b/drivers/hv/hv_common.c >> @@ -57,6 +57,18 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg); >> void * __percpu *hyperv_pcpu_output_arg; >> EXPORT_SYMBOL_GPL(hyperv_pcpu_output_arg); >> >> +/* >> + * Determine whether output arg is in use, for allocation/deallocation >> + */ >> +static bool hv_output_arg_exists(void) >> +{ >> + bool ret = hv_root_partition ? true : false; >> +#ifdef CONFIG_MSHV_VTL >> + ret = true; >> +#endif > > This should not be here. As far as I can tell, CONFIG_MSHV_VTL is > introduced in a later patch. > Ok, I will introduce this #ifdef with the mshv_vtl module. > The rest looks okay. > > Thanks, > Wei.