mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
continue_hypercall_on_cpu() always defers execution of the continuation
...even when scheduled to run on the current physical cpu. This ensures that locks get dropped correctly before executing the continuation code, and also allows the original caller to determine whether the continuation has/will execute based on c_h_o_c()'s immediate return code. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
e6baf56c8c
commit
dcc9060e4a
2 files changed
+6
-4
No files matched your search
@@ -951,9 +951,6 @@ int continue_hypercall_on_cpu(
|
||||
if ( (cpu >= NR_CPUS) || !cpu_online(cpu) )
|
||||
return -EINVAL;
|
||||
|
||||
if ( cpu == smp_processor_id() )
|
||||
return func(data);
|
||||
|
||||
info = this_cpu(continue_info);
|
||||
if ( info == NULL )
|
||||
{
|
||||
|
||||
@@ -63,7 +63,12 @@ void arch_vcpu_reset(struct vcpu *v);
|
||||
bool_t domctl_lock_acquire(void);
|
||||
void domctl_lock_release(void);
|
||||
|
||||
/* Continue the current hypercall via func(data) on specified cpu. */
|
||||
/*
|
||||
* Continue the current hypercall via func(data) on specified cpu.
|
||||
* If this function returns 0 then the function is guaranteed to run at some
|
||||
* point in the future. If this function returns an error code then the
|
||||
* function has not been and will not be executed.
|
||||
*/
|
||||
int continue_hypercall_on_cpu(
|
||||
unsigned int cpu, long (*func)(void *data), void *data);
|
||||
|
||||
|
||||