[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 08/19] accel/whpx: Use 'accel_vcpu' generic pointer
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 08/19] accel/whpx: Use 'accel_vcpu' generic pointer |
Date: |
Wed, 3 Mar 2021 19:22:08 +0100 |
Instead of naming the HAX accelerator in WHPX, use the
'accel_vcpu' field which is meant for accelerators.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
target/i386/whpx/whpx-all.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index f0b3266114d..56ec82076cc 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -177,7 +177,7 @@ struct WHPDispatch whp_dispatch;
static whpx_vcpu *get_whpx_vcpu(CPUState *cpu)
{
- return (whpx_vcpu *)cpu->hax_vcpu;
+ return cpu->accel_vcpu;
}
static WHV_X64_SEGMENT_REGISTER whpx_seg_q2h(const SegmentCache *qs, int v86,
@@ -1439,7 +1439,7 @@ int whpx_init_vcpu(CPUState *cpu)
vcpu->interruptable = true;
cpu->vcpu_dirty = true;
- cpu->hax_vcpu = (struct hax_vcpu_state *)vcpu;
+ cpu->accel_vcpu = vcpu;
max_vcpu_index = max(max_vcpu_index, cpu->cpu_index);
qemu_add_vm_change_state_handler(whpx_cpu_update_state, cpu->env_ptr);
@@ -1481,7 +1481,7 @@ void whpx_destroy_vcpu(CPUState *cpu)
whp_dispatch.WHvDeleteVirtualProcessor(whpx->partition, cpu->cpu_index);
whp_dispatch.WHvEmulatorDestroyEmulator(vcpu->emulator);
- g_free(cpu->hax_vcpu);
+ g_free(cpu->accel_vcpu);
return;
}
--
2.26.2
- [PATCH 01/19] target/i386/hvf: Use boolean value for vcpu_dirty, (continued)
- [PATCH 01/19] target/i386/hvf: Use boolean value for vcpu_dirty, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH 02/19] target/s390x/kvm: Simplify debug code, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH 03/19] target/s390x/kvm: Reduce deref by declaring 'struct kvm_run' on stack, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH 04/19] cpu: Croup accelerator-specific fields altogether, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 05/19] cpu: Introduce AccelvCPUState opaque structure, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 06/19] accel/whpx: Add typedef for 'struct whpx_vcpu', Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 07/19] accel/whpx: Rename struct whpx_vcpu -> AccelvCPUState, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 08/19] accel/whpx: Use 'accel_vcpu' generic pointer,
Philippe Mathieu-Daudé <=
- [RFC PATCH 09/19] accel/hax: Add typedef for 'struct hax_vcpu_state', Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 10/19] accel/hax: Use 'accel_vcpu' generic pointer, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 11/19] accel/kvm: Introduce kvm_vcpu_state() helper, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 13/19] accel/kvm: Declare and allocate AccelvCPUState struct, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 12/19] accel/kvm: Use kvm_vcpu_state() when possible, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 14/19] accel/kvm: Move the 'kvm_fd' field to AccelvCPUState, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 15/19] accel/kvm: Move the 'kvm_state' field to AccelvCPUState, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 16/19] accel/kvm: Move the 'kvm_run' field to AccelvCPUState, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 17/19] accel/hvf: Reduce deref by declaring 'hv_vcpuid_t hvf_fd' on stack, Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH 18/19] accel/hvf: Declare and allocate AccelvCPUState struct, Philippe Mathieu-Daudé, 2021/03/03