xen/arm: Misc improvements to do_common_cpu_on()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 24 Apr 2019 18:10:58 +0000 (19:10 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 13 May 2019 10:28:03 +0000 (11:28 +0100)
commit117bab9d7a270df90c540e984da18739022ce11e
tree4f81b01e346c3e50b42bcb615daab8c41bfa00e2
parent77639c903c97a0a5699686d236967f4c490230a5
xen/arm: Misc improvements to do_common_cpu_on()

 * Use domain_vcpu() rather than opencoding the lookup.  Amongst other things,
   domain_vcpu() is spectre-v1-safe.
 * Unlock the domain immediately after arch_set_info_guest() completes.  There
   is no need for free_vcpu_guest_context() to be within the critical region,
   and moving the call simplifies the error case.

No practical change in functionality.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/vpsci.c