[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks
Pausing the domain can make sure the vCPU is not running and hence calling the hooks simultaneously when deassigning the PI hooks. This makes sure that all the appropriate state of PI descriptor is actually set up for all vCPus before leaving this function. Signed-off-by: Feng Wu <feng.wu@xxxxxxxxx> --- xen/arch/x86/hvm/vmx/vmx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 37fa2f1..071c063 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -219,8 +219,19 @@ void vmx_pi_hooks_assign(struct domain *d) ASSERT(!d->arch.hvm_domain.vmx.vcpu_block); + /* + * Pausing the domain can make sure the vCPU is not + * running and hence calling the hooks simultaneously + * when deassigning the PI hooks. This makes sure that + * all the appropriate state of PI descriptor is actually + * set up for all vCPus before leaving this function. + */ + domain_pause(d); + d->arch.hvm_domain.vmx.vcpu_block = vmx_vcpu_block; d->arch.hvm_domain.vmx.pi_do_resume = vmx_pi_do_resume; + + domain_unpause(d); } /* This function is called when pcidevs_lock is held */ -- 2.1.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |