(adding v8 tag to subject)

On 19.11.2025 20:32, Grygorii Strashko wrote:
> From: Sergiy Kibrik <[email protected]>
> 
> Add config option VIRIDIAN that covers viridian code within HVM.
> Calls to viridian functions guarded by is_viridian_domain() and related 
> macros.
> Having this option may be beneficial by reducing code footprint for systems
> that are not using Hyper-V.
> 
> [[email protected]: fixed NULL pointer deref in
> viridian_save_domain_ctxt(); stub viridian_vcpu/domain_init/deinit()]
> Signed-off-by: Sergiy Kibrik <[email protected]>
> Signed-off-by: Grygorii Strashko <[email protected]>
> Reviewed-by: Jason Andryuk <[email protected]> 

As before - this R-b likely would need dropping, ...

> ---
> changes in v8:
> - drop checks from viridian_load_vcpu/domain_ctxt()
> - drop check "value != 0" in HVM_PARAM_VIRIDIAN handler, laways return
>   -ENODEV for VIRIDIAN=n

... when more than just cosmetic changes are made. Jason, please can you
indicate whether it's fine to retain?

> --- a/xen/arch/x86/hvm/Makefile
> +++ b/xen/arch/x86/hvm/Makefile
> @@ -1,6 +1,6 @@
>  obj-$(CONFIG_AMD_SVM) += svm/
>  obj-$(CONFIG_INTEL_VMX) += vmx/
> -obj-y += viridian/
> +obj-$(CONFIG_VIRIDIAN) += viridian/

When committing, I'll likely take the liberty to also move the altered line
up, to restore proper alphabetical sorting here.

> --- a/xen/arch/x86/include/asm/hvm/viridian.h
> +++ b/xen/arch/x86/include/asm/hvm/viridian.h
> @@ -86,11 +86,26 @@ viridian_hypercall(struct cpu_user_regs *regs);
>  void viridian_time_domain_freeze(const struct domain *d);
>  void viridian_time_domain_thaw(const struct domain *d);
>  
> +#if defined(CONFIG_VIRIDIAN)

Similarly I'm likely going to take the liberty and change this to #ifdef,
just like you have it elsewhere.

Preferably with the adjustments:
Reviewed-by: Jan Beulich <[email protected]>

Jan

Reply via email to