@@ -414,4 +414,7 @@ int kvm_set_one_reg(CPUState *cs, uint64_t id, void *source);
* Returns: 0 on success, or a negative errno on failure.
*/
int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target);
+
+#define TYPE_KVM_ACCEL "kvm-accel"
+
#endif
@@ -113,8 +113,6 @@ typedef struct KVMState
#endif
} KVMState;
-#define TYPE_KVM_ACCEL "kvm-accel"
-
#define KVM_STATE(obj) \
OBJECT_CHECK(KVMState, (obj), TYPE_KVM_ACCEL)
@@ -28,6 +28,7 @@
#include "exec/gdbstub.h"
#include "qemu/host-utils.h"
#include "qemu/config-file.h"
+#include "hw/i386/accel.h"
#include "hw/i386/pc.h"
#include "hw/i386/apic.h"
#include "hw/i386/apic_internal.h"
@@ -2591,3 +2592,21 @@ int kvm_device_msix_deassign(KVMState *s, uint32_t dev_id)
return kvm_deassign_irq_internal(s, dev_id, KVM_DEV_IRQ_GUEST_MSIX |
KVM_DEV_IRQ_HOST_MSIX);
}
+
+#define TYPE_X86_KVM_ACCEL TARGET_NAME "-kvm-accel"
+
+static const TypeInfo x86_kvm_accel_type = {
+ .name = TYPE_X86_KVM_ACCEL,
+ .parent = TYPE_KVM_ACCEL,
+ .interfaces = (InterfaceInfo[]) {
+ { TYPE_X86_ACCEL },
+ { }
+ },
+};
+
+static void x86_kvm_type_init(void)
+{
+ type_register_static(&x86_kvm_accel_type);
+}
+
+type_init(x86_kvm_type_init);
Implements TYPE_X86_ACCEL. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- include/sysemu/kvm.h | 3 +++ kvm-all.c | 2 -- target-i386/kvm.c | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-)