i386: hvf: cleanup x86_gen.h
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 3 Oct 2017 13:22:35 +0000 (15:22 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Dec 2017 14:02:07 +0000 (15:02 +0100)
This only includes VM_PANIC now.  No need to include it from headers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/hvf/panic.h [new file with mode: 0644]
target/i386/hvf/x86.h
target/i386/hvf/x86_decode.c
target/i386/hvf/x86_emu.c
target/i386/hvf/x86_flags.c
target/i386/hvf/x86_flags.h
target/i386/hvf/x86_gen.h [deleted file]
target/i386/hvf/x86_mmu.c
target/i386/hvf/x86_mmu.h
target/i386/hvf/x86_task.c

diff --git a/target/i386/hvf/panic.h b/target/i386/hvf/panic.h
new file mode 100644 (file)
index 0000000..411ef43
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2016 Veertu Inc,
+ * Copyright (C) 2017 Google Inc,
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef HVF_PANIC_H
+#define HVF_PANIC_H
+
+#define VM_PANIC(x) {\
+    printf("%s\n", x); \
+    abort(); \
+}
+
+#define VM_PANIC_ON(x) {\
+    if (x) { \
+        printf("%s\n", #x); \
+        abort(); \
+    } \
+}
+
+#define VM_PANIC_EX(...) {\
+    printf(__VA_ARGS__); \
+    abort(); \
+}
+
+#define VM_PANIC_ON_EX(x, ...) {\
+    if (x) { \
+        printf(__VA_ARGS__); \
+        abort(); \
+    } \
+}
+
+#endif
index ae877f0022b816c0b5487f255612e816dccee2c8..103ec0976c19f3e3f25df8543e691fca14e0f1a6 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef HVF_X86_H
 #define HVF_X86_H 1
 
-#include "x86_gen.h"
-
 typedef struct x86_register {
     union {
         struct {
index 71d0c3d115be7b342a2fffa3f38eac3930ab5652..bf93e8207d4c0e648b9202bbca0e6b7e5fb333ee 100644 (file)
 #include "qemu/osdep.h"
 
 #include "qemu-common.h"
+#include "panic.h"
 #include "x86_decode.h"
 #include "string.h"
 #include "vmx.h"
-#include "x86_gen.h"
 #include "x86_mmu.h"
 #include "x86_descr.h"
 
index 6abcea9d9212308b8ba468a519ef3a95de9bfa88..3ea18edc6811a5fbd1e3b43f1aae41246e279375 100644 (file)
@@ -36,7 +36,7 @@
 /////////////////////////////////////////////////////////////////////////
 
 #include "qemu/osdep.h"
-
+#include "panic.h"
 #include "qemu-common.h"
 #include "x86_decode.h"
 #include "x86.h"
index 28398ae68011b423d370a758841246ae10853a29..ee6d33f86182e849d575e0d0d483a4e7d5bf4b2d 100644 (file)
@@ -24,6 +24,7 @@
 #include "qemu/osdep.h"
 
 #include "qemu-common.h"
+#include "panic.h"
 #include "cpu.h"
 #include "x86_flags.h"
 #include "x86.h"
index 13e5d5bd1a33488f4637021668602b8e60b30a1d..89427459884f4d239e3adc404f32cca09dc2ebdd 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef __X86_FLAGS_H__
 #define __X86_FLAGS_H__
 
-#include "x86_gen.h"
 #include "cpu.h"
 void lflags_to_rflags(CPUX86State *env);
 void rflags_to_lflags(CPUX86State *env);
diff --git a/target/i386/hvf/x86_gen.h b/target/i386/hvf/x86_gen.h
deleted file mode 100644 (file)
index 96d6c5a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2016 Veertu Inc,
- * Copyright (C) 2017 Google Inc,
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef __X86_GEN_H__
-#define __X86_GEN_H__
-
-#define VM_PANIC(x) {\
-    printf("%s\n", x); \
-    abort(); \
-}
-
-#define VM_PANIC_ON(x) {\
-    if (x) { \
-        printf("%s\n", #x); \
-        abort(); \
-    } \
-}
-
-#define VM_PANIC_EX(...) {\
-    printf(__VA_ARGS__); \
-    abort(); \
-}
-
-#define VM_PANIC_ON_EX(x, ...) {\
-    if (x) { \
-        printf(__VA_ARGS__); \
-        abort(); \
-    } \
-}
-
-#endif
index cd8d122b45e633f20ac9ac3d4b0b0bfb0fe9e379..5c1f35acd067c39212d7f444c1c096164af69915 100644 (file)
@@ -16,6 +16,7 @@
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include "panic.h"
 
 #include "qemu-common.h"
 #include "cpu.h"
index ae02cb6916f1854afd9e888bb060f48fb56231c1..0bd1acc94fd0c41f1e9de423813bf7d346fccd0f 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef __X86_MMU_H__
 #define __X86_MMU_H__
 
-#include "x86_gen.h"
-
 #define PT_PRESENT      (1 << 0)
 #define PT_WRITE        (1 << 1)
 #define PT_USER         (1 << 2)
index bb3c3457ebe21073acb14e7dfdb4563827a54b10..d7f665f8fa1909f5a2b1e878c1eee269c00aa068 100644 (file)
@@ -7,6 +7,7 @@
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
 #include "qemu/osdep.h"
+#include "panic.h"
 #include "qemu-common.h"
 #include "qemu/error-report.h"