[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h |
Date: |
Wed, 19 Aug 2020 20:11:57 -0400 |
Move typedef closer to the type check macros, to make it easier
to convert the code to OBJECT_DEFINE_TYPE() in the future.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2: none
---
Cc: Cameron Esfahani <dirty@apple.com>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org
---
include/sysemu/hvf.h | 1 +
target/i386/hvf/hvf-i386.h | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h
index d3bed80ea8..760d6c79a2 100644
--- a/include/sysemu/hvf.h
+++ b/include/sysemu/hvf.h
@@ -35,6 +35,7 @@ void hvf_vcpu_destroy(CPUState *);
#define TYPE_HVF_ACCEL ACCEL_CLASS_NAME("hvf")
+typedef struct HVFState HVFState;
#define HVF_STATE(obj) \
OBJECT_CHECK(HVFState, (obj), TYPE_HVF_ACCEL)
diff --git a/target/i386/hvf/hvf-i386.h b/target/i386/hvf/hvf-i386.h
index ef20c73eca..e0edffd077 100644
--- a/target/i386/hvf/hvf-i386.h
+++ b/target/i386/hvf/hvf-i386.h
@@ -57,13 +57,13 @@ typedef struct hvf_vcpu_caps {
uint64_t vmx_cap_preemption_timer;
} hvf_vcpu_caps;
-typedef struct HVFState {
+struct HVFState {
AccelState parent;
hvf_slot slots[32];
int num_slots;
hvf_vcpu_caps *hvf_caps;
-} HVFState;
+};
extern HVFState *hvf_state;
void hvf_set_phys_mem(MemoryRegionSection *, bool);
--
2.26.2
- Re: [PATCH v2 10/58] aspeed_timer: Fix ASPEED_TIMER macro definition, (continued)
- [PATCH v2 11/58] versatile: Fix typo in PCI_VPB_HOST definition, Eduardo Habkost, 2020/08/19
- [PATCH v2 12/58] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS, Eduardo Habkost, 2020/08/19
- [PATCH v2 13/58] hvf: Add missing include, Eduardo Habkost, 2020/08/19
- [PATCH v2 14/58] hcd-dwc2: Rename USB_*CLASS macros for consistency, Eduardo Habkost, 2020/08/19
- [PATCH v2 15/58] tulip: Move TulipState typedef to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 16/58] throttle-groups: Move ThrottleGroup typedef to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 17/58] pci: Move PCIBusClass typedef to pci.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 18/58] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h,
Eduardo Habkost <=
- [PATCH v2 20/58] mcf_fec: Move mcf_fec_state typedef to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 22/58] can_emu: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/19
- [PATCH v2 21/58] s390_flic: Move KVMS390FLICState typedef to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 23/58] nubus: Delete unused NUBUS_BRIDGE macro, Eduardo Habkost, 2020/08/19
- [PATCH v2 25/58] armsse: Rename QOM macros to avoid conflicts, Eduardo Habkost, 2020/08/19