@@ -1,5 +1,4 @@
obj-$(call lnot,$(CONFIG_HAX)) += hax-stub.o
-obj-$(call lnot,$(CONFIG_HVF)) += hvf-stub.o
obj-$(call lnot,$(CONFIG_WHPX)) += whpx-stub.o
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
deleted file mode 100644
@@ -1,30 +0,0 @@
-/*
- * QEMU HVF support
- *
- * Copyright 2017 Red Hat, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2 or later, as published by the Free Software Foundation,
- * and may be copied, distributed, and modified under those terms.
- *
- * See the COPYING file in the top-level directory.
- *
- */
-
-#include "qemu/osdep.h"
-#include "cpu.h"
-#include "sysemu/hvf.h"
-
-int hvf_init_vcpu(CPUState *cpu)
-{
- return -ENOSYS;
-}
-
-int hvf_vcpu_exec(CPUState *cpu)
-{
- return -ENOSYS;
-}
-
-void hvf_vcpu_destroy(CPUState *cpu)
-{
-}
@@ -23,14 +23,6 @@ extern bool hvf_allowed;
#define hvf_get_supported_cpuid(func, idx, reg) 0
#endif /* !CONFIG_HVF */
-int hvf_init_vcpu(CPUState *);
-int hvf_vcpu_exec(CPUState *);
-void hvf_cpu_synchronize_state(CPUState *);
-void hvf_cpu_synchronize_post_reset(CPUState *);
-void hvf_cpu_synchronize_post_init(CPUState *);
-void hvf_cpu_synchronize_pre_loadvm(CPUState *);
-void hvf_vcpu_destroy(CPUState *);
-
#define TYPE_HVF_ACCEL ACCEL_CLASS_NAME("hvf")
#define HVF_STATE(obj) \
@@ -55,6 +55,7 @@
#include "target/i386/cpu.h"
#include "qemu/guest-random.h"
+#include "hvf-int.h"
#include "hvf-cpus.h"
/*
new file mode 100644
@@ -0,0 +1,24 @@
+/*
+ * QEMU Hypervisor.framework (HVF) support
+ *
+ * Copyright Google Inc., 2017
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+/* header to be included in HVF-specific internal code */
+
+#ifndef HVF_INT_H
+#define HVF_INT_H
+
+int hvf_init_vcpu(CPUState *);
+int hvf_vcpu_exec(CPUState *);
+void hvf_cpu_synchronize_state(CPUState *);
+void hvf_cpu_synchronize_post_reset(CPUState *);
+void hvf_cpu_synchronize_post_init(CPUState *);
+void hvf_cpu_synchronize_pre_loadvm(CPUState *);
+void hvf_vcpu_destroy(CPUState *);
+
+#endif /* HVF_INT_H */
@@ -72,6 +72,7 @@
#include "sysemu/accel.h"
#include "target/i386/cpu.h"
+#include "hvf-int.h"
#include "hvf-cpus.h"
HVFState *hvf_state;
@@ -32,6 +32,8 @@
#include <Hypervisor/hv.h>
#include <Hypervisor/hv_vmx.h>
+#include "hvf-int.h"
+
void hvf_set_segment(struct CPUState *cpu, struct vmx_segment *vmx_seg,
SegmentCache *qseg, bool is_tr)
{
@@ -35,5 +35,4 @@ void hvf_get_msrs(CPUState *cpu_state);
void vmx_clear_int_window_exiting(CPUState *cpu);
void hvf_get_segments(CPUState *cpu_state);
void vmx_update_tpr(CPUState *cpu);
-void hvf_cpu_synchronize_state(CPUState *cpu_state);
#endif
Signed-off-by: Claudio Fontana <cfontana@suse.de> --- accel/stubs/Makefile.objs | 1 - accel/stubs/hvf-stub.c | 30 ------------------------------ include/sysemu/hvf.h | 8 -------- target/i386/hvf/hvf-cpus.c | 1 + target/i386/hvf/hvf-int.h | 24 ++++++++++++++++++++++++ target/i386/hvf/hvf.c | 1 + target/i386/hvf/x86hvf.c | 2 ++ target/i386/hvf/x86hvf.h | 1 - 8 files changed, 28 insertions(+), 40 deletions(-) delete mode 100644 accel/stubs/hvf-stub.c create mode 100644 target/i386/hvf/hvf-int.h