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

Re: [Xen-devel] [PATCH] kexec: Add spinlock for the whole hypercall



>>> On 11.04.17 at 13:24, <daniel.kiper@xxxxxxxxxx> wrote:
> On Tue, Apr 11, 2017 at 01:46:37AM -0600, Jan Beulich wrote:
>> >>> On 10.04.17 at 21:44, <eric.devolder@xxxxxxxxxx> wrote:
>> wouldn't it be better to handle this with a static state variable,
>> which gets checked/set atomically, and which if already set simply
>> leads to a continuation being arranged for?
> 
> Do you think about something like that:
> 
> if ( test_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags) && 
> hypercall_preempt_check() )
>     return hypercall_create_continuation(__HYPERVISOR_kexec_op, "h", uarg);

Well, minus the hypercall_preempt_check() call of course. And I'd
expect this to be a test_and_set_bit().

Jan


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

 


Rackspace

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