qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 11/19] i386: hvf: header cleanup
Date: Wed, 20 Dec 2017 19:03:50 +0100	[thread overview]
Message-ID: <20171220180358.29316-12-pbonzini@redhat.com> (raw)
In-Reply-To: <20171220180358.29316-1-pbonzini@redhat.com>

Remove inclusions of system headers and avoid "pragma once".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/hvf/x86.h        |  9 +++------
 target/i386/hvf/x86_cpuid.c  |  1 +
 target/i386/hvf/x86_decode.c |  1 +
 target/i386/hvf/x86_decode.h | 12 +++++-------
 target/i386/hvf/x86_descr.c  |  1 +
 target/i386/hvf/x86_descr.h  |  5 ++++-
 target/i386/hvf/x86_flags.c  |  2 +-
 target/i386/hvf/x86_gen.h    |  4 ----
 target/i386/hvf/x86hvf.c     |  2 +-
 9 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h
index 250364b448..2dc55477a5 100644
--- a/target/i386/hvf/x86.h
+++ b/target/i386/hvf/x86.h
@@ -16,13 +16,9 @@
  * 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
diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c
index 103223a85d..bcb9705a71 100644
--- a/target/i386/hvf/x86_cpuid.c
+++ b/target/i386/hvf/x86_cpuid.c
@@ -21,6 +21,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu-common.h"
 #include "x86.h"
 #include "vmx.h"
 #include "sysemu/hvf.h"
diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c
index 623c051339..2a42a67130 100644
--- a/target/i386/hvf/x86_decode.c
+++ b/target/i386/hvf/x86_decode.c
@@ -18,6 +18,7 @@
 
 #include "qemu/osdep.h"
 
+#include "qemu-common.h"
 #include "x86_decode.h"
 #include "string.h"
 #include "vmx.h"
diff --git a/target/i386/hvf/x86_decode.h b/target/i386/hvf/x86_decode.h
index 329131360f..3e1eca0cdb 100644
--- a/target/i386/hvf/x86_decode.h
+++ b/target/i386/hvf/x86_decode.h
@@ -15,15 +15,11 @@
  * 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
diff --git a/target/i386/hvf/x86_descr.c b/target/i386/hvf/x86_descr.c
index 0b9562818f..b4a7cdd2a7 100644
--- a/target/i386/hvf/x86_descr.c
+++ b/target/i386/hvf/x86_descr.c
@@ -18,6 +18,7 @@
 
 #include "qemu/osdep.h"
 
+#include "qemu-common.h"
 #include "vmx.h"
 #include "x86_descr.h"
 
diff --git a/target/i386/hvf/x86_descr.h b/target/i386/hvf/x86_descr.h
index 1285dd3897..034d8e95c5 100644
--- a/target/i386/hvf/x86_descr.h
+++ b/target/i386/hvf/x86_descr.h
@@ -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
diff --git a/target/i386/hvf/x86_flags.c b/target/i386/hvf/x86_flags.c
index c833774485..d2693f21f4 100644
--- a/target/i386/hvf/x86_flags.c
+++ b/target/i386/hvf/x86_flags.c
@@ -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"
diff --git a/target/i386/hvf/x86_gen.h b/target/i386/hvf/x86_gen.h
index 2045b0e69d..69edeffb19 100644
--- a/target/i386/hvf/x86_gen.h
+++ b/target/i386/hvf/x86_gen.h
@@ -18,10 +18,6 @@
 #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) {\
diff --git a/target/i386/hvf/x86hvf.c b/target/i386/hvf/x86hvf.c
index cb1edb6186..aeeb422590 100644
--- a/target/i386/hvf/x86hvf.c
+++ b/target/i386/hvf/x86hvf.c
@@ -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"
-- 
2.14.3

  parent reply	other threads:[~2017-12-20 18:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 18:03 [Qemu-devel] [PULL 00/19] Initial support for Hypervisor.framework Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 01/19] apic: add function to apic that will be used by hvf Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 02/19] i386: hvf: add code base from Google's QEMU repository Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 03/19] i386: hvf: fix licensing issues; isolate task handling code (GPL v2-only) Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 04/19] i386: hvf: use new helper functions for put/get xsave Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 05/19] i386: hvf: implement hvf_get_supported_cpuid Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 06/19] i386: refactor KVM cpuid code so that it applies to hvf as well Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 07/19] i386: hvf: implement vga dirty page tracking Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 08/19] i386: hvf: refactor event injection code for hvf Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 09/19] i386: hvf: inject General Protection Fault when vmexit through vmcall Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 10/19] i386: hvf: move all hvf files in the same directory Paolo Bonzini
2017-12-20 18:03 ` Paolo Bonzini [this message]
2017-12-20 18:03 ` [Qemu-devel] [PULL 12/19] i386: hvf: unify register enums between HVF and the rest Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 13/19] i386: hvf: remove more dead emulator code Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 14/19] i386: hvf: remove ZERO_INIT macro Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 15/19] i386: hvf: abort on decoding error Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 16/19] i386: hvf: simplify flag handling Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 17/19] i386: hvf: remove addr_t Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 18/19] i386: hvf: remove VM_PANIC from "in" Paolo Bonzini
2017-12-20 18:03 ` [Qemu-devel] [PULL 19/19] i386: hvf: cleanup x86_gen.h Paolo Bonzini
2017-12-20 19:15 ` [Qemu-devel] [PULL 00/19] Initial support for Hypervisor.framework no-reply
2017-12-20 19:16 ` no-reply
2017-12-20 20:31 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171220180358.29316-12-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).