On 6/22/23 18:08, Philippe Mathieu-Daudé wrote:
|+ struct AccelvCPUState *accel;|
...
+typedef struct AccelCPUState {
hax_fd fd;
int vcpu_id;
struct hax_tunnel *tunnel;
unsigned char *iobuf;
-};
+} hax_vcpu_state;
Discussed face to face, but for the record:
Put the typedef in qemu/typedefs.h, so that we can use it immediately in core/cpu.h and
not need to re-declare it in each accelerator.
Drop hax_vcpu_state typedef and just use AccelCPUState (since you have to change all of
those lines anyway. Which will eventually allow
+++ b/target/i386/whpx/whpx-all.c
@@ -2258,7 +2258,7 @@ int whpx_init_vcpu(CPUState *cpu)
vcpu->interruptable = true;
cpu->vcpu_dirty = true;
- cpu->accel = (struct hax_vcpu_state *)vcpu;
+ cpu->accel = (struct AccelCPUState *)vcpu;
this cast to go away.
r~