hax_fd hax_vcpu_get_fd(CPUArchState *env)
{
- struct hax_vcpu_state *vcpu = env_cpu(env)->hax_vcpu;
+ struct hax_vcpu_state *vcpu = env_cpu(env)->accel;
if (!vcpu) {
return HAX_INVALID_FD;
}
int hax_vcpu_destroy(CPUState *cpu)
{
- struct hax_vcpu_state *vcpu = cpu->hax_vcpu;
+ struct hax_vcpu_state *vcpu = cpu->accel;
if (!hax_global.vm) {
fprintf(stderr, "vcpu %x destroy failed, vm is null\n", vcpu->vcpu_id);
CloseHandle(cpu->hThread);
#endif
g_free(vcpu);
- cpu->hax_vcpu = NULL;
+ cpu->accel = NULL;
return 0;
}
exit(-1);
}
- cpu->hax_vcpu = hax_global.vm->vcpus[cpu->cpu_index];
+ cpu->accel = hax_global.vm->vcpus[cpu->cpu_index];
cpu->vcpu_dirty = true;
qemu_register_reset(hax_reset_vcpu_state, cpu->env_ptr);
static int hax_vcpu_interrupt(CPUArchState *env)
{
CPUState *cpu = env_cpu(env);
- struct hax_vcpu_state *vcpu = cpu->hax_vcpu;
+ struct hax_vcpu_state *vcpu = cpu->accel;
struct hax_tunnel *ht = vcpu->tunnel;
/*
void hax_raise_event(CPUState *cpu)
{
- struct hax_vcpu_state *vcpu = cpu->hax_vcpu;
+ struct hax_vcpu_state *vcpu = cpu->accel;
if (!vcpu) {
return;
int ret = 0;
CPUState *cpu = env_cpu(env);
X86CPU *x86_cpu = X86_CPU(cpu);
- struct hax_vcpu_state *vcpu = cpu->hax_vcpu;
+ struct hax_vcpu_state *vcpu = cpu->accel;
struct hax_tunnel *ht = vcpu->tunnel;
if (!hax_enabled()) {
{
CPUState *cpu;
for (cpu = first_cpu; cpu != NULL; cpu = CPU_NEXT(cpu)) {
- cpu->hax_vcpu->tunnel->user_event_pending = 0;
- cpu->hax_vcpu->tunnel->ready_for_interrupt_injection = 0;
+ cpu->accel->tunnel->user_event_pending = 0;
+ cpu->accel->tunnel->ready_for_interrupt_injection = 0;
}
}
static struct qemu_vcpu *
get_qemu_vcpu(CPUState *cpu)
{
- return (struct qemu_vcpu *)cpu->hax_vcpu;
+ return (struct qemu_vcpu *)cpu->accel;
}
static struct nvmm_machine *
}
cpu->vcpu_dirty = true;
- cpu->hax_vcpu = (struct hax_vcpu_state *)qcpu;
+ cpu->accel = (struct hax_vcpu_state *)qcpu;
return 0;
}
struct qemu_vcpu *qcpu = get_qemu_vcpu(cpu);
nvmm_vcpu_destroy(mach, &qcpu->vcpu);
- g_free(cpu->hax_vcpu);
+ g_free(cpu->accel);
}
/* -------------------------------------------------------------------------- */
static struct whpx_vcpu *get_whpx_vcpu(CPUState *cpu)
{
- return (struct whpx_vcpu *)cpu->hax_vcpu;
+ return (struct whpx_vcpu *)cpu->accel;
}
static WHV_X64_SEGMENT_REGISTER whpx_seg_q2h(const SegmentCache *qs, int v86,
vcpu->interruptable = true;
cpu->vcpu_dirty = true;
- cpu->hax_vcpu = (struct hax_vcpu_state *)vcpu;
+ cpu->accel = (struct hax_vcpu_state *)vcpu;
max_vcpu_index = max(max_vcpu_index, cpu->cpu_index);
qemu_add_vm_change_state_handler(whpx_cpu_update_state, cpu->env_ptr);
whp_dispatch.WHvDeleteVirtualProcessor(whpx->partition, cpu->cpu_index);
whp_dispatch.WHvEmulatorDestroyEmulator(vcpu->emulator);
- g_free(cpu->hax_vcpu);
+ g_free(cpu->accel);
return;
}