aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
Diffstat (limited to 'accel')
-rw-r--r--accel/hvf/hvf-accel-ops.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
index 9c3da03c94..7db9d3099e 100644
--- a/accel/hvf/hvf-accel-ops.c
+++ b/accel/hvf/hvf-accel-ops.c
@@ -372,19 +372,19 @@ type_init(hvf_type_init);
static void hvf_vcpu_destroy(CPUState *cpu)
{
- hv_return_t ret = hv_vcpu_destroy(cpu->hvf->fd);
+ hv_return_t ret = hv_vcpu_destroy(cpu->accel->fd);
assert_hvf_ok(ret);
hvf_arch_vcpu_destroy(cpu);
- g_free(cpu->hvf);
- cpu->hvf = NULL;
+ g_free(cpu->accel);
+ cpu->accel = NULL;
}
static int hvf_init_vcpu(CPUState *cpu)
{
int r;
- cpu->hvf = g_malloc0(sizeof(*cpu->hvf));
+ cpu->accel = g_new0(AccelCPUState, 1);
/* init cpu signals */
struct sigaction sigact;
@@ -393,18 +393,19 @@ static int hvf_init_vcpu(CPUState *cpu)
sigact.sa_handler = dummy_signal;
sigaction(SIG_IPI, &sigact, NULL);
- pthread_sigmask(SIG_BLOCK, NULL, &cpu->hvf->unblock_ipi_mask);
- sigdelset(&cpu->hvf->unblock_ipi_mask, SIG_IPI);
+ pthread_sigmask(SIG_BLOCK, NULL, &cpu->accel->unblock_ipi_mask);
+ sigdelset(&cpu->accel->unblock_ipi_mask, SIG_IPI);
#ifdef __aarch64__
- r = hv_vcpu_create(&cpu->hvf->fd, (hv_vcpu_exit_t **)&cpu->hvf->exit, NULL);
+ r = hv_vcpu_create(&cpu->accel->fd,
+ (hv_vcpu_exit_t **)&cpu->accel->exit, NULL);
#else
- r = hv_vcpu_create((hv_vcpuid_t *)&cpu->hvf->fd, HV_VCPU_DEFAULT);
+ r = hv_vcpu_create((hv_vcpuid_t *)&cpu->accel->fd, HV_VCPU_DEFAULT);
#endif
cpu->vcpu_dirty = 1;
assert_hvf_ok(r);
- cpu->hvf->guest_debug_enabled = false;
+ cpu->accel->guest_debug_enabled = false;
return hvf_arch_init_vcpu(cpu);
}