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

Re: [Xen-devel] [PATCH 2/3] VMX: Make hook pi_do_resume always available



>>> On 20.05.16 at 10:53, <feng.wu@xxxxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -233,7 +233,6 @@ void vmx_pi_hooks_assign(struct domain *d)
>      d->arch.hvm_domain.vmx.vcpu_block = vmx_vcpu_block;
>      d->arch.hvm_domain.vmx.pi_switch_from = vmx_pi_switch_from;
>      d->arch.hvm_domain.vmx.pi_switch_to = vmx_pi_switch_to;
> -    d->arch.hvm_domain.vmx.pi_do_resume = vmx_pi_do_resume;
>  }
>  
>  /* This function is called when pcidevs_lock is held */
> @@ -247,13 +246,14 @@ void vmx_pi_hooks_deassign(struct domain *d)
>      d->arch.hvm_domain.vmx.vcpu_block = NULL;
>      d->arch.hvm_domain.vmx.pi_switch_from = NULL;
>      d->arch.hvm_domain.vmx.pi_switch_to = NULL;
> -    d->arch.hvm_domain.vmx.pi_do_resume = NULL;
>  }
>  
>  static int vmx_domain_initialise(struct domain *d)
>  {
>      int rc;
>  
> +    d->arch.hvm_domain.vmx.pi_do_resume = vmx_pi_do_resume;
> +
>      if ( !has_vlapic(d) )
>          return 0;

Along the lines of what I said last in for 1/3: There's no need to
always install the hook. For your purpose it ought to suffice to
simply not zap it upon device de-assign (which would still leave
all VMs without passed through devices without such useless to
them hook in place).

Jan


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

 


Rackspace

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