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

Re: [Xen-devel] Xen 4.4 Testing: Platform Op XENPF_microcode_update Leaves VCPU Lock Set?



On Thu, 2014-04-24 at 09:35 -0400, John McDermott wrote:
> Xen Developers,
> 
> In arch/x86/platform_hypercall.c, in function do_platform_op, the case
> XENPF_microcode_update appears to leave the vcpu_alloc_lock set when
> creating a hypercall continuation,

Are you referring to:
       /*
         * alloc_vcpu() will access data which is modified during
         * microcode update
         */
        while ( !spin_trylock(&vcpu_alloc_lock) )
        {
            if ( hypercall_preempt_check() )
            {
                ret = hypercall_create_continuation(
                    __HYPERVISOR_platform_op, "h", u_xenpf_op);
                goto out;
            }
        }
?

Notice that the continuation is inside the !spin_trylock loop -- IOW it
will only reach that point with the lock *not* held. If spin_trylock
succeeds in taking the lock then we don't go into the loop body.

Ian.


_______________________________________________
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®.