|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 2/6] VMX: Properly handle pi when all the assigned devices are removed
On Wed, 2016-08-31 at 11:56 +0800, Feng Wu wrote:
> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -158,14 +158,12 @@ static void vmx_pi_switch_to(struct vcpu *v)
> pi_clear_sn(pi_desc);
> }
>
Not terribly important, but what about calling this:
> -static void vmx_pi_do_resume(struct vcpu *v)
> +static void vmx_pi_remove_vcpu_from_blocking_list(struct vcpu *v)
vmx_pi_list_del() or vmx_pi_list_remove()
> @@ -198,6 +196,21 @@ static void vmx_pi_do_resume(struct vcpu *v)
> spin_unlock_irqrestore(pi_blocking_list_lock, flags);
> }
>
> +static void vmx_pi_do_resume(struct vcpu *v)
> +{
> + ASSERT(!test_bit(_VPF_blocked, &v->pause_flags));
> +
> + vmx_pi_remove_vcpu_from_blocking_list(v);
> +}
> +
And this:
> +static void vmx_pi_blocking_cleanup(struct vcpu *v)
>
vmx_pi_list_cleanup()
etc.?
I.e., using shorter and more consistent names.
> +{
> + if ( !iommu_intpost )
> + return;
> +
At least as far as this patch is concerned, you are only calling this
function from vmx_pi_hooks_deassing() which already checks at the very
beginning iommu_intpost to be true, or it returns, and you won't get
here.
So you don't need to re-check the same thing here.
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |