[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/3] vvmx: return VMfail to L1 if L1 vmxon is executed in VMX operation



On Tue, Dec 13, 2016 at 08:16:19PM +0800, Haozhong Zhang wrote:
> According to Intel SDM, section "VMXON - Enter VMX Operation", a
> VMfail should be returned to L1 hypervisor if L1 vmxon is executed in
> VMX operation, rather than just print a warning message.

The spec also says to return value 15? But I suppose that means
the TOOD in vmreturn should be implemented?

> 
> Signed-off-by: Haozhong Zhang <haozhong.zhang@xxxxxxxxx>
> ---
>  xen/arch/x86/hvm/vmx/vvmx.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> index f5637eb..b60d7f0 100644
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -1397,9 +1397,12 @@ int nvmx_handle_vmxon(struct cpu_user_regs *regs)
>          return rc;
>  
>      if ( nvmx_vcpu_in_vmx(v) )
> -        gdprintk(XENLOG_WARNING, 
> -                 "vmxon again: orig %"PRIpaddr" new %lx\n",
> -                 nvmx->vmxon_region_pa, gpa);
> +    {
> +        vmreturn(regs,
> +                 nvcpu->nv_vvmcxaddr != VMCX_EADDR ?
> +                 VMFAIL_VALID : VMFAIL_INVALID);
> +        return X86EMUL_OKAY;
> +    }
>  
>      nvmx->vmxon_region_pa = gpa;
>  
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.