xen-devel
Re: [Xen-devel] [PATCH 12 of 20] Add APIs to switch n1/n2 VMCS
At 16:57 +0800 on 02 Jun (1307033845), Eddie Dong wrote:
> diff -r 4631a9511200 -r 62cc6c7516e0 xen/arch/x86/hvm/vmx/vmcs.c
> --- a/xen/arch/x86/hvm/vmx/vmcs.c Thu Jun 02 16:33:20 2011 +0800
> +++ b/xen/arch/x86/hvm/vmx/vmcs.c Thu Jun 02 16:33:21 2011 +0800
> @@ -669,6 +669,38 @@ void vmx_disable_intercept_for_msr(struc
> }
> }
>
> +/*
> + * Switch VMCS between layer 1 & 2 guest
> + */
> +void vmx_vmcs_switch(struct vcpu *v,
> + struct vmcs_struct *from,
> + struct vmcs_struct *to)
> +{
> + /* no foreign access */
> + if ( unlikely(v != current) )
> + return;
> +
> + if ( unlikely(current->arch.hvm_vmx.vmcs != from) )
> + return;
Do you really want this function to fail silently if called with v !=
current? Use ASSERT(), or, even better, remove the first argument
entirely.
Cheers,
Tim.
--
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|