#include "arm-powerctl.h"
#include "target/arm/cpu.h"
#include "target/arm/internals.h"
+#include "target/arm/multiprocessing.h"
+#include "target/arm/gtimer.h"
#include "trace/trace-target_arm_hvf.h"
#include "migration/vmstate.h"
static void hvf_psci_cpu_off(ARMCPU *arm_cpu)
{
- int32_t ret = arm_set_cpu_off(arm_cpu->mp_affinity);
+ int32_t ret = arm_set_cpu_off(arm_cpu_mp_affinity(arm_cpu));
assert(ret == QEMU_ARM_POWERCTL_RET_SUCCESS);
}
int32_t ret = 0;
trace_hvf_psci_call(param[0], param[1], param[2], param[3],
- arm_cpu->mp_affinity);
+ arm_cpu_mp_affinity(arm_cpu));
switch (param[0]) {
case QEMU_PSCI_0_2_FN_PSCI_VERSION:
* sleeping.
*/
qatomic_set_mb(&cpu->thread_kicked, false);
- qemu_mutex_unlock_iothread();
+ bql_unlock();
pselect(0, 0, 0, 0, ts, &cpu->accel->unblock_ipi_mask);
- qemu_mutex_lock_iothread();
+ bql_lock();
}
static void hvf_wfi(CPUState *cpu)
flush_cpu_state(cpu);
- qemu_mutex_unlock_iothread();
+ bql_unlock();
assert_hvf_ok(hv_vcpu_run(cpu->accel->fd));
/* handle VMEXIT */
uint32_t ec = syn_get_ec(syndrome);
ret = 0;
- qemu_mutex_lock_iothread();
+ bql_lock();
switch (exit_reason) {
case HV_EXIT_REASON_EXCEPTION:
/* This is the main one, handle below. */