i386: hvf: header cleanup
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 3 Oct 2017 13:36:05 +0000 (15:36 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Dec 2017 14:02:07 +0000 (15:02 +0100)
Remove inclusions of system headers and avoid "pragma once".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/hvf/x86.h
target/i386/hvf/x86_cpuid.c
target/i386/hvf/x86_decode.c
target/i386/hvf/x86_decode.h
target/i386/hvf/x86_descr.c
target/i386/hvf/x86_descr.h
target/i386/hvf/x86_flags.c
target/i386/hvf/x86_gen.h
target/i386/hvf/x86hvf.c

index 250364b44816a48bc3774d532cd466acced249ee..2dc55477a5ef8543f4f0c5374c7fd82d25c3f7c7 100644 (file)
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#pragma once
+#ifndef HVF_X86_H
+#define HVF_X86_H 1
 
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <stdarg.h>
-#include "qemu-common.h"
 #include "x86_gen.h"
 
 /* exceptions */
@@ -467,3 +463,4 @@ static inline uint64_t rdtscp(void)
     return tsc;
 }
 
+#endif
index 103223a85dbd3d436a386a8a87fdce98e931b517..bcb9705a712bace40c312b4707e23a95cb999a2f 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu-common.h"
 #include "x86.h"
 #include "vmx.h"
 #include "sysemu/hvf.h"
index 623c05133967d102a6cbdfeee9d58994954f85e5..2a42a671300bba171f80cc65aaf98bc6d694144c 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "qemu/osdep.h"
 
+#include "qemu-common.h"
 #include "x86_decode.h"
 #include "string.h"
 #include "vmx.h"
index 329131360f7824f0e7b288f3b49a5d0159eb97ac..3e1eca0cdbce8f739a3bd1ac8aed6385d4db810f 100644 (file)
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#pragma once
+#ifndef HVF_X86_DECODE_H
+#define HVF_X86_DECODE_H 1
 
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <stdarg.h>
-#include "qemu-common.h"
-#include "x86.h"
 #include "cpu.h"
+#include "x86.h"
 
 typedef enum x86_prefix {
     /* group 1 */
@@ -323,3 +319,5 @@ void calc_modrm_operand64(CPUX86State *env, struct x86_decode *decode,
                           struct x86_decode_op *op);
 void set_addressing_size(CPUX86State *env, struct x86_decode *decode);
 void set_operand_size(CPUX86State *env, struct x86_decode *decode);
+
+#endif
index 0b9562818f665552d205473d073e35d1d53575f3..b4a7cdd2a7f4375ad9e686a1777b5eff4bbdf14b 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "qemu/osdep.h"
 
+#include "qemu-common.h"
 #include "vmx.h"
 #include "x86_descr.h"
 
index 1285dd38975301f379d84095e73148a51be14033..034d8e95c5a72ef135b3871ee229b581af798a2c 100644 (file)
@@ -16,7 +16,8 @@
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#pragma once
+#ifndef HVF_X86_DESCR_H
+#define HVF_X86_DESCR_H 1
 
 #include "x86.h"
 
@@ -53,3 +54,5 @@ uint32_t vmx_read_segment_ar(CPUState *cpu, x86_reg_segment seg);
 void vmx_segment_to_x86_descriptor(struct CPUState *cpu,
                                    struct vmx_segment *vmx_desc,
                                    struct x86_segment_descriptor *desc);
+
+#endif
index c83377448552cb83eb81ed5292bdf9b24f634273..d2693f21f4e5b1c1a7a7a61f1b892a3341379cee 100644 (file)
@@ -22,8 +22,8 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu-common.h"
 
+#include "qemu-common.h"
 #include "cpu.h"
 #include "x86_flags.h"
 #include "x86.h"
index 2045b0e69d2262bb5ea1aae66ebe49e96b5f0443..69edeffb19f8fa3eef58f253dbb755bc9e8b33e6 100644 (file)
 #ifndef __X86_GEN_H__
 #define __X86_GEN_H__
 
-#include <stdlib.h>
-#include <stdio.h>
-#include "qemu-common.h"
-
 typedef uint64_t addr_t;
 
 #define VM_PANIC(x) {\
index c7a72d1890da754059c9de0e73c800f3a2a21996..371a4b3f4d2b0f4bf7dcda484f262b2b0f5c647e 100644 (file)
@@ -18,8 +18,8 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu-common.h"
 
+#include "qemu-common.h"
 #include "x86hvf.h"
 #include "vmx.h"
 #include "vmcs.h"