diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c
index b92d0c6dd2915bd4b00895511deee4b6407bdd90..cbf1dccbb159b9352acfab58808bad8044206e5c 100644
--- a/hw/char/xen_console.c
+++ b/hw/char/xen_console.c
@@ -19,14 +19,9 @@
* with this program; if not, see .
*/
-#include
-#include
-#include
+#include "qemu/osdep.h"
#include
-#include
-#include
#include
-#include
#include
#include "hw/hw.h"
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 1676660e4e21ddce6938bf3ce7004c440f22a636..a533c3d0f421f083237ec30e522daf494027b70c 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -24,16 +24,8 @@
* with this program; if not, see .
*/
-#include
-#include
-#include
-#include
-#include
+#include "qemu/osdep.h"
#include
-#include
-#include
-#include
-#include
#include "hw/hw.h"
#include "ui/console.h"
diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c
index 3ffb07d411c1ee98d59e96dc0b42d59bc5d4b38d..7281730d94437bed5d00e680753191b25b8db016 100644
--- a/hw/net/xen_nic.c
+++ b/hw/net/xen_nic.c
@@ -19,18 +19,9 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include "qemu/osdep.h"
#include
#include
-#include
-#include
#include
#include
diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 3827ca7da794f4bab8bbbadff6574e431a0e8139..9666fff8c9678c1b7ce896b5487b4e7df020dcca 100644
--- a/hw/xen/xen-host-pci-device.c
+++ b/hw/xen/xen-host-pci-device.c
@@ -6,6 +6,7 @@
*
*/
+#include "qemu/osdep.h"
#include "qemu-common.h"
#include "xen-host-pci-device.h"
diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c
index caa459ca3ea64275bf23aa296184a9e4e38eac80..ef7843fe8235610ca1834c6299284e7863d1f3d2 100644
--- a/hw/xen/xen_backend.c
+++ b/hw/xen/xen_backend.c
@@ -22,15 +22,7 @@
* TODO: add some xenbus / xenstore concepts overview here.
*/
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include "qemu/osdep.h"
#include
#include
diff --git a/hw/xen/xen_devconfig.c b/hw/xen/xen_devconfig.c
index e138dbbec96beaeb0adc83f931c3922f299eeb55..1f30fe4f5a00162b4614906fbc142f4804f412b0 100644
--- a/hw/xen/xen_devconfig.c
+++ b/hw/xen/xen_devconfig.c
@@ -1,3 +1,4 @@
+#include "qemu/osdep.h"
#include "hw/xen/xen_backend.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index d33221be0e70b8fce0815a504215454ba16ab29d..657bf6cdc1304ee3fb09d46633b35cb485c50936 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -52,6 +52,7 @@
* - Set entry->pirq to '-1'.
*/
+#include "qemu/osdep.h"
#include
#include "hw/pci/pci.h"
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index 81c6721562437687925c92c7fc1ba59cf4984449..1b48f1918319c0fef2f113ef1d382cc369de444e 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -12,6 +12,7 @@
* This file implements direct PCI assignment to a HVM guest
*/
+#include "qemu/osdep.h"
#include "qemu/timer.h"
#include "hw/xen/xen_backend.h"
#include "xen_pt.h"
diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c
index e7a7c7e2633dd0fa47866884d26195aeaf201d08..71e745f8ca2077cdf75b17f97a4de2c489f81183 100644
--- a/hw/xen/xen_pt_graphics.c
+++ b/hw/xen/xen_pt_graphics.c
@@ -1,6 +1,7 @@
/*
* graphics passthrough
*/
+#include "qemu/osdep.h"
#include "xen_pt.h"
#include "xen-host-pci-device.h"
#include "hw/xen/xen_backend.h"
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index 302a310190f2e037570c15f58f01e809a3587c44..5624685b2083fbc6aa1313b8377a6acc49cb3aa9 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -9,6 +9,7 @@
* This file implements direct PCI assignment to a HVM guest
*/
+#include "qemu/osdep.h"
#include
#include "hw/xen/xen_backend.h"
diff --git a/hw/xenpv/xen_domainbuild.c b/hw/xenpv/xen_domainbuild.c
index f9be029b0e849f0469d45909aa24d764eda2e705..5a9f5ac806444f58a45f37aad5b223db067ec8fe 100644
--- a/hw/xenpv/xen_domainbuild.c
+++ b/hw/xenpv/xen_domainbuild.c
@@ -1,4 +1,4 @@
-#include
+#include "qemu/osdep.h"
#include "hw/xen/xen_backend.h"
#include "xen_domainbuild.h"
#include "qemu/timer.h"
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 3250b949004816912825a0f72508d4e6635ffede..fc13535992ff68025b1d08a833eb7b1da2e0233b 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
+#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "hw/xen/xen_backend.h"
diff --git a/xen-common-stub.c b/xen-common-stub.c
index 906f991f1e012fe6f29a5c4dd371426cf2be068d..699c3f1c642e33b396fe14f20b7c883f635b609a 100644
--- a/xen-common-stub.c
+++ b/xen-common-stub.c
@@ -5,6 +5,7 @@
* See the COPYING file in the top-level directory.
*/
+#include "qemu/osdep.h"
#include "qemu-common.h"
#include "hw/xen/xen.h"
diff --git a/xen-common.c b/xen-common.c
index 6cd2959e21695b7042bb1d1cc1eb30e04193020b..4860b2eb76dc02b3d1123dea54b46cda6bf755dd 100644
--- a/xen-common.c
+++ b/xen-common.c
@@ -8,6 +8,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
+#include "qemu/osdep.h"
#include "hw/xen/xen_backend.h"
#include "qmp-commands.h"
#include "sysemu/char.h"
diff --git a/xen-hvm-stub.c b/xen-hvm-stub.c
index b9583674ca8da4cb1f82a6dfcf0d0474d186a0f3..a6cb5d358f0a27453dfe34b7d901cfc7e320410c 100644
--- a/xen-hvm-stub.c
+++ b/xen-hvm-stub.c
@@ -8,6 +8,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
+#include "qemu/osdep.h"
#include "qemu-common.h"
#include "hw/xen/xen.h"
#include "exec/memory.h"
diff --git a/xen-hvm.c b/xen-hvm.c
index 590f66dcf8bb2bfd19fccaf203ef3323c4416524..1c9fb129550010033961c333e383186a50d6f1b6 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -8,6 +8,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
+#include "qemu/osdep.h"
#include
#include "hw/pci/pci.h"
diff --git a/xen-mapcache.c b/xen-mapcache.c
index 4a043780200e743d8d816b10647b294fa08cd7f4..49f394a777d34cfabae642b0b60456282f9bc9e3 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -8,7 +8,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
-#include "config.h"
+#include "qemu/osdep.h"
#include