On 06/11/18 12:07, Sergey Dyasli wrote:
> diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> index dfd08e2d0a..c8bc8e6d11 100644
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -57,6 +57,16 @@ void nvmx_cpu_dead(unsigned int cpu)
> per_cpu(vvmcs_buf, cpu) = NULL;
> }
>
> +/* This function initialises fields that are not 0 by default */
> +void nvmx_vcpu_preinit(struct vcpu *v)
> +{
> + struct nestedvmx *nvmx = &vcpu_2_nvmx(v);
> + struct nestedvcpu *nvcpu = &vcpu_nestedhvm(v);
> +
> + nvmx->vmxon_region_pa = INVALID_PADDR;
> + nvcpu->nv_vvmcxaddr = INVALID_PADDR;
vmxon_region_pa is VT-x specific, but nv_vvmcxaddr is common. Instead
of adding yet another function which will be folded eventually, I'd just
fix hvm_vcpu_initialise() (which is where this code will eventually move).
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel