[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 07/16] accel: Rename HAX 'struct hax_vcpu_state' -> AccelCPUState
- To: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Richard Henderson <richard.henderson@xxxxxxxxxx>
- Date: Thu, 22 Jun 2023 19:46:40 +0200
- Cc: Reinoud Zandijk <reinoud@xxxxxxxxxx>, qemu-arm@xxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Yanan Wang <wangyanan55@xxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, Roman Bolshakov <rbolshakov@xxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Sunil Muthuswamy <sunilmut@xxxxxxxxxxxxx>, Alexander Graf <agraf@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Eduardo Habkost <eduardo@xxxxxxxxxxx>, Cameron Esfahani <dirty@xxxxxxxxx>
- Delivery-date: Thu, 22 Jun 2023 17:46:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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~
|