diff --git a/acl.c b/acl.c
index e840b9b6339a635e13a8d5b4038eba7b9601ba92..81ac25599b5dfd24e0091e47c4983211f46cd6cc 100644
--- a/acl.c
+++ b/acl.c
@@ -24,7 +24,7 @@
 
 
 #include "qemu-common.h"
-#include "acl.h"
+#include "qemu/acl.h"
 
 #ifdef CONFIG_FNMATCH
 #include <fnmatch.h>
diff --git a/aio-posix.c b/aio-posix.c
index d1e1bc2c75af15cb642e2c4831fb7d8aa0993cd4..88d09e1cfb5b631a114c74f899fb8d767efaa37b 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -15,8 +15,8 @@
 
 #include "qemu-common.h"
 #include "block/block.h"
-#include "qemu-queue.h"
-#include "qemu_socket.h"
+#include "qemu/queue.h"
+#include "qemu/sockets.h"
 
 struct AioHandler
 {
diff --git a/aio-win32.c b/aio-win32.c
index 9a26f9c3d970351975bab675f30c70cfc5422b7a..f5ea027f8cf02f6f1280b064675b64312d97ae63 100644
--- a/aio-win32.c
+++ b/aio-win32.c
@@ -17,8 +17,8 @@
 
 #include "qemu-common.h"
 #include "block/block.h"
-#include "qemu-queue.h"
-#include "qemu_socket.h"
+#include "qemu/queue.h"
+#include "qemu/sockets.h"
 
 struct AioHandler {
     EventNotifier *e;
diff --git a/arch_init.c b/arch_init.c
index f627253a205818f8ab069618661f3073f05fc8ae..9dacf5689bce20089c3e456b4fab3c38ef9db771 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -31,8 +31,8 @@
 #include "config.h"
 #include "monitor/monitor.h"
 #include "sysemu.h"
-#include "bitops.h"
-#include "bitmap.h"
+#include "qemu/bitops.h"
+#include "qemu/bitmap.h"
 #include "arch_init.h"
 #include "audio/audio.h"
 #include "hw/pc.h"
@@ -45,7 +45,7 @@
 #include "exec/address-spaces.h"
 #include "hw/pcspk.h"
 #include "migration/page_cache.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 #include "qmp-commands.h"
 #include "trace.h"
 
diff --git a/async.c b/async.c
index 6df4caf68a3b0920a5dceeae57f5f0e1b1f4d3a6..72d268ae352510c0c0ca49a43e05d197e23c0d98 100644
--- a/async.c
+++ b/async.c
@@ -24,7 +24,7 @@
 
 #include "qemu-common.h"
 #include "block/aio.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 /***********************************************************/
 /* bottom halves (can be seen as timers which expire ASAP) */
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index cd553c2a7b4035bb32d8f5019f86c64dc921ca08..e4e5442631078dd64775e39cc00986d5c812848a 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -23,7 +23,7 @@
  */
 #include <alsa/asoundlib.h>
 #include "qemu-common.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 #include "audio.h"
 
 #if QEMU_GNUC_PREREQ(4, 3)
diff --git a/audio/audio.c b/audio/audio.c
index a0cc72702083a1579086d65c091f26a773c4f5fd..eb2222c10fc24fb1aed4d92fce607a57f315ee2c 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -24,7 +24,7 @@
 #include "hw/hw.h"
 #include "audio.h"
 #include "monitor/monitor.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 
 #define AUDIO_CAP "audio"
diff --git a/audio/audio.h b/audio/audio.h
index a70fda97e3232be0e107527a0e36ffd7cd170c87..e7ea39777e1bebb78bf4eb747407a0ddb7351953 100644
--- a/audio/audio.h
+++ b/audio/audio.h
@@ -25,7 +25,7 @@
 #define QEMU_AUDIO_H
 
 #include "config-host.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 typedef void (*audio_callback_fn) (void *opaque, int avail);
 
diff --git a/audio/noaudio.c b/audio/noaudio.c
index 54958f8623f18590758fb304e2db5e3bd2280234..9f23aa2cb3f51a557812f1daf2877be440c2db60 100644
--- a/audio/noaudio.c
+++ b/audio/noaudio.c
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "audio.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #define AUDIO_CAP "noaudio"
 #include "audio_int.h"
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 8249a0044935e45a429098cabc6f363b8f8e4c5e..00be9c91e3bebb623d38251873a707c9c8e69b7b 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -31,8 +31,8 @@
 #include <sys/soundcard.h>
 #endif
 #include "qemu-common.h"
-#include "main-loop.h"
-#include "host-utils.h"
+#include "qemu/main-loop.h"
+#include "qemu/host-utils.h"
 #include "audio.h"
 
 #define AUDIO_CAP "oss"
diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index 6f15591a74f60411b51b0ece5227c419777b3508..bc24557de4671ba846d578af6b2765f14f3765f3 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -18,7 +18,7 @@
  */
 
 #include "hw/hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ui/qemu-spice.h"
 
 #define AUDIO_CAP "spice"
diff --git a/audio/wavaudio.c b/audio/wavaudio.c
index a449b5127e0ade1c7aef037a1dd7b792ebc539f7..950fa8f19c5fe5731036a21937f98640e379fef7 100644
--- a/audio/wavaudio.c
+++ b/audio/wavaudio.c
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 #include "hw/hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "audio.h"
 
 #define AUDIO_CAP "wav"
diff --git a/backends/rng-random.c b/backends/rng-random.c
index c201953f29c3829ced1c4e56e76d836aafde2b6c..d479ce8c56a444ec46835075161562df25c669f7 100644
--- a/backends/rng-random.c
+++ b/backends/rng-random.c
@@ -13,7 +13,7 @@
 #include "qemu/rng-random.h"
 #include "qemu/rng.h"
 #include "qapi/qmp/qerror.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 struct RndRandom
 {
diff --git a/bitmap.c b/bitmap.c
index a62c8ba68148a62d2caf1e5cf15eeefa408cf5f7..687841dcec01cb850e40c442e4995dfcf70b372c 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -9,8 +9,8 @@
  * Version 2.
  */
 
-#include "bitops.h"
-#include "bitmap.h"
+#include "qemu/bitops.h"
+#include "qemu/bitmap.h"
 
 /*
  * bitmaps provide an array of bits, implemented using an an
diff --git a/bitops.c b/bitops.c
index d9de71f7e8814ea809a5e8e2cd238e359a6b8a7f..4c3a836a014a615a516253c4bbfde5bed51758f7 100644
--- a/bitops.c
+++ b/bitops.c
@@ -11,7 +11,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include "bitops.h"
+#include "qemu/bitops.h"
 
 #define BITOP_WORD(nr)		((nr) / BITS_PER_LONG)
 
diff --git a/block-migration.c b/block-migration.c
index 2d2dcbda946d48883cebd8fa9a6bf9b4a003c0c0..4e865a67810bd0475439c3364451af894b5b1ff0 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -16,8 +16,8 @@
 #include "qemu-common.h"
 #include "block/block_int.h"
 #include "hw/hw.h"
-#include "qemu-queue.h"
-#include "qemu-timer.h"
+#include "qemu/queue.h"
+#include "qemu/timer.h"
 #include "migration/block.h"
 #include "migration/migration.h"
 #include "blockdev.h"
diff --git a/block.c b/block.c
index 0e7f18c6d347c4146198acd4aff63d2979322b21..1af4b99ee8e1ba696c34c53c526a83ce9674be87 100644
--- a/block.c
+++ b/block.c
@@ -27,13 +27,13 @@
 #include "monitor/monitor.h"
 #include "block/block_int.h"
 #include "block/blockjob.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "qapi/qmp/qjson.h"
 #include "sysemu.h"
-#include "notify.h"
+#include "qemu/notify.h"
 #include "block/coroutine.h"
 #include "qmp-commands.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #ifdef CONFIG_BSD
 #include <sys/types.h>
diff --git a/block/blkdebug.c b/block/blkdebug.c
index cd2866e7bd54bdd4949d7ac5ac7a6d7cc8bde932..6f7463772b161cb3fc1c3288b2199d1ddca3b3cb 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -23,9 +23,9 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 
 typedef struct BDRVBlkdebugState {
     int state;
diff --git a/block/blkverify.c b/block/blkverify.c
index cde5098e5ad880a155905dffdc67ccb47741509f..a7dd45909b09b800b16189a542c8b16f4510a4bf 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -8,7 +8,7 @@
  */
 
 #include <stdarg.h>
-#include "qemu_socket.h" /* for EINPROGRESS on Windows */
+#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
 #include "block/block_int.h"
 
 typedef struct {
diff --git a/block/bochs.c b/block/bochs.c
index 2cc7524782e14c5d4e1e65866534f374ab62086d..1b1d9cdbe53e191aa8a933b596b54f8ebeb6dc31 100644
--- a/block/bochs.c
+++ b/block/bochs.c
@@ -24,7 +24,7 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 
 /**************************************************************/
 
diff --git a/block/cloop.c b/block/cloop.c
index da29ff379cafcb3f228d062b75a334654ea466fd..5a0d0d805f6d80b727eb83add877f2d9ac328704 100644
--- a/block/cloop.c
+++ b/block/cloop.c
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include <zlib.h>
 
 typedef struct BDRVCloopState {
diff --git a/block/cow.c b/block/cow.c
index 1438ae1e3b4e3a222c52069059d8253321ed47b6..a33ce950d4439b2b94744bc3f1409c4a88bb61ed 100644
--- a/block/cow.c
+++ b/block/cow.c
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 
 /**************************************************************/
 /* COW block driver using file system holes */
diff --git a/block/dmg.c b/block/dmg.c
index 6ee505a9f542c80be596ffefe3a139e8d1ccb2eb..ac397dc8f75e10ddc8e374b2041c0dd40e7eb2b1 100644
--- a/block/dmg.c
+++ b/block/dmg.c
@@ -23,8 +23,8 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "bswap.h"
-#include "module.h"
+#include "qemu/bswap.h"
+#include "qemu/module.h"
 #include <zlib.h>
 
 typedef struct BDRVDMGState {
diff --git a/block/gluster.c b/block/gluster.c
index 4cb4e60227d5f3ce17118e4cc7a71fc6c898d750..0f2c32a3fab4f72ff1d4aff0df387f6e6efec8f3 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -17,8 +17,8 @@
  */
 #include <glusterfs/api/glfs.h>
 #include "block/block_int.h"
-#include "qemu_socket.h"
-#include "uri.h"
+#include "qemu/sockets.h"
+#include "qemu/uri.h"
 
 typedef struct GlusterAIOCB {
     BlockDriverAIOCB common;
diff --git a/block/iscsi.c b/block/iscsi.c
index 77e619a1fd8cd6b61b4574df660487f17211c506..041ee07de30cfe47c3672927fd12e0c8475f83a0 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -27,8 +27,8 @@
 #include <poll.h>
 #include <arpa/inet.h>
 #include "qemu-common.h"
-#include "qemu-config.h"
-#include "qemu-error.h"
+#include "qemu/config-file.h"
+#include "qemu/error-report.h"
 #include "block/block_int.h"
 #include "trace.h"
 #include "hw/scsi-defs.h"
diff --git a/block/linux-aio.c b/block/linux-aio.c
index 28e5a04e123af973b9978accd4254f345bf3e4c2..ee0f8d10c924f08efc269ccfcc53258b829351c8 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -9,9 +9,9 @@
  */
 #include "qemu-common.h"
 #include "block/aio.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "block/raw-aio.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 
 #include <libaio.h>
 
diff --git a/block/nbd.c b/block/nbd.c
index 38d6b90ab243d2ab2ec63b863fff2c9a1d788ce7..a5812948d2bea77c807d9756750e81de6321f02f 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -28,10 +28,10 @@
 
 #include "qemu-common.h"
 #include "block/nbd.h"
-#include "uri.h"
+#include "qemu/uri.h"
 #include "block/block_int.h"
-#include "module.h"
-#include "qemu_socket.h"
+#include "qemu/module.h"
+#include "qemu/sockets.h"
 
 #include <sys/types.h>
 #include <unistd.h>
diff --git a/block/parallels.c b/block/parallels.c
index ae88cd63597f087518c2bbb34bd8b13e9a64e1cd..377375046f1f7f8325f81a15da19a67d3a5a4c1f 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -25,7 +25,7 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 
 /**************************************************************/
 
diff --git a/block/qcow.c b/block/qcow.c
index f36671196ef7b0f4037a7f0f1f890de9ab3cf728..4276610afd9341fdbeabb18113da1eb3d04af084 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include <zlib.h>
 #include "block/aes.h"
 #include "migration/migration.h"
diff --git a/block/qcow2.c b/block/qcow2.c
index 205d910a52d018ce7e502d9dd9cd8ecb62111dd9..d603f98a9c3b43d9080c14052c248a17411e2a54 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -23,11 +23,11 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include <zlib.h>
 #include "block/aes.h"
 #include "block/qcow2.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "qapi/qmp/qerror.h"
 #include "trace.h"
 
diff --git a/block/qed-table.c b/block/qed-table.c
index de845ec3d01fc7fe989e9aac6a52b8466a6eea2b..76d2dcccf81c3e911d72a57220b0ed1be3abd8f6 100644
--- a/block/qed-table.c
+++ b/block/qed-table.c
@@ -13,7 +13,7 @@
  */
 
 #include "trace.h"
-#include "qemu_socket.h" /* for EINPROGRESS on Windows */
+#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
 #include "qed.h"
 
 typedef struct {
diff --git a/block/qed.c b/block/qed.c
index 10d08274825df931803238566b073de390bc381b..cf85d8f2b44b43edb416ba7433c679efe47f06a6 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -12,7 +12,7 @@
  *
  */
 
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "trace.h"
 #include "qed.h"
 #include "qapi/qmp/qerror.h"
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 4e7388526916c88bc722cdf54c69dc09acfc9646..91159c7887183cebeaa2e169fd531aa3e924b720 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -22,13 +22,13 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
-#include "qemu-log.h"
+#include "qemu/timer.h"
+#include "qemu/log.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "trace.h"
 #include "block/thread-pool.h"
-#include "iov.h"
+#include "qemu/iov.h"
 #include "raw-aio.h"
 
 #if defined(__APPLE__) && (__MACH__)
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 9269fe84c09f3e8022e669bb75718994e96c0adb..f58334be0839c80243491dd72d34fc8bdee9ac17 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -22,13 +22,13 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "raw-aio.h"
 #include "trace.h"
 #include "block/thread-pool.h"
-#include "iov.h"
+#include "qemu/iov.h"
 #include <windows.h>
 #include <winioctl.h>
 
diff --git a/block/raw.c b/block/raw.c
index 6aec93dadbfb6ff484ea3c19dad265156fb34961..75812db3c2715a49c71ccd42688005628c03c3e1 100644
--- a/block/raw.c
+++ b/block/raw.c
@@ -1,7 +1,7 @@
 
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 
 static int raw_open(BlockDriverState *bs, int flags)
 {
diff --git a/block/rbd.c b/block/rbd.c
index 8def2f174caf0343d8ff6f39559256318af1dae2..8cd10a7b59421cb778c9ac57a009f466f16688b9 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -14,7 +14,7 @@
 #include <inttypes.h>
 
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "block/block_int.h"
 
 #include <rbd/librbd.h>
diff --git a/block/sheepdog.c b/block/sheepdog.c
index da70df2d00f46ffa39120683456e1201f0d5347f..13dc023fdbab071ec8be8bcf1b3c443beb5b4e0e 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -13,10 +13,10 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-error.h"
-#include "qemu_socket.h"
+#include "qemu/error-report.h"
+#include "qemu/sockets.h"
 #include "block/block_int.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
 
 #define SD_PROTO_VER 0x01
 
diff --git a/block/vdi.c b/block/vdi.c
index b1d199a2e54779180c7d1d530363434cf9618b18..7b6231941bacb2553ace49c97eb5912d2886ed33 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -51,7 +51,7 @@
 
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "migration/migration.h"
 
 #if defined(CONFIG_UUID)
diff --git a/block/vmdk.c b/block/vmdk.c
index 77a1a67c61fb97b8a1bd9c20746d4f1545b61c1e..19298c2a3ed0cf7aaf6e69411b38d9abe210b4af 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -25,7 +25,7 @@
 
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "migration/migration.h"
 #include <zlib.h>
 
diff --git a/block/vpc.c b/block/vpc.c
index 47b5518aee1a66ce0de951eb8c3a6ca3bbf2b84f..7948609e505482a4fb6458456af2ab178956a208 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -24,7 +24,7 @@
  */
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "migration/migration.h"
 #if defined(CONFIG_UUID)
 #include <uuid/uuid.h>
diff --git a/block/vvfat.c b/block/vvfat.c
index a63c3ea7cde33b47016cc39602890afe71794cff..83706ce5564acd100d94dc42f0d80da97b956fe7 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -26,7 +26,7 @@
 #include <dirent.h>
 #include "qemu-common.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "migration/migration.h"
 
 #ifndef S_IWGRP
diff --git a/block/win32-aio.c b/block/win32-aio.c
index 606e4d6925ece75234b1128f1dd42e6fbc05d691..46a5db78cc3dc5a22c4eff0e7d09fb5fd55b4485 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -22,13 +22,13 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "block/block_int.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "qemu-common.h"
 #include "block/aio.h"
 #include "raw-aio.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 #include <windows.h>
 #include <winioctl.h>
 
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index 596b47499d5b9a9e77eea7f7a5e7f1cbb36ca190..95b621699aba1913b14de3afae504af7f2907d44 100644
--- a/blockdev-nbd.c
+++ b/blockdev-nbd.c
@@ -17,7 +17,7 @@
 #include "qmp-commands.h"
 #include "trace.h"
 #include "block/nbd.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 
 static int server_fd = -1;
 
diff --git a/blockdev.c b/blockdev.c
index a2308fa718199a514a7d6efd8ce112ed4027ee09..3ebff4431061525847e5e2cd19aa319f6a31fae0 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -12,8 +12,8 @@
 #include "block/blockjob.h"
 #include "monitor/monitor.h"
 #include "qapi/qmp/qerror.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "qapi/qmp/types.h"
 #include "sysemu.h"
 #include "block/block_int.h"
diff --git a/blockdev.h b/blockdev.h
index 413486475847acb52422a4ccb5c8e004277535de..1fe533299ec5bd699905b68f3eddb94e403dc2cf 100644
--- a/blockdev.h
+++ b/blockdev.h
@@ -12,7 +12,7 @@
 
 #include "block/block.h"
 #include "qapi/error.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 void blockdev_mark_auto_del(BlockDriverState *bs);
 void blockdev_auto_del(BlockDriverState *bs);
diff --git a/blockjob.c b/blockjob.c
index 4bc60c737844b3607193f27c96d05f7fe847ffb6..ca80df1d0e5c229979e4ba1baa4624798f43baf1 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -33,7 +33,7 @@
 #include "qapi/qmp/qjson.h"
 #include "block/coroutine.h"
 #include "qmp-commands.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 void *block_job_create(const BlockJobType *job_type, BlockDriverState *bs,
                        int64_t speed, BlockDriverCompletionFunc *cb,
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 095ae8eaaaecdbbbc2d435bc351cef144eafb3a9..1dc033046bf9077597a1e0aafa6e4d3a4eee5af6 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -31,8 +31,8 @@
 /* For tb_lock */
 #include "cpu.h"
 #include "tcg.h"
-#include "qemu-timer.h"
-#include "envlist.h"
+#include "qemu/timer.h"
+#include "qemu/envlist.h"
 
 #define DEBUG_LOGFILE "/tmp/qemu.log"
 
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index c64c3ccca3dfc430cbbde9de5fc444a2b51aa8ca..a826086dab63cb103eb8a8c84af1cef3869fb966 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -146,7 +146,7 @@ int get_osversion(void);
 void fork_start(void);
 void fork_end(int child);
 
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 /* strace.c */
 void
diff --git a/bt-host.c b/bt-host.c
index 65aaca337c5fcc2435162cc877069507d3c87381..4f5f9f93c58dee2a9c8f4917ad8c963ffae5be27 100644
--- a/bt-host.c
+++ b/bt-host.c
@@ -19,7 +19,7 @@
 
 #include "qemu-common.h"
 #include "bt-host.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 #ifndef _WIN32
 # include <errno.h>
diff --git a/bt-vhci.c b/bt-vhci.c
index 13c0e53729fb01471939bd565eaa4b79f19ce4e4..f5d856a80940ba60a1ed01c2974397f18cc655b0 100644
--- a/bt-vhci.c
+++ b/bt-vhci.c
@@ -20,7 +20,7 @@
 #include "qemu-common.h"
 #include "bt-host.h"
 #include "hw/bt.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 #define VHCI_DEV	"/dev/vhci"
 #define VHCI_UDEV	"/dev/hci_vhci"
diff --git a/buffered_file.c b/buffered_file.c
index f13443ee9135b7d4d75d85aa225ea9f3276cba5b..27627a1b71572d49ccda329259b704e7726ef17f 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -15,7 +15,7 @@
 
 #include "qemu-common.h"
 #include "hw/hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "buffered_file.h"
 
 //#define DEBUG_BUFFERED_FILE
diff --git a/cache-utils.c b/cache-utils.c
index 2db5af2db14d025a5b24c606191c020028480a36..b94013a8cb921cb4d90a5c007c74e243a42f8146 100644
--- a/cache-utils.c
+++ b/cache-utils.c
@@ -1,4 +1,4 @@
-#include "cache-utils.h"
+#include "qemu/cache-utils.h"
 
 #if defined(_ARCH_PPC)
 struct qemu_cache_conf qemu_cache_conf = {
diff --git a/cmd.c b/cmd.c
index 01a8c3a299b28a4252e64c75341161f196bfac54..10a8688b2d25f47e4c552b4ec9ec675dc62b62f7 100644
--- a/cmd.c
+++ b/cmd.c
@@ -25,7 +25,7 @@
 
 #include "cmd.h"
 #include "block/aio.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 #define _(x)	x	/* not gettext support yet */
 
diff --git a/compatfd.c b/compatfd.c
index 42f81cafe49e83abbf2f4ea6991f5d519bd855de..9cf3f2834d5857d39605371f975802299c171b51 100644
--- a/compatfd.c
+++ b/compatfd.c
@@ -14,7 +14,7 @@
  */
 
 #include "qemu-common.h"
-#include "compatfd.h"
+#include "qemu/compatfd.h"
 
 #include <sys/syscall.h>
 #include <pthread.h>
diff --git a/cpu-exec.c b/cpu-exec.c
index b5a32b84e45c332982a0d75e6fa49597f571ed54..54e62ed551fa1aa951dc72ce20dd4b01855b9404 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -20,7 +20,7 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg.h"
-#include "qemu-barrier.h"
+#include "qemu/atomic.h"
 #include "qtest.h"
 
 int tb_invalidated_flag;
diff --git a/cpus.c b/cpus.c
index 3a66401e0dcf4e5057bf1b18910274cb0e9d00de..036418d62ce3f4a50a1ada593c965522d3e34f4c 100644
--- a/cpus.c
+++ b/cpus.c
@@ -32,14 +32,14 @@
 #include "kvm.h"
 #include "qmp-commands.h"
 
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "cpus.h"
 #include "qtest.h"
-#include "main-loop.h"
-#include "bitmap.h"
+#include "qemu/main-loop.h"
+#include "qemu/bitmap.h"
 
 #ifndef _WIN32
-#include "compatfd.h"
+#include "qemu/compatfd.h"
 #endif
 
 #ifdef CONFIG_LINUX
diff --git a/cutils.c b/cutils.c
index 4f0692f78ed1a7e6133db6eb97203876d78609f2..d06590b33034057ebbfdbba5919e9d21e1075089 100644
--- a/cutils.c
+++ b/cutils.c
@@ -22,11 +22,11 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include <math.h>
 
-#include "qemu_socket.h"
-#include "iov.h"
+#include "qemu/sockets.h"
+#include "qemu/iov.h"
 
 void strpadcpy(char *buf, int buf_size, const char *str, char pad)
 {
diff --git a/device_tree.c b/device_tree.c
index a9236133c7fa957b8967f9883730d61b2f2d8970..c3e1ba49046d5d3df50eb1112a5efed012006d4d 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -22,8 +22,8 @@
 #include "qemu-common.h"
 #include "device_tree.h"
 #include "hw/loader.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 
 #include <libfdt.h>
 
diff --git a/dma-helpers.c b/dma-helpers.c
index 4f5fb649e764756846676a37edfcf6e2d039d31f..e6a6dd82fd1110ffcad6081e0c350f46ec301eb9 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -9,8 +9,8 @@
 
 #include "dma.h"
 #include "trace.h"
-#include "range.h"
-#include "qemu-thread.h"
+#include "qemu/range.h"
+#include "qemu/thread.h"
 
 /* #define DEBUG_IOMMU */
 
diff --git a/envlist.c b/envlist.c
index f2303cdd79d33c80cb9e9b7b21473754a86205c0..ff99fc44e97329e6bd8f0ea19b7ea26503d62830 100644
--- a/envlist.c
+++ b/envlist.c
@@ -4,8 +4,8 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "qemu-queue.h"
-#include "envlist.h"
+#include "qemu/queue.h"
+#include "qemu/envlist.h"
 
 struct envlist_entry {
 	const char *ev_var;			/* actual env value */
diff --git a/event_notifier-posix.c b/event_notifier-posix.c
index f0bd839acd94022daec5f94d022fbab5bc9f68d4..a53b95688d7e2bf42d3ecbeb0879364756fd4fab 100644
--- a/event_notifier-posix.c
+++ b/event_notifier-posix.c
@@ -11,9 +11,9 @@
  */
 
 #include "qemu-common.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 #include "qemu-char.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 #ifdef CONFIG_EVENTFD
 #include <sys/eventfd.h>
diff --git a/event_notifier-win32.c b/event_notifier-win32.c
index 4ed21c2a7c8729876748d4c9198a8b1eafbd41ae..6dbb530cfae21c1c7d0f6b9a1745049a80a6e028 100644
--- a/event_notifier-win32.c
+++ b/event_notifier-win32.c
@@ -11,8 +11,8 @@
  */
 
 #include "qemu-common.h"
-#include "event_notifier.h"
-#include "main-loop.h"
+#include "qemu/event_notifier.h"
+#include "qemu/main-loop.h"
 
 int event_notifier_init(EventNotifier *e, int active)
 {
diff --git a/exec.c b/exec.c
index 17fc7cf854b4022068aa42f71e606342d7aada2e..917bec0ecd02442a1771c0fe63be5349acc627d1 100644
--- a/exec.c
+++ b/exec.c
@@ -29,11 +29,11 @@
 #include "tcg.h"
 #include "hw/hw.h"
 #include "hw/qdev.h"
-#include "osdep.h"
+#include "qemu/osdep.h"
 #include "kvm.h"
 #include "hw/xen.h"
-#include "qemu-timer.h"
-#include "qemu-config.h"
+#include "qemu/timer.h"
+#include "qemu/config-file.h"
 #include "exec/memory.h"
 #include "dma.h"
 #include "exec/address-spaces.h"
diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index d8999b311aa95351d680fc92e1b364bf37dfd199..0946f0739dae3593cfc4e18ceeecd001f91ccc37 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -44,7 +44,7 @@ these four paragraphs for those parts of this code that are retained.
 
 #include <inttypes.h>
 #include "config-host.h"
-#include "osdep.h"
+#include "qemu/osdep.h"
 
 /*----------------------------------------------------------------------------
 | Each of the following `typedef's defines the most convenient type that holds
diff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c
index 300f2758bed5e3d7cc9c34e1da95e5b5a5ce1d6b..4bcf38fe4bdf51cd7fcb776592a875b7917af87d 100644
--- a/fsdev/qemu-fsdev-dummy.c
+++ b/fsdev/qemu-fsdev-dummy.c
@@ -13,8 +13,8 @@
 #include <stdio.h>
 #include <string.h>
 #include "qemu-fsdev.h"
-#include "qemu-config.h"
-#include "module.h"
+#include "qemu/config-file.h"
+#include "qemu/module.h"
 
 int qemu_fsdev_add(QemuOpts *opts)
 {
diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c
index e20202a4bfb033c3ad3fdf6e00ae96643e3f2e56..4cc04d4fde49622e54e01df158c27e6f829981d0 100644
--- a/fsdev/qemu-fsdev.c
+++ b/fsdev/qemu-fsdev.c
@@ -13,10 +13,10 @@
 #include <stdio.h>
 #include <string.h>
 #include "qemu-fsdev.h"
-#include "qemu-queue.h"
-#include "osdep.h"
+#include "qemu/queue.h"
+#include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 
 static QTAILQ_HEAD(FsDriverEntry_head, FsDriverListEntry) fsdriver_entries =
     QTAILQ_HEAD_INITIALIZER(fsdriver_entries);
diff --git a/fsdev/qemu-fsdev.h b/fsdev/qemu-fsdev.h
index 1af1f545d87babb3f3c39640e5ba438a70b49c03..9fa45bf5107c4e85d3b804d73c15fde1d938b6ce 100644
--- a/fsdev/qemu-fsdev.h
+++ b/fsdev/qemu-fsdev.h
@@ -12,7 +12,7 @@
  */
 #ifndef QEMU_FSDEV_H
 #define QEMU_FSDEV_H
-#include "qemu-option.h"
+#include "qemu/option.h"
 #include "file-op-9p.h"
 
 
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index df2a9392b10f507afadce7efe27884eb6bc6b89e..6b9afd32d59ff8e1c8032babeb4a47be47502171 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -21,8 +21,8 @@
 #include <linux/magic.h>
 #endif
 #include "qemu-common.h"
-#include "qemu_socket.h"
-#include "qemu-xattr.h"
+#include "qemu/sockets.h"
+#include "qemu/xattr.h"
 #include "virtio-9p-marshal.h"
 #include "hw/9pfs/virtio-9p-proxy.h"
 #include "fsdev/virtio-9p-marshal.h"
diff --git a/fsdev/virtio-9p-marshal.c b/fsdev/virtio-9p-marshal.c
index bf980bfa38f4c7b5c5f17a4c46b61968e86f8fe9..20f308b76025d0f62d0143a5614f4b3797e073d6 100644
--- a/fsdev/virtio-9p-marshal.c
+++ b/fsdev/virtio-9p-marshal.c
@@ -22,9 +22,9 @@
 #include <stdint.h>
 #include <errno.h>
 
-#include "compiler.h"
+#include "qemu/compiler.h"
 #include "virtio-9p-marshal.h"
-#include "bswap.h"
+#include "qemu/bswap.h"
 
 void v9fs_string_free(V9fsString *str)
 {
diff --git a/gdbstub.c b/gdbstub.c
index 9395c829a203a9e6a9680f7ff654958e51bd2715..4b178a608fe58723e1a25174f4b87dd54eddf508 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -38,7 +38,7 @@
 #define MAX_PACKET_LENGTH 4096
 
 #include "cpu.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "kvm.h"
 
 #ifndef TARGET_CPU_MEMORY_RW_DEBUG
diff --git a/hmp.c b/hmp.c
index a76a8f06ea243f1dc5d58e84ac50386125781313..3d056b0e387e650c81c191ad57411e34bf8a3ba0 100644
--- a/hmp.c
+++ b/hmp.c
@@ -16,10 +16,10 @@
 #include "hmp.h"
 #include "net/net.h"
 #include "qemu-char.h"
-#include "qemu-option.h"
-#include "qemu-timer.h"
+#include "qemu/option.h"
+#include "qemu/timer.h"
 #include "qmp-commands.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "monitor/monitor.h"
 #include "ui/console.h"
 
diff --git a/host-utils.c b/host-utils.c
index dc9612387b3ebe46ce52be2e5bc9104b2999da4f..5e3915abba46911a1f221540749ecb2e57c834be 100644
--- a/host-utils.c
+++ b/host-utils.c
@@ -25,7 +25,7 @@
 
 #include <stdlib.h>
 #include <stdint.h>
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 //#define DEBUG_MULDIV
 
diff --git a/hw/9pfs/codir.c b/hw/9pfs/codir.c
index cd137330b906cc58f3207e69e4ab777ed3e0a2c3..65ad3298be9ce2e3b4a4f1ca1fd110cc74c8b02d 100644
--- a/hw/9pfs/codir.c
+++ b/hw/9pfs/codir.c
@@ -13,7 +13,7 @@
  */
 
 #include "fsdev/qemu-fsdev.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 #include "virtio-9p-coth.h"
 
diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c
index 6d6dac7abf195a42f07fdb0469837c5589d2b3b7..2efebf35710f4fd5dde18774b4bd54d11ec6bf3d 100644
--- a/hw/9pfs/cofile.c
+++ b/hw/9pfs/cofile.c
@@ -13,7 +13,7 @@
  */
 
 #include "fsdev/qemu-fsdev.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 #include "virtio-9p-coth.h"
 
diff --git a/hw/9pfs/cofs.c b/hw/9pfs/cofs.c
index 4b9ba30157a37701dc657f7acb6b5ed234ee4a7d..389105074852080dd3c1bb52d298073b86aa480e 100644
--- a/hw/9pfs/cofs.c
+++ b/hw/9pfs/cofs.c
@@ -13,7 +13,7 @@
  */
 
 #include "fsdev/qemu-fsdev.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 #include "virtio-9p-coth.h"
 
diff --git a/hw/9pfs/coxattr.c b/hw/9pfs/coxattr.c
index 08365a697e4fc7bad00de983898ec1da6acf1b5b..18ee08df0f5fc386a563526b86e44666938c5c14 100644
--- a/hw/9pfs/coxattr.c
+++ b/hw/9pfs/coxattr.c
@@ -13,7 +13,7 @@
  */
 
 #include "fsdev/qemu-fsdev.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 #include "virtio-9p-coth.h"
 
diff --git a/hw/9pfs/virtio-9p-coth.c b/hw/9pfs/virtio-9p-coth.c
index 958725e5cc543fd40c526c528b740005d897f0bc..ae6cde80053e5894aada975e1a0731a3d8d9ac4f 100644
--- a/hw/9pfs/virtio-9p-coth.c
+++ b/hw/9pfs/virtio-9p-coth.c
@@ -13,7 +13,7 @@
  */
 
 #include "fsdev/qemu-fsdev.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 #include "virtio-9p-coth.h"
 
diff --git a/hw/9pfs/virtio-9p-coth.h b/hw/9pfs/virtio-9p-coth.h
index 8c48a16c10bae1c404e870d9063e8eadc6bb4f11..86d5ed416999677874864784078fd6759ab47c6b 100644
--- a/hw/9pfs/virtio-9p-coth.h
+++ b/hw/9pfs/virtio-9p-coth.h
@@ -15,7 +15,7 @@
 #ifndef _QEMU_VIRTIO_9P_COTH_H
 #define _QEMU_VIRTIO_9P_COTH_H
 
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 #include "virtio-9p.h"
 #include <glib.h>
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index b8220abae796f3ee2892f9ae3497324fc387b6cf..6761bce9dc5b5d52c5ca23c5bde8a553c1807987 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -13,7 +13,7 @@
 
 #include "hw/virtio.h"
 #include "hw/pc.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "hw/virtio-pci.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c
index f96d17a9749a6f672741ff4dcb98da81d1dcc3ce..e30fdb6730e68dbf651d5b305446900a3103f7ae 100644
--- a/hw/9pfs/virtio-9p-handle.c
+++ b/hw/9pfs/virtio-9p-handle.c
@@ -19,7 +19,7 @@
 #include <grp.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-#include "qemu-xattr.h"
+#include "qemu/xattr.h"
 #include <unistd.h>
 #include <linux/fs.h>
 #ifdef CONFIG_LINUX_MAGIC_H
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index 33a41d2e18b60aab8c87cab8834c03a442fc5ca7..113602144cdc338a69bced601c3a2638fa448524 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -19,7 +19,7 @@
 #include <grp.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-#include "qemu-xattr.h"
+#include "qemu/xattr.h"
 #include <libgen.h>
 #include <linux/fs.h>
 #ifdef CONFIG_LINUX_MAGIC_H
diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c
index c064017b1fb50303f7865557e094a7b82fd359af..08bb0e8bcaf91105783165aa1d7fd869f93e4ebb 100644
--- a/hw/9pfs/virtio-9p-posix-acl.c
+++ b/hw/9pfs/virtio-9p-posix-acl.c
@@ -12,7 +12,7 @@
  */
 
 #include <sys/types.h>
-#include "qemu-xattr.h"
+#include "qemu/xattr.h"
 #include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
diff --git a/hw/9pfs/virtio-9p-xattr.h b/hw/9pfs/virtio-9p-xattr.h
index 9437280c99e4a55d34330f34f6f95b073cef7162..41cc6cbc7ba0802b7635409228b5c2ad7e628a56 100644
--- a/hw/9pfs/virtio-9p-xattr.h
+++ b/hw/9pfs/virtio-9p-xattr.h
@@ -13,7 +13,7 @@
 #ifndef _QEMU_VIRTIO_9P_XATTR_H
 #define _QEMU_VIRTIO_9P_XATTR_H
 
-#include "qemu-xattr.h"
+#include "qemu/xattr.h"
 
 typedef struct xattr_operations
 {
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index ede20ce80e7fd6c3775694e67aaa32313c7f1c1f..0aaf0d2de0741241047b04685bae6e355743f3cb 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -13,7 +13,7 @@
 
 #include "hw/virtio.h"
 #include "hw/pc.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "hw/virtio-pci.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
index 2c0c3baad409a404bd6191adeadc4035c267206f..406fe522db85a2656bf27c60b2aa84bfb680da91 100644
--- a/hw/9pfs/virtio-9p.h
+++ b/hw/9pfs/virtio-9p.h
@@ -9,7 +9,7 @@
 #include "hw/virtio.h"
 #include "fsdev/file-op-9p.h"
 #include "fsdev/virtio-9p-marshal.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 
 
diff --git a/hw/acpi.h b/hw/acpi.h
index afda153d0963525e603eac3900aefd0f04d56875..c3628d070dbe7e3bc52bbd1104f72dc265b008b9 100644
--- a/hw/acpi.h
+++ b/hw/acpi.h
@@ -127,7 +127,7 @@ void acpi_pm_tmr_init(ACPIREGS *ar, acpi_update_sci_fn update_sci,
                       MemoryRegion *parent);
 void acpi_pm_tmr_reset(ACPIREGS *ar);
 
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 static inline int64_t acpi_pm_tmr_get_clock(void)
 {
     return muldiv64(qemu_get_clock_ns(vm_clock), PM_TIMER_FREQUENCY,
diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c
index 92af3a554cdaf84da93ecb9c18df590996641690..8d1a689a364ec16007de7447c5b42533e9d17609 100644
--- a/hw/acpi_ich9.c
+++ b/hw/acpi_ich9.c
@@ -26,7 +26,7 @@
 #include "hw.h"
 #include "pc.h"
 #include "pci/pci.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "acpi.h"
 #include "kvm.h"
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 4f43f6e070318ac103b7aabcabf4c9db38f8fe77..ebd015dc02c5eec8d23780e4d7c41ad8326667f5 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -25,7 +25,7 @@
 #include "pci/pci.h"
 #include "acpi.h"
 #include "sysemu.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "exec/ioport.h"
 #include "fw_cfg.h"
 #include "exec/address-spaces.h"
diff --git a/hw/adlib.c b/hw/adlib.c
index d39cd97384d26e1ca752ab3dc65d739f3b3b9b48..07c69fc967842a8ff556d69072751cbed30634da 100644
--- a/hw/adlib.c
+++ b/hw/adlib.c
@@ -32,7 +32,7 @@
 #define ADLIB_KILL_TIMERS 1
 
 #ifdef DEBUG
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #endif
 
 #define dolog(...) AUD_log ("adlib", __VA_ARGS__)
diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
index 7e7b1d27d2fabaa241a2bcb72d105c4a78f6060d..78d93e55ece6a169a4d099f7335fc1cb2d2b57d2 100644
--- a/hw/alpha_pci.c
+++ b/hw/alpha_pci.c
@@ -8,7 +8,7 @@
 
 #include "config.h"
 #include "alpha_sys.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "sysemu.h"
 
 
diff --git a/hw/apic.c b/hw/apic.c
index d66a476aac36c1028d1e5ebaea5b343661ff43e4..81b82f694c6d4c871889d979e4f0b94a85561d27 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -16,12 +16,12 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>
  */
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "apic_internal.h"
 #include "apic.h"
 #include "ioapic.h"
 #include "pci/msi.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "trace.h"
 #include "pc.h"
 #include "apic-msidef.h"
diff --git a/hw/apic_internal.h b/hw/apic_internal.h
index fea95654cabca7fb7fa7976dd1ede8901c511f9b..dcbbfd41cb9f5c7deafdd28d2c53d69e901eef99 100644
--- a/hw/apic_internal.h
+++ b/hw/apic_internal.h
@@ -22,7 +22,7 @@
 
 #include "exec/memory.h"
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /* APIC Local Vector Table */
 #define APIC_LVT_TIMER                  0
diff --git a/hw/applesmc.c b/hw/applesmc.c
index 91e7cb3d5c53ebd674da35ff1243f2ea55412136..c564b60c0a3256dbf7d80e6886735dcaaa6d3f38 100644
--- a/hw/applesmc.c
+++ b/hw/applesmc.c
@@ -33,7 +33,7 @@
 #include "hw.h"
 #include "isa.h"
 #include "ui/console.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /* #define DEBUG_SMC */
 
diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c
index 640ed20a6134d5ee97cd833aea67eb99d407c4e4..093331124a3bfd4a4f157bcfb66753ecea01e39f 100644
--- a/hw/arm11mpcore.c
+++ b/hw/arm11mpcore.c
@@ -8,7 +8,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /* MPCore private memory region.  */
 
diff --git a/hw/arm_boot.c b/hw/arm_boot.c
index 63ff559cf725d34ac791a02e183e431b4f5eadd8..bb9889fbefca48e603e14791c3aab998d2e02b42 100644
--- a/hw/arm_boot.c
+++ b/hw/arm_boot.c
@@ -15,7 +15,7 @@
 #include "loader.h"
 #include "elf.h"
 #include "device_tree.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 
 #define KERNEL_ARGS_ADDR 0x100
 #define KERNEL_LOAD_ADDR 0x00010000
diff --git a/hw/arm_mptimer.c b/hw/arm_mptimer.c
index 67908322360b92410a51e08d66ba03fcedab4308..1febaeb7b1bc610396a157fd599ab2be6c87d3f0 100644
--- a/hw/arm_mptimer.c
+++ b/hw/arm_mptimer.c
@@ -20,7 +20,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /* This device implements the per-cpu private timer and watchdog block
  * which is used in both the ARM11MPCore and Cortex-A9MP.
diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c
index 58eb98216d1c288fb873e847520f148cd7ea593f..0884f6275cc84ff67e966fb1df2f2aa0a29a0eb8 100644
--- a/hw/arm_sysctl.c
+++ b/hw/arm_sysctl.c
@@ -8,7 +8,7 @@
  */
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysbus.h"
 #include "primecell.h"
 #include "sysemu.h"
diff --git a/hw/arm_timer.c b/hw/arm_timer.c
index af339d3d19096b5ec202168fd75f50e1834baa28..37e28e993c4433016631530fdb3e1d6086660e9a 100644
--- a/hw/arm_timer.c
+++ b/hw/arm_timer.c
@@ -8,7 +8,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-common.h"
 #include "qdev.h"
 #include "ptimer.h"
diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c
index 270c30771708cb134c38f033d500998b867e1ead..0907e42c0c7a8278bec30df28f69f6d6abc8bee0 100644
--- a/hw/armv7m_nvic.c
+++ b/hw/armv7m_nvic.c
@@ -11,7 +11,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "arm-misc.h"
 #include "exec/address-spaces.h"
 #include "arm_gic_internal.h"
diff --git a/hw/baum.c b/hw/baum.c
index 3e94f84e51304542645a08be14b16970fd89a7fb..97d13ea3441bc3258e459e809b516382f838ee7f 100644
--- a/hw/baum.c
+++ b/hw/baum.c
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "qemu-char.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "usb.h"
 #include "baum.h"
 #include <brlapi.h>
diff --git a/hw/block-common.c b/hw/block-common.c
index f0196d78dc47b1f9aa7e3854115b15cc830e75b4..c24208e56030ebaad31da7f03f06f80d57c69347 100644
--- a/hw/block-common.c
+++ b/hw/block-common.c
@@ -9,7 +9,7 @@
 
 #include "blockdev.h"
 #include "hw/block-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 void blkconf_serial(BlockConf *conf, char **serial)
 {
diff --git a/hw/bt-hci-csr.c b/hw/bt-hci-csr.c
index 0faabbb5853883b8e33b46e517eef0809ae54bb5..e1dcb6d099c610eaaac79e9cc8619ad9ba9eca80 100644
--- a/hw/bt-hci-csr.c
+++ b/hw/bt-hci-csr.c
@@ -20,7 +20,7 @@
 
 #include "qemu-common.h"
 #include "qemu-char.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "irq.h"
 #include "bt-host.h"
 #include "bt.h"
diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index d2ad57faa98f736265a95e88aa15933cf1ee7fc9..da096d8c37f5258ee01ebc5e8de9e567f3afa558 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -19,7 +19,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "usb.h"
 #include "bt-host.h"
 #include "bt.h"
diff --git a/hw/bt-hid.c b/hw/bt-hid.c
index 0ec0c013b061b0521e7f6bdd601acbc7693ad055..cfa7c145b88075526d01b851742ebe229058a324 100644
--- a/hw/bt-hid.c
+++ b/hw/bt-hid.c
@@ -19,7 +19,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ui/console.h"
 #include "hid.h"
 #include "bt.h"
diff --git a/hw/bt-l2cap.c b/hw/bt-l2cap.c
index cb43ee773340d8f5348b07d98fcaf6e4c6de60a5..ba061c0da32762297fe23fbe8ca04c19157a3833 100644
--- a/hw/bt-l2cap.c
+++ b/hw/bt-l2cap.c
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "bt.h"
 
 #define L2CAP_CID_MAX	0x100	/* Between 0x40 and 0x10000 */
diff --git a/hw/cadence_ttc.c b/hw/cadence_ttc.c
index ec78a5218077eab1290253d0335b6fe8bed197e2..9e1cb1f15263651cc2c075d651c09fb16421a800 100644
--- a/hw/cadence_ttc.c
+++ b/hw/cadence_ttc.c
@@ -17,7 +17,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #ifdef CADENCE_TTC_ERR_DEBUG
 #define DB_PRINT(...) do { \
diff --git a/hw/cadence_uart.c b/hw/cadence_uart.c
index 686e6172d01d74e5cd1be737cb8bfd05222c34b8..f34acc8c46e589443d130c05204e8b5a8defa92c 100644
--- a/hw/cadence_uart.c
+++ b/hw/cadence_uart.c
@@ -18,7 +18,7 @@
 
 #include "sysbus.h"
 #include "qemu-char.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #ifdef CADENCE_UART_ERR_DEBUG
 #define DB_PRINT(...) do { \
diff --git a/hw/ccid-card-emulated.c b/hw/ccid-card-emulated.c
index 845a764446e2c38dfb0c327d0771f5d1c70211bd..e5083804825fa36c7b669934be51411518dda142 100644
--- a/hw/ccid-card-emulated.c
+++ b/hw/ccid-card-emulated.c
@@ -31,7 +31,7 @@
 #include <vreader.h>
 #include <vcard_emul.h>
 
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "qemu-char.h"
 #include "monitor/monitor.h"
 #include "hw/ccid.h"
diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c
index f5b4794e90786ceaad5ed87123320e86821962b2..48e4228b9dc141890eb6bd3bf4055b15a4a859c6 100644
--- a/hw/ccid-card-passthru.c
+++ b/hw/ccid-card-passthru.c
@@ -9,7 +9,7 @@
  */
 
 #include "qemu-char.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "monitor/monitor.h"
 #include "hw/ccid.h"
 #include "libcacard/vscard_common.h"
diff --git a/hw/cs4231a.c b/hw/cs4231a.c
index 0257fd8d2ad30bd7e7e92b421c83f0be71cc9687..9d528c43b0e2acb6fc979b791167e6f467173161 100644
--- a/hw/cs4231a.c
+++ b/hw/cs4231a.c
@@ -26,7 +26,7 @@
 #include "audio/audio.h"
 #include "isa.h"
 #include "qdev.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /*
   Missing features:
diff --git a/hw/cuda.c b/hw/cuda.c
index f1f408b839348bea3898ffb42fac3f488e418f64..cf83956e1ac7e6b7db8a13df8d171a4afad11c45 100644
--- a/hw/cuda.c
+++ b/hw/cuda.c
@@ -25,7 +25,7 @@
 #include "hw.h"
 #include "ppc_mac.h"
 #include "adb.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 
 /* XXX: implement all timer modes */
diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index 809a598e3aa78d7d01c2d410ddaec1c36e1f9e10..34543786e580b2992d21785e4202013c7f6e678a 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -25,7 +25,7 @@
 #include "hw.h"
 #include "boards.h"
 #include "blockdev.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 #include "sysemu.h"
 #include "monitor/monitor.h"
 
diff --git a/hw/dma.c b/hw/dma.c
index 364f54d2d7091640415aab7265e8128d34eb3ff2..0634baa552d10170c30a7310b0a81422ef7c9a7f 100644
--- a/hw/dma.c
+++ b/hw/dma.c
@@ -23,7 +23,7 @@
  */
 #include "hw.h"
 #include "isa.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 /* #define DEBUG_DMA */
 
diff --git a/hw/dp8393x.c b/hw/dp8393x.c
index d59b6118ada738f261a9fdbabfe9c059c0041ec9..b5014501df36dde545ab7216aa28626726a54939 100644
--- a/hw/dp8393x.c
+++ b/hw/dp8393x.c
@@ -18,7 +18,7 @@
  */
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "net/net.h"
 #include "mips.h"
 
diff --git a/hw/esp-pci.c b/hw/esp-pci.c
index d433473d6a321e8e88dfd4fda4a7f81316a7fb30..c949e6e0d9e7d3abb16dac545f451606223d2c01 100644
--- a/hw/esp-pci.c
+++ b/hw/esp-pci.c
@@ -27,7 +27,7 @@
 #include "eeprom93xx.h"
 #include "esp.h"
 #include "trace.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #define TYPE_AM53C974_DEVICE "am53c974"
 
diff --git a/hw/esp.c b/hw/esp.c
index 6d01624a492616efec0a4df11b4c5a43f378ebef..0e4e430880295d9386e43979441adeeda1e3facd 100644
--- a/hw/esp.c
+++ b/hw/esp.c
@@ -26,7 +26,7 @@
 #include "sysbus.h"
 #include "esp.h"
 #include "trace.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 /*
  * On Sparc32, this is the ESP (NCR53C90) part of chip STP2000 (Master I/O),
diff --git a/hw/etraxfs_ser.c b/hw/etraxfs_ser.c
index ee0d72bf87f7aed72c492f54399c2b8d163548c7..59cb7d217285540181a91932c52ac4dc0f21b025 100644
--- a/hw/etraxfs_ser.c
+++ b/hw/etraxfs_ser.c
@@ -24,7 +24,7 @@
 
 #include "sysbus.h"
 #include "qemu-char.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #define D(x)
 
diff --git a/hw/etraxfs_timer.c b/hw/etraxfs_timer.c
index f5601dc7a5f812c4a0c5e3c53d8cce9d700ebafe..cc8b32771596fb5abbbce31d905aa9f207ef4b6d 100644
--- a/hw/etraxfs_timer.c
+++ b/hw/etraxfs_timer.c
@@ -23,7 +23,7 @@
  */
 #include "sysbus.h"
 #include "sysemu.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 
 #define D(x)
diff --git a/hw/exynos4210_fimd.c b/hw/exynos4210_fimd.c
index cfca72ab676a3cfbff99de2641c80ed356a90f87..5c29b5d01d003dd6e09e2175143001d2c8ba8c89 100644
--- a/hw/exynos4210_fimd.c
+++ b/hw/exynos4210_fimd.c
@@ -27,7 +27,7 @@
 #include "sysbus.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
-#include "bswap.h"
+#include "qemu/bswap.h"
 
 /* Debug messages configuration */
 #define EXYNOS4210_FIMD_DEBUG              0
diff --git a/hw/exynos4210_i2c.c b/hw/exynos4210_i2c.c
index 1e11d9b48c48ceff6e2ef8daf73f3b30b5da5353..cefd736092d4377abb53984c48d318df99e1a8f2 100644
--- a/hw/exynos4210_i2c.c
+++ b/hw/exynos4210_i2c.c
@@ -20,7 +20,7 @@
  *
  */
 
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysbus.h"
 #include "i2c.h"
 
diff --git a/hw/exynos4210_mct.c b/hw/exynos4210_mct.c
index 37dbda92df0cb42bbdd52119efa537a3f1868963..41cd142227fde6408f3d44573adc1e283225c7b9 100644
--- a/hw/exynos4210_mct.c
+++ b/hw/exynos4210_mct.c
@@ -53,7 +53,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-common.h"
 #include "ptimer.h"
 
diff --git a/hw/exynos4210_pwm.c b/hw/exynos4210_pwm.c
index 5e2872f8f7cd9296fe1cd19841f1b1c71fc888c8..3a3eb8c27a2ca77d53f0331da287f18563c4cb74 100644
--- a/hw/exynos4210_pwm.c
+++ b/hw/exynos4210_pwm.c
@@ -21,7 +21,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-common.h"
 #include "ptimer.h"
 
diff --git a/hw/exynos4210_rtc.c b/hw/exynos4210_rtc.c
index c4fbd49461ff3a1c13a0aec401cc74388b6d5038..6ebc9b1790d5522c8e0f5bd3fdb79fe4c4757463 100644
--- a/hw/exynos4210_rtc.c
+++ b/hw/exynos4210_rtc.c
@@ -26,12 +26,12 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-common.h"
 #include "ptimer.h"
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 
 #include "exynos4210.h"
diff --git a/hw/fdc.c b/hw/fdc.c
index 29b5449ff8dcfd073fe912210a38a4e0de4cc2f5..b67d3a574b52ae56589c6be573d058a8f50b4814 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -29,14 +29,14 @@
 
 #include "hw.h"
 #include "fdc.h"
-#include "qemu-error.h"
-#include "qemu-timer.h"
+#include "qemu/error-report.h"
+#include "qemu/timer.h"
 #include "isa.h"
 #include "sysbus.h"
 #include "qdev-addr.h"
 #include "blockdev.h"
 #include "sysemu.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 /********************************************************/
 /* debug Floppy devices */
diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c
index 7b0e50f70db5cd0a73492e562cf0e2d88b33c022..2a00163a0419d203b1ec12a42872b567a52e08f7 100644
--- a/hw/fw_cfg.c
+++ b/hw/fw_cfg.c
@@ -26,8 +26,8 @@
 #include "isa.h"
 #include "fw_cfg.h"
 #include "sysbus.h"
-#include "qemu-error.h"
-#include "qemu-config.h"
+#include "qemu/error-report.h"
+#include "qemu/config-file.h"
 
 /* debug firmware config */
 //#define DEBUG_FW_CFG
diff --git a/hw/grlib_gptimer.c b/hw/grlib_gptimer.c
index 2fdccfba06258119458e6d8a417aef4ab24d9c81..252ba893e3acb320fc7a097050583a05a99db254 100644
--- a/hw/grlib_gptimer.c
+++ b/hw/grlib_gptimer.c
@@ -23,7 +23,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 
 #include "trace.h"
diff --git a/hw/hid.c b/hw/hid.c
index 7935998e83872700f79b31b868964516ceed334a..0fee3b6dddc8340da6400aba36d5b96977c96203 100644
--- a/hw/hid.c
+++ b/hw/hid.c
@@ -24,7 +24,7 @@
  */
 #include "hw.h"
 #include "ui/console.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "hid.h"
 
 #define HID_USAGE_ERROR_ROLLOVER        0x01
diff --git a/hw/hpet.c b/hw/hpet.c
index 49e1b631b5f52370cee9785d11568ee97a5a84a7..78c0662dfca4225955517cd0552e6101af7a1a08 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -27,7 +27,7 @@
 #include "hw.h"
 #include "pc.h"
 #include "ui/console.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "hpet_emul.h"
 #include "sysbus.h"
 #include "mc146818rtc.h"
diff --git a/hw/hw.h b/hw/hw.h
index 883ddb60f9ae0b45289e4562b39ea3274db489b8..dfced97bbc1ce605cd5b2b6b8e1b0e272e879b21 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -13,7 +13,7 @@
 #include "block/aio.h"
 #include "migration/qemu-file.h"
 #include "migration/vmstate.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #ifdef NEED_CPU_H
 #if TARGET_LONG_BITS == 64
diff --git a/hw/i8254.c b/hw/i8254.c
index bea5f92fd2eb4dafe1f66ffc7be6b7ccd854ec72..7c2aa6238d65079cb2cb6b63e0950d17a8cc50c6 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -24,7 +24,7 @@
 #include "hw.h"
 #include "pc.h"
 #include "isa.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "i8254.h"
 #include "i8254_internal.h"
 
diff --git a/hw/i8254_common.c b/hw/i8254_common.c
index a03d7cd45804908ca8f9db5fa604fac233141994..08ab8d14bdad45d6d13178bda273f67fa5bd2c5d 100644
--- a/hw/i8254_common.c
+++ b/hw/i8254_common.c
@@ -25,7 +25,7 @@
 #include "hw.h"
 #include "pc.h"
 #include "isa.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "i8254.h"
 #include "i8254_internal.h"
 
diff --git a/hw/i8259.c b/hw/i8259.c
index 5e935e7f99957460ecece56a27cd05e18c7ed542..8fc6339250881b505b6e4a4dacd20ec0d3106c56 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -25,7 +25,7 @@
 #include "pc.h"
 #include "isa.h"
 #include "monitor/monitor.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "i8259_internal.h"
 
 /* debug PIC */
diff --git a/hw/ich9.h b/hw/ich9.h
index 5c73f94caffa909d66e505eeebcd1a71f3c9b593..b8d8e6d3dfe20b8e37cbdfa7428ed153fb0ec2ac 100644
--- a/hw/ich9.h
+++ b/hw/ich9.h
@@ -2,7 +2,7 @@
 #define HW_ICH9_H
 
 #include "hw.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "isa.h"
 #include "sysbus.h"
 #include "pc.h"
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 0e5bc7fe3b6ac745722a8267654affa5294d4747..bf65cb407e8d0505c9a7dbe0af6c48d2b04a476a 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -26,8 +26,8 @@
 #include <hw/pc.h>
 #include <hw/pci/pci.h>
 #include <hw/isa.h>
-#include "qemu-error.h"
-#include "qemu-timer.h"
+#include "qemu/error-report.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "dma.h"
 #include "hw/block-common.h"
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index f2e4ea4207f95ed3faece487ee42a4aa58930be8..c85e1ac018e71e71604fb87b3c17a2ce35593691 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -18,7 +18,7 @@
  */
 #include <hw/hw.h>
 #include "dma.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include <hw/ide/internal.h>
 #include "blockdev.h"
 #include "hw/block-common.h"
diff --git a/hw/imx_avic.c b/hw/imx_avic.c
index 810979366d9fd4a3114aa54e1245d43599b1d0a9..f1f066cf9c7667d44010c869404bce6438f3aa86 100644
--- a/hw/imx_avic.c
+++ b/hw/imx_avic.c
@@ -16,7 +16,7 @@
 
 #include "hw.h"
 #include "sysbus.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #define DEBUG_INT 1
 #undef DEBUG_INT /* comment out for debugging */
diff --git a/hw/imx_timer.c b/hw/imx_timer.c
index 33f33fb41ea74fdc4a3964dd38ec5e713f69af0a..e924c747c542b4cc8cef0b82175b155b3ed5e003 100644
--- a/hw/imx_timer.c
+++ b/hw/imx_timer.c
@@ -12,7 +12,7 @@
  */
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 #include "sysbus.h"
 #include "imx.h"
diff --git a/hw/intel-hda.c b/hw/intel-hda.c
index c21bf7204a5015d0e6da6695c25a862429fb00dd..7ef3a15e08492d2e590f5c970778e2aecc80f85e 100644
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -20,7 +20,7 @@
 #include "hw.h"
 #include "pci/pci.h"
 #include "pci/msi.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "audiodev.h"
 #include "intel-hda.h"
 #include "intel-hda-defs.h"
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index d5b91dd24ecc331c449a53f666f498a68d672170..af34f3b5822a6d843e1c14031837d12472f9f498 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -23,7 +23,7 @@
 #include "kvm.h"
 #include "migration/migration.h"
 #include "qapi/qmp/qerror.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 #include "qemu-char.h"
 
 #include <sys/mman.h>
diff --git a/hw/kvm/i8254.c b/hw/kvm/i8254.c
index 53d13e3123b5f1a97f1b454d13bb09d114ebe0bc..8ee1c352cf044f7e03d6fdf3cde96a1fca164713 100644
--- a/hw/kvm/i8254.c
+++ b/hw/kvm/i8254.c
@@ -22,7 +22,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "hw/i8254.h"
 #include "hw/i8254_internal.h"
diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c
index ff0dc0dfd46d084b2e41d7e3126554b3ed8221b3..2f06c27e83b04649a9e633d2388b821621c9d2dc 100644
--- a/hw/kvm/pci-assign.c
+++ b/hw/kvm/pci-assign.c
@@ -28,11 +28,11 @@
 #include <sys/stat.h>
 #include "hw/hw.h"
 #include "hw/pc.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "ui/console.h"
 #include "hw/loader.h"
 #include "monitor/monitor.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "sysemu.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
diff --git a/hw/lance.c b/hw/lance.c
index a38467615869c3580d0594b9a08617eaac25642c..b7265c0fed33d754b4e9ae4b8deab4b7ce0cfae7 100644
--- a/hw/lance.c
+++ b/hw/lance.c
@@ -37,8 +37,8 @@
 
 #include "sysbus.h"
 #include "net/net.h"
-#include "qemu-timer.h"
-#include "qemu_socket.h"
+#include "qemu/timer.h"
+#include "qemu/sockets.h"
 #include "sun4m.h"
 #include "pcnet.h"
 #include "trace.h"
diff --git a/hw/leon3.c b/hw/leon3.c
index e8d54e5d06e9f1d60c437e5d82e8e1b3fcf3d7a8..776ab97a78c63e768e239839b3ebd3e849d33e0b 100644
--- a/hw/leon3.c
+++ b/hw/leon3.c
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 #include "qemu-char.h"
 #include "sysemu.h"
diff --git a/hw/lm32_sys.c b/hw/lm32_sys.c
index a7887d14f6059a9e3bcb3f20700fc00a36f3575e..b3350890cbf02b6925df63e44e47bb412c62777b 100644
--- a/hw/lm32_sys.c
+++ b/hw/lm32_sys.c
@@ -31,10 +31,10 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-log.h"
-#include "qemu-error.h"
+#include "qemu/log.h"
+#include "qemu/error-report.h"
 #include "sysemu.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 enum {
     R_CTRL = 0,
diff --git a/hw/lm32_timer.c b/hw/lm32_timer.c
index a8be9cc1683b5187ba2972680dd77c00fc92e1e3..bd4c346386c904a53d63c6e88cc606689864250c 100644
--- a/hw/lm32_timer.c
+++ b/hw/lm32_timer.c
@@ -24,9 +24,9 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 #define DEFAULT_FREQUENCY (50*1000000)
 
diff --git a/hw/lm32_uart.c b/hw/lm32_uart.c
index adb928756823d01509c9968dbc3d8d1995594d31..bf2f507523da5afe2d18e8c8fcadb2a381e4d426 100644
--- a/hw/lm32_uart.c
+++ b/hw/lm32_uart.c
@@ -26,7 +26,7 @@
 #include "sysbus.h"
 #include "trace.h"
 #include "qemu-char.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 enum {
     R_RXTX = 0,
diff --git a/hw/lm832x.c b/hw/lm832x.c
index b14a089b3222239f450de37e62b240b8663e961e..3649e3d24967a5cb9de043b64dbcf35e7849d0b7 100644
--- a/hw/lm832x.c
+++ b/hw/lm832x.c
@@ -20,7 +20,7 @@
 
 #include "hw.h"
 #include "i2c.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ui/console.h"
 
 typedef struct {
diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c
index e2256937216ff9fb8f187944dabb50bb23685eea..76217a74fc1580b20a16a58d79d9f5f02ea6e94f 100644
--- a/hw/lpc_ich9.c
+++ b/hw/lpc_ich9.c
@@ -29,7 +29,7 @@
  */
 #include "qemu-common.h"
 #include "hw.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "isa.h"
 #include "sysbus.h"
 #include "pc.h"
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 491d433ae7e69f5b21156a5ecfbf0b8a9752078d..301b10ce792372e9d011dc3fe97cbb851c22d62f 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -23,7 +23,7 @@
  */
 #include "hw.h"
 #include "nvram.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "sysbus.h"
 #include "isa.h"
diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c
index 41eee50a35c3180cc224e6b6e26529462ec17886..b894ab21aa93a2205b7b582f2b0bdba4b1bbe2e7 100644
--- a/hw/mac_dbdma.c
+++ b/hw/mac_dbdma.c
@@ -39,7 +39,7 @@
 #include "hw.h"
 #include "isa.h"
 #include "mac_dbdma.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 /* debug DBDMA */
 //#define DEBUG_DBDMA
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index 2a1278f3931d029d299f06bf82fb26c538bd3b68..fba75029dfe5d5f6081dd8c8c5414ff0db851095 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "mc146818rtc.h"
 #include "qapi/visitor.h"
diff --git a/hw/mcf5206.c b/hw/mcf5206.c
index 5edc931abd50873fc938570d91ef22b9263f04cf..fbc806ac184ca6e0252fd16c05a73ffaee17d945 100644
--- a/hw/mcf5206.c
+++ b/hw/mcf5206.c
@@ -7,7 +7,7 @@
  */
 #include "hw.h"
 #include "mcf.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 #include "sysemu.h"
 #include "exec/address-spaces.h"
diff --git a/hw/mcf5208.c b/hw/mcf5208.c
index 997b34847c7db52435f036599a329eccd8e70ef7..fea8a6926248fad676234b260937702b502b6ea0 100644
--- a/hw/mcf5208.c
+++ b/hw/mcf5208.c
@@ -7,7 +7,7 @@
  */
 #include "hw.h"
 #include "mcf.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 #include "sysemu.h"
 #include "net/net.h"
diff --git a/hw/megasas.c b/hw/megasas.c
index f4fbe9790a040585e5d759fe4655ffeaa3a07e7b..e80c0d1c2518b2d2ae78d2e0e4833457f282dd0f 100644
--- a/hw/megasas.c
+++ b/hw/megasas.c
@@ -22,7 +22,7 @@
 #include "pci/pci.h"
 #include "dma.h"
 #include "pci/msix.h"
-#include "iov.h"
+#include "qemu/iov.h"
 #include "scsi.h"
 #include "scsi-defs.h"
 #include "trace.h"
diff --git a/hw/microblaze_boot.c b/hw/microblaze_boot.c
index 02c349c1897603552d8505c8a4c0357bd0296c96..76d33021c06dd234234f3916a0259fe5205a4a32 100644
--- a/hw/microblaze_boot.c
+++ b/hw/microblaze_boot.c
@@ -24,8 +24,8 @@
  * THE SOFTWARE.
  */
 
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "qemu-common.h"
 #include "device_tree.h"
 #include "loader.h"
diff --git a/hw/milkymist-ac97.c b/hw/milkymist-ac97.c
index d87656c9acf3f08c00e865b2df5e61d0d460e369..f46af1c509377bc9384aacd9f52a26cb60160ae5 100644
--- a/hw/milkymist-ac97.c
+++ b/hw/milkymist-ac97.c
@@ -25,7 +25,7 @@
 #include "sysbus.h"
 #include "trace.h"
 #include "audio/audio.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 enum {
     R_AC97_CTRL = 0,
diff --git a/hw/milkymist-hpdmc.c b/hw/milkymist-hpdmc.c
index 5d120a497f73ae578a5ebe413f0f6f3a4adee298..fd54d3129a5958e3eb3ca818b5d9ceead5fedb4d 100644
--- a/hw/milkymist-hpdmc.c
+++ b/hw/milkymist-hpdmc.c
@@ -24,7 +24,7 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 enum {
     R_SYSTEM = 0,
diff --git a/hw/milkymist-memcard.c b/hw/milkymist-memcard.c
index ca5df56290bbd1ef9b74eb70828d7db5dbdc1e78..5dc30ace60c708f150866ca3e5dcc1daf72c74e7 100644
--- a/hw/milkymist-memcard.c
+++ b/hw/milkymist-memcard.c
@@ -25,7 +25,7 @@
 #include "sysbus.h"
 #include "sysemu.h"
 #include "trace.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "blockdev.h"
 #include "sd.h"
 
diff --git a/hw/milkymist-minimac2.c b/hw/milkymist-minimac2.c
index 926f7f9a8b19dee03b98c4bc0464c737bfd95d0b..4e92ac3dcb513c93089c6894b5207006b75215b5 100644
--- a/hw/milkymist-minimac2.c
+++ b/hw/milkymist-minimac2.c
@@ -26,7 +26,7 @@
 #include "sysbus.h"
 #include "trace.h"
 #include "net/net.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "qdev-addr.h"
 
 #include <zlib.h>
diff --git a/hw/milkymist-pfpu.c b/hw/milkymist-pfpu.c
index 450bab921fb2dbd01a299c80dd18bc404cca5cbb..0521829202a1db1372dd079d5a45ed2d8fa80936 100644
--- a/hw/milkymist-pfpu.c
+++ b/hw/milkymist-pfpu.c
@@ -25,8 +25,8 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-log.h"
-#include "qemu-error.h"
+#include "qemu/log.h"
+#include "qemu/error-report.h"
 #include <math.h>
 
 /* #define TRACE_EXEC */
diff --git a/hw/milkymist-softusb.c b/hw/milkymist-softusb.c
index 0743668d185514162acf27d9da566e2e1a81687c..b7beb4bedba52c582382b23652416ae5a33beb28 100644
--- a/hw/milkymist-softusb.c
+++ b/hw/milkymist-softusb.c
@@ -26,7 +26,7 @@
 #include "trace.h"
 #include "ui/console.h"
 #include "hid.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 enum {
     R_CTRL = 0,
diff --git a/hw/milkymist-sysctl.c b/hw/milkymist-sysctl.c
index f951ef9ca89af5121d836e3bf1b98aa08fad35ef..519462afcc93bc10125918875103c292af3a0cdf 100644
--- a/hw/milkymist-sysctl.c
+++ b/hw/milkymist-sysctl.c
@@ -25,9 +25,9 @@
 #include "sysbus.h"
 #include "sysemu.h"
 #include "trace.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 enum {
     CTRL_ENABLE      = (1<<0),
diff --git a/hw/milkymist-tmu2.c b/hw/milkymist-tmu2.c
index 3f9a684edac3e6f3b12e54bea3e6056b70642dab..a11772aebe4a0d1979ef6e3d3d862c62e10bcfa1 100644
--- a/hw/milkymist-tmu2.c
+++ b/hw/milkymist-tmu2.c
@@ -27,7 +27,7 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 #include <X11/Xlib.h>
 #include <GL/gl.h>
diff --git a/hw/milkymist-uart.c b/hw/milkymist-uart.c
index aefa8c7f1cf48d015ef3855682bb0feef098e4dd..ef5518e5c26b75d3b786e1dc5be7eddcf89322e3 100644
--- a/hw/milkymist-uart.c
+++ b/hw/milkymist-uart.c
@@ -25,7 +25,7 @@
 #include "sysbus.h"
 #include "trace.h"
 #include "qemu-char.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 enum {
     R_RXTX = 0,
diff --git a/hw/milkymist-vgafb.c b/hw/milkymist-vgafb.c
index c3471315d312fc7b7ae23fbb3d0a08dac4cf4eb7..561285154fd80c07d2508862dc23e0c3f601eb26 100644
--- a/hw/milkymist-vgafb.c
+++ b/hw/milkymist-vgafb.c
@@ -28,7 +28,7 @@
 #include "ui/console.h"
 #include "framebuffer.h"
 #include "ui/pixel_ops.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 #define BITS 8
 #include "milkymist-vgafb_template.h"
diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c
index 34619b7e3ed548f6500f6fb20b3ce563ef7b5ad3..60dd8c69bbe75624be072f57c4ccc10dd72caaae 100644
--- a/hw/mips_fulong2e.c
+++ b/hw/mips_fulong2e.c
@@ -33,7 +33,7 @@
 #include "qemu-char.h"
 #include "sysemu.h"
 #include "audio/audio.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "loader.h"
 #include "mips-bios.h"
 #include "ide.h"
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index d65d1256fdd20b7881b2ecf5ddebe0b94a58edf7..04c7a2612ceede60975394db08849d8dddc1743c 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -38,7 +38,7 @@
 #include "sysemu.h"
 #include "arch_init.h"
 #include "boards.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "mips-bios.h"
 #include "ide.h"
 #include "loader.h"
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index 05494b9b4090ab04af1637e36d35f241bb46b08f..511e1e41c03cabece1c2c314c689563823583e24 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -17,7 +17,7 @@
 #include "sysemu.h"
 #include "boards.h"
 #include "flash.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "mips-bios.h"
 #include "ide.h"
 #include "loader.h"
diff --git a/hw/mips_timer.c b/hw/mips_timer.c
index 7aa9004a0e4f1239f08ded7660acfaecd4633c8c..83c400c158c5ff97bcacd9300b33df4b84dec32f 100644
--- a/hw/mips_timer.c
+++ b/hw/mips_timer.c
@@ -22,7 +22,7 @@
 
 #include "hw.h"
 #include "mips_cpudevs.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #define TIMER_FREQ	100 * 1000 * 1000
 
diff --git a/hw/musicpal.c b/hw/musicpal.c
index 436b3f7c3743874191b66100a6a211e76ef4dc20..5a7bf8bee11ab0fe6871e0d1b84bacbcf747c93d 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -16,7 +16,7 @@
 #include "sysemu.h"
 #include "boards.h"
 #include "serial.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 #include "block/block.h"
 #include "flash.h"
diff --git a/hw/nand.c b/hw/nand.c
index 01f3adaee11d18444ff46512aa19430f600503f4..a73205d866dcd684f1613ef7577f84d755a3f2b7 100644
--- a/hw/nand.c
+++ b/hw/nand.c
@@ -22,7 +22,7 @@
 # include "flash.h"
 # include "blockdev.h"
 # include "sysbus.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 # define NAND_CMD_READ0		0x00
 # define NAND_CMD_READ1		0x01
diff --git a/hw/omap1.c b/hw/omap1.c
index 4d5815eb08df67d1cd763ef9fd8a6a66d99941e5..50c4570f31d6d08941cd57f1fa72954cac815f12 100644
--- a/hw/omap1.c
+++ b/hw/omap1.c
@@ -22,7 +22,7 @@
 #include "sysemu.h"
 #include "soc_dma.h"
 #include "blockdev.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "sysbus.h"
 
 /* Should signal the TCMI/GPMC */
diff --git a/hw/omap2.c b/hw/omap2.c
index 96aba7105269bd88284a4fc64d924bc6d1f0a8c3..7ccee696611be42ebeec5e3dfc8a6a7108d2eb5a 100644
--- a/hw/omap2.c
+++ b/hw/omap2.c
@@ -23,7 +23,7 @@
 #include "arm-misc.h"
 #include "omap.h"
 #include "sysemu.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-char.h"
 #include "flash.h"
 #include "soc_dma.h"
diff --git a/hw/omap_dma.c b/hw/omap_dma.c
index e619c7b7dea2430e0b888cb49b4f953f35165697..aec58743114278c12109a63c2845430cbda8bac8 100644
--- a/hw/omap_dma.c
+++ b/hw/omap_dma.c
@@ -18,7 +18,7 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "omap.h"
 #include "irq.h"
 #include "soc_dma.h"
diff --git a/hw/omap_gptimer.c b/hw/omap_gptimer.c
index e39da740670f8696775e0cd3ba934c365be8c496..a5db710dcb9577c051006ac2bcaa56b0fafa956b 100644
--- a/hw/omap_gptimer.c
+++ b/hw/omap_gptimer.c
@@ -18,7 +18,7 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "omap.h"
 
 /* GP timers */
diff --git a/hw/omap_synctimer.c b/hw/omap_synctimer.c
index 7031a88531ae51d8bc4ffc8c01a004613c98d4b8..945711eff56e0d7af122fdce20ae31f91ed9ba5c 100644
--- a/hw/omap_synctimer.c
+++ b/hw/omap_synctimer.c
@@ -18,7 +18,7 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "omap.h"
 struct omap_synctimer_s {
     MemoryRegion iomem;
diff --git a/hw/onenand.c b/hw/onenand.c
index 7d255c563ffdafd85b16174ce18137680148b805..2e26e3a05d5aa83a8e750ebae2e94976f97d059e 100644
--- a/hw/onenand.c
+++ b/hw/onenand.c
@@ -26,7 +26,7 @@
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "sysbus.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 /* 11 for 2kB-page OneNAND ("2nd generation") and 10 for 1kB-page chips */
 #define PAGE_SHIFT	11
diff --git a/hw/openrisc_timer.c b/hw/openrisc_timer.c
index 7916e61d24b399575ade5e480ac48a80366ee99b..d965be77dee8c31c94900e91fbb343a7f90981ac 100644
--- a/hw/openrisc_timer.c
+++ b/hw/openrisc_timer.c
@@ -20,7 +20,7 @@
 
 #include "cpu.h"
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #define TIMER_FREQ    (20 * 1000 * 1000)    /* 20MHz */
 
diff --git a/hw/pc.c b/hw/pc.c
index 7aaff0f2fd5805637326bffabf559466c475687c..0a92ea6bed52e1ac75bc047927a7b706f22901f9 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -50,7 +50,7 @@
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "arch_init.h"
-#include "bitmap.h"
+#include "qemu/bitmap.h"
 
 /* debug PC/ISA interrupts */
 //#define DEBUG_IRQ
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index 680e4637d75d6e3a401f497f646e5db928789687..2a04d188846f1cf609f3c8630034f1f08b509a73 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -19,7 +19,7 @@
  */
 
 #include "hw/pci/msi.h"
-#include "range.h"
+#include "qemu/range.h"
 
 /* Eventually those constants should go to Linux pci_regs.h */
 #define PCI_MSI_PENDING_32      0x10
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index a6a401e28602ef405148d39ca38ad5ecccf88e5e..073e22c315f87263790815f6b5f36d81b7e3a039 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -18,7 +18,7 @@
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/pci.h"
-#include "range.h"
+#include "qemu/range.h"
 
 #define MSIX_CAP_LENGTH 12
 
diff --git a/hw/pci/pci-hotplug.c b/hw/pci/pci-hotplug.c
index e5e8a7ab58dc7b4cb879a51ee551d83290177de0..2bc02e344f57529a5e441df983946518f651e4cf 100644
--- a/hw/pci/pci-hotplug.c
+++ b/hw/pci/pci-hotplug.c
@@ -30,7 +30,7 @@
 #include "monitor/monitor.h"
 #include "hw/scsi.h"
 #include "hw/virtio-blk.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 #include "blockdev.h"
 #include "qapi/error.h"
 
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e062f6608814ecfb98ba384060a60f4d1311d47d..c9ed95be89ba3bfe96d8edcad751e716b3c9dc86 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -29,7 +29,7 @@
 #include "net/net.h"
 #include "sysemu.h"
 #include "hw/loader.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "qmp-commands.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 131091408d650859b2537db930fbefb483793b70..995842a72d04217a358dab01affa37cf7c452a84 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -31,7 +31,7 @@
 
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pci_bus.h"
-#include "range.h"
+#include "qemu/range.h"
 
 /* PCI bridge subsystem vendor ID helper functions */
 #define PCI_SSVID_SIZEOF        8
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index b60a6faaf3ecf048ff33419563aad34406527fd4..6c916d15eccffa765e45b2a2889ce63b117c3221 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -25,7 +25,7 @@
 #include "hw/pci/msi.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/pcie_regs.h"
-#include "range.h"
+#include "qemu/range.h"
 
 //#define DEBUG_PCIE
 #ifdef DEBUG_PCIE
diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c
index 18b1512b43b75e0075fd1f55ccc6d8ee44064505..f07266da66e1cdf50c64caff4c772749fb33b305 100644
--- a/hw/pci/shpc.c
+++ b/hw/pci/shpc.c
@@ -1,7 +1,7 @@
 #include <strings.h>
 #include <stdint.h>
-#include "range.h"
-#include "range.h"
+#include "qemu/range.h"
+#include "qemu/range.h"
 #include "hw/pci/shpc.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index c6768bcbdc367d0da2c87941474844d68739ebb1..5e8eed3af8705468448dff761d18455d41584e23 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -30,7 +30,7 @@
 #include "pci/pci.h"
 #include "net/net.h"
 #include "loader.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "dma.h"
 
 #include "pcnet.h"
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 5b03edecdd1282c55c964571b7e19e1553d2ccb2..87736542e497abef2dc1a6bb95f9e5b2b2856b2a 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -37,8 +37,8 @@
 
 #include "qdev.h"
 #include "net/net.h"
-#include "qemu-timer.h"
-#include "qemu_socket.h"
+#include "qemu/timer.h"
+#include "qemu/sockets.h"
 #include "sysemu.h"
 
 #include "pcnet.h"
diff --git a/hw/pcspk.c b/hw/pcspk.c
index ad6491b0f4210a064f63e01ea3f19d8ec38cfcaf..6d55ebe82f4c0ad908e43e40c1f4ae38cf2712eb 100644
--- a/hw/pcspk.c
+++ b/hw/pcspk.c
@@ -26,7 +26,7 @@
 #include "pc.h"
 #include "isa.h"
 #include "audio/audio.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "i8254.h"
 #include "pcspk.h"
 
diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c
index 36af4647df43db56d69b666ab5b8f54e4e575764..59982dcd6f17d35371a6dd4146b0643c71485dc8 100644
--- a/hw/pflash_cfi01.c
+++ b/hw/pflash_cfi01.c
@@ -39,9 +39,9 @@
 #include "hw.h"
 #include "flash.h"
 #include "block/block.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "exec/address-spaces.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "sysbus.h"
 
 #define PFLASH_BUG(fmt, ...) \
diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c
index c689cc9f42a02a3adff62577b12d72b785acd2a1..6924f064c2a9e9a675b22615315dc44c730400fb 100644
--- a/hw/pflash_cfi02.c
+++ b/hw/pflash_cfi02.c
@@ -37,10 +37,10 @@
 
 #include "hw.h"
 #include "flash.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "block/block.h"
 #include "exec/address-spaces.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "sysbus.h"
 
 //#define PFLASH_DEBUG
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index b5ea68bc61cc8144e004ff9508f0ee669f0919e0..3d79c73fdaadb39e15bf6c47a88e90ebb6e2e212 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -28,7 +28,7 @@
 #include "pci/pci_host.h"
 #include "isa.h"
 #include "sysbus.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "xen.h"
 #include "pam.h"
 
diff --git a/hw/pl031.c b/hw/pl031.c
index 8bf01832898c9b4a43954a9ac85dcd477529a245..834a20c91766a89295901d5b15962fb60eaaae60 100644
--- a/hw/pl031.c
+++ b/hw/pl031.c
@@ -12,7 +12,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 
 //#define DEBUG_PL031
diff --git a/hw/ppc.c b/hw/ppc.c
index 11fd199eaab4b9ef25605c824abe207500c7bd1e..f066367609bef088acb3b001541c2074d865533f 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -23,10 +23,10 @@
  */
 #include "hw.h"
 #include "ppc.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "nvram.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "loader.h"
 #include "kvm.h"
 #include "kvm_ppc.h"
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 798e67cedf02a2aaea1ed588ad40abf002daf6ae..3593f7c0e25472f2e433e8100fcb6858d3d0487a 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -19,7 +19,7 @@
 #include "e500.h"
 #include "e500-ccsr.h"
 #include "net/net.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 #include "hw/hw.h"
 #include "hw/serial.h"
 #include "hw/pci/pci.h"
@@ -34,7 +34,7 @@
 #include "elf.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "hw/ppce500_pci.h"
 
 #define BINARY_DEVICE_TREE_FILE    "mpc8544ds.dtb"
diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c
index 5a0e0260e6820d447ed16e36ad1b830b0ef392c4..31bcc4bb95d2700f601067f076650296658fc8dd 100644
--- a/hw/ppc405_boards.c
+++ b/hw/ppc405_boards.c
@@ -29,7 +29,7 @@
 #include "sysemu.h"
 #include "block/block.h"
 #include "boards.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "loader.h"
 #include "blockdev.h"
 #include "exec/address-spaces.h"
diff --git a/hw/ppc405_uc.c b/hw/ppc405_uc.c
index aabb2efb486f494d2072fdf28f50a11089be398a..b1ed8837d61a7ebe883bf818393f73f7710b17e8 100644
--- a/hw/ppc405_uc.c
+++ b/hw/ppc405_uc.c
@@ -25,9 +25,9 @@
 #include "ppc.h"
 #include "ppc405.h"
 #include "serial.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "exec/address-spaces.h"
 
 #define DEBUG_OPBA
diff --git a/hw/ppc4xx_devs.c b/hw/ppc4xx_devs.c
index 3b9dc0671606174039cb8791ee991a50eed157ab..d1fb1576b0d03b823c76fd8cc05d89542e4d055d 100644
--- a/hw/ppc4xx_devs.c
+++ b/hw/ppc4xx_devs.c
@@ -24,7 +24,7 @@
 #include "hw.h"
 #include "ppc.h"
 #include "ppc4xx.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "exec/address-spaces.h"
 
 //#define DEBUG_MMIO
diff --git a/hw/ppc_booke.c b/hw/ppc_booke.c
index d51e7fad6786c1130791bfe84e44458303065ab3..a7182be0d3f521ae798c3d0455b77f690aebaf6e 100644
--- a/hw/ppc_booke.c
+++ b/hw/ppc_booke.c
@@ -23,10 +23,10 @@
  */
 #include "hw.h"
 #include "ppc.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "nvram.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "loader.h"
 
 
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index aa46cc6f55cec5ab952784722d2f0d88182c0594..072535294ee34c60fc1e66195024846989bc32ce 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -33,7 +33,7 @@
 #include "pci/pci_host.h"
 #include "ppc.h"
 #include "boards.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "ide.h"
 #include "loader.h"
 #include "mc146818rtc.h"
diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c
index feefc6596ba0ab7c31e2a39edae0a63974e3d7e1..1e1ade3d2eaa45002c16ac06667a20ce83d23479 100644
--- a/hw/ppce500_pci.c
+++ b/hw/ppce500_pci.c
@@ -18,7 +18,7 @@
 #include "hw/ppc/e500-ccsr.h"
 #include "pci/pci.h"
 #include "pci/pci_host.h"
-#include "bswap.h"
+#include "qemu/bswap.h"
 #include "ppce500_pci.h"
 
 #ifdef DEBUG_PCI
diff --git a/hw/ptimer.c b/hw/ptimer.c
index bc0b3f802f89d7ef0575e69f4fc6ab4fbb48585d..24af6a2afe30ba3ff7bf5fca0068026210c25be6 100644
--- a/hw/ptimer.c
+++ b/hw/ptimer.c
@@ -6,9 +6,9 @@
  * This code is licensed under the GNU LGPL.
  */
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 struct ptimer_state
 {
diff --git a/hw/ptimer.h b/hw/ptimer.h
index 9d172f77641303f768d6f4b475611e4d4f6154bb..28fcaf17f83a4985eb40f02237255b4d948bf76b 100644
--- a/hw/ptimer.h
+++ b/hw/ptimer.h
@@ -9,7 +9,7 @@
 #define PTIMER_H
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "migration/vmstate.h"
 
 /* ptimer.c */
diff --git a/hw/pxa2xx_timer.c b/hw/pxa2xx_timer.c
index 8242d26c37134dd3da813f7dfbc2489687f4aceb..1481c6d3e121bf26f71352a0b67ead25aceef311 100644
--- a/hw/pxa2xx_timer.c
+++ b/hw/pxa2xx_timer.c
@@ -8,7 +8,7 @@
  */
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "pxa.h"
 #include "sysbus.h"
diff --git a/hw/q35.h b/hw/q35.h
index 2f951c8a94e897ee83f132e8651cad2b8de2c135..246c12cb0440ae7f556ab8aabcf9215149193ae4 100644
--- a/hw/q35.h
+++ b/hw/q35.h
@@ -23,7 +23,7 @@
 #define HW_Q35_H
 
 #include "hw.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "isa.h"
 #include "sysbus.h"
 #include "pc.h"
diff --git a/hw/qdev-core.h b/hw/qdev-core.h
index 93a3a2a7bcb9c05f094b5fddb221949e47a19870..fdf14ec4a601707bbb255c5c822c0b6115aaeb6b 100644
--- a/hw/qdev-core.h
+++ b/hw/qdev-core.h
@@ -1,9 +1,9 @@
 #ifndef QDEV_CORE_H
 #define QDEV_CORE_H
 
-#include "qemu-queue.h"
-#include "qemu-option.h"
-#include "qemu-types.h"
+#include "qemu/queue.h"
+#include "qemu/option.h"
+#include "qemu/typedefs.h"
 #include "qom/object.h"
 #include "hw/irq.h"
 #include "qapi/error.h"
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index 207282c4a42157bb91a2eaf1316b5fe038b1cce3..1c6712e6debf9a18a7c7edd0a8d439bfb4831e55 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -21,7 +21,7 @@
 #include "monitor/monitor.h"
 #include "qmp-commands.h"
 #include "arch_init.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 
 /*
  * Aliases were a bad idea from the start.  Let's keep them
diff --git a/hw/qxl-logger.c b/hw/qxl-logger.c
index fe2878c836656ec88b19eea4138ea72faac77ae5..3cd85d9b9786fcfa0d6a1e1763848c4b353a890e 100644
--- a/hw/qxl-logger.c
+++ b/hw/qxl-logger.c
@@ -19,7 +19,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qxl.h"
 
 static const char *qxl_type[] = {
diff --git a/hw/qxl.c b/hw/qxl.c
index ad0214827ee408230332c8cf52d437ccb9a14628..b88a39cc9308254d847546cd50fa8ef50bafb430 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -21,8 +21,8 @@
 #include <zlib.h>
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
-#include "qemu-queue.h"
+#include "qemu/timer.h"
+#include "qemu/queue.h"
 #include "monitor/monitor.h"
 #include "sysemu.h"
 #include "trace.h"
diff --git a/hw/qxl.h b/hw/qxl.h
index 9130261524d4ed0cef8e2372034565f41dc96480..f867a1d0ac699e3ff179111fbf6dfac90ffb6a78 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -7,7 +7,7 @@
 #include "hw.h"
 #include "pci/pci.h"
 #include "vga_int.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 #include "ui/qemu-spice.h"
 #include "ui/spice-display.h"
diff --git a/hw/rc4030.c b/hw/rc4030.c
index e0024c87e8fd3d832eba2f1109bd32d975230e5b..a0358a319c9936e854cd267287e01dcc62335876 100644
--- a/hw/rc4030.c
+++ b/hw/rc4030.c
@@ -24,7 +24,7 @@
 
 #include "hw.h"
 #include "mips.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /********************************************************/
 /* debug rc4030 */
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index e024520b8bb5c243db47e68138128f5a03890d28..19c31a02c62b295dfd5e0da914bfcd5f0ce2fd8b 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -54,11 +54,11 @@
 #include "hw.h"
 #include "pci/pci.h"
 #include "dma.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "net/net.h"
 #include "loader.h"
 #include "sysemu.h"
-#include "iov.h"
+#include "qemu/iov.h"
 
 /* debug RTL8139 card */
 //#define DEBUG_RTL8139 1
diff --git a/hw/s390x/event-facility.h b/hw/s390x/event-facility.h
index 30af0a76a7b5e290f02bd6a513438cbbcc283af5..791ab2a6dec1f7f15b0c7f69b13d0390c88b3d62 100644
--- a/hw/s390x/event-facility.h
+++ b/hw/s390x/event-facility.h
@@ -16,7 +16,7 @@
 #define HW_S390_SCLP_EVENT_FACILITY_H
 
 #include <hw/qdev.h>
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 /* SCLP event types */
 #define SCLP_EVENT_ASCII_CONSOLE_DATA           0x1a
diff --git a/hw/s390x/sclpconsole.c b/hw/s390x/sclpconsole.c
index 9ad297c9999367eec47c0f0f2b7e15d5d40360b6..ca78d6796ab9c8d98bd1c10da9f97e6b9b9159fc 100644
--- a/hw/s390x/sclpconsole.c
+++ b/hw/s390x/sclpconsole.c
@@ -13,7 +13,7 @@
  */
 
 #include <hw/qdev.h>
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 #include "sclp.h"
 #include "event-facility.h"
diff --git a/hw/sb16.c b/hw/sb16.c
index 523ab0d5fd1d80861cb0e4ea303c2cef4ff5e578..bb460ccb60d91f5944095eab0da8073fbe61cbcb 100644
--- a/hw/sb16.c
+++ b/hw/sb16.c
@@ -26,8 +26,8 @@
 #include "audio/audio.h"
 #include "isa.h"
 #include "qdev.h"
-#include "qemu-timer.h"
-#include "host-utils.h"
+#include "qemu/timer.h"
+#include "qemu/host-utils.h"
 
 #define dolog(...) AUD_log ("sb16", __VA_ARGS__)
 
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index dfb2631210c59591caf9ec1e7390db1b535b396f..5dc9f512b5c2c52f507f1612d246ed42ba5956e6 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -1,5 +1,5 @@
 #include "hw.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "scsi.h"
 #include "scsi-defs.h"
 #include "qdev.h"
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 49b5686a92fab515b4ab73a17637f89be93d88ce..c65da4a9c95a4079c6ef89d52301c2736812d56b 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -29,7 +29,7 @@ do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
 #endif
 
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "scsi.h"
 #include "scsi-defs.h"
 #include "sysemu.h"
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index d9045341bafec09f6274e19d55ee52909415fce1..faeb61ee2c0fe4a9a57f973c7b0f6f20a9241f45 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -12,7 +12,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "scsi.h"
 #include "blockdev.h"
 
diff --git a/hw/sd.c b/hw/sd.c
index 2e54eea98106dba9008f3180be3a52cc5f18cc8f..428bd78e327fb4958deb06b87108fd7f290938be 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -32,7 +32,7 @@
 #include "hw.h"
 #include "block/block.h"
 #include "sd.h"
-#include "bitmap.h"
+#include "qemu/bitmap.h"
 
 //#define DEBUG_SD 1
 
diff --git a/hw/serial.c b/hw/serial.c
index 3968c4fc462512b304cc22976de1c14805fa957b..2cbb5447a76ab850e26b16e0331550cb87292976 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -25,7 +25,7 @@
 
 #include "serial.h"
 #include "qemu-char.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "exec/address-spaces.h"
 
 //#define DEBUG_SERIAL
diff --git a/hw/sh_pci.c b/hw/sh_pci.c
index d5218420a3fb706d817e852e97f25bec9a65029b..018b1c198b33cd833218c56d19a5831e49d2081d 100644
--- a/hw/sh_pci.c
+++ b/hw/sh_pci.c
@@ -25,7 +25,7 @@
 #include "sh.h"
 #include "pci/pci.h"
 #include "pci/pci_host.h"
-#include "bswap.h"
+#include "qemu/bswap.h"
 #include "exec/address-spaces.h"
 
 typedef struct SHPCIState {
diff --git a/hw/sh_timer.c b/hw/sh_timer.c
index da6689f36919eb1633124c9323f4501b9f795116..64ea23fce65ab0e2681b511574c361448a64b188 100644
--- a/hw/sh_timer.c
+++ b/hw/sh_timer.c
@@ -10,7 +10,7 @@
 
 #include "hw.h"
 #include "sh.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "exec/address-spaces.h"
 #include "ptimer.h"
 
diff --git a/hw/slavio_timer.c b/hw/slavio_timer.c
index c07ceb1de0e12fd4e96398da239adf1ad8f91e6e..584629f1a56c250e604c7ef27be6d9e55b1070bc 100644
--- a/hw/slavio_timer.c
+++ b/hw/slavio_timer.c
@@ -23,7 +23,7 @@
  */
 
 #include "sun4m.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
 #include "sysbus.h"
 #include "trace.h"
diff --git a/hw/sm501.c b/hw/sm501.c
index 714aca0492e39b2be6beb13a45704d7237ebda3f..dd186aa7f2e79a19a176086115e03d9ff8da18fa 100644
--- a/hw/sm501.c
+++ b/hw/sm501.c
@@ -29,7 +29,7 @@
 #include "devices.h"
 #include "sysbus.h"
 #include "qdev-addr.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "ui/pixel_ops.h"
 
 /*
diff --git a/hw/soc_dma.c b/hw/soc_dma.c
index 50d5f84b4ebab9262b7ca3d4f3c93e3d75a43b38..64e8ee1d13517cfa74e75ae4bf65b952a2eecd96 100644
--- a/hw/soc_dma.c
+++ b/hw/soc_dma.c
@@ -18,7 +18,7 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "soc_dma.h"
 
 static void transfer_mem2mem(struct soc_dma_ch_s *ch)
diff --git a/hw/spapr.c b/hw/spapr.c
index d1252fc68c461c77a47255586aaa8599ca52410f..1abfde2a05263015e49de71af433ef4f82f7db10 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -49,7 +49,7 @@
 
 #include "exec/address-spaces.h"
 #include "hw/usb.h"
-#include "qemu-config.h"
+#include "qemu/config-file.h"
 
 #include <libfdt.h>
 
diff --git a/hw/spitz.c b/hw/spitz.c
index 48668a0f108b2c57838711961edbf6700932117f..1259e3297456fc9bb30340695a4322231fc9affb 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -18,7 +18,7 @@
 #include "i2c.h"
 #include "ssi.h"
 #include "flash.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "devices.h"
 #include "sharpsl.h"
 #include "ui/console.h"
diff --git a/hw/stellaris.c b/hw/stellaris.c
index 368f8a5e73a15a6177d917fd512158c81eb9254b..26da3c7f60c4e58182f0ea31794f18db35da9805 100644
--- a/hw/stellaris.c
+++ b/hw/stellaris.c
@@ -11,7 +11,7 @@
 #include "ssi.h"
 #include "arm-misc.h"
 #include "devices.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "i2c.h"
 #include "net/net.h"
 #include "boards.h"
diff --git a/hw/strongarm.c b/hw/strongarm.c
index 44bec34e07cdac182e12571e391160331e92feed..f776fee3bc902bbee58d9601f1f7cb72b1b9e3bc 100644
--- a/hw/strongarm.c
+++ b/hw/strongarm.c
@@ -28,7 +28,7 @@
  */
 #include "sysbus.h"
 #include "strongarm.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "arm-misc.h"
 #include "qemu-char.h"
 #include "sysemu.h"
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 9a784dfd04c5bd00dff55f3990417e0b7b9721e6..4245854949c32b2265ebc112fe5dddbb69139ec5 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sun4m.h"
 #include "nvram.h"
 #include "sparc32_dma.h"
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 000f6118e1403ad57402b353e155ca3e182a5901..8bca4fdff9b5d1c032895b7b96931b4679109c11 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -29,7 +29,7 @@
 #include "nvram.h"
 #include "fdc.h"
 #include "net/net.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "boards.h"
 #include "firmware_abi.h"
diff --git a/hw/tsc2005.c b/hw/tsc2005.c
index e2326283c0753b7add1f0827d2e8508d04c158a6..740ff86aa8ad751dd8d51b15049ab02c821eef6e 100644
--- a/hw/tsc2005.c
+++ b/hw/tsc2005.c
@@ -19,7 +19,7 @@
  */
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ui/console.h"
 #include "devices.h"
 
diff --git a/hw/tsc210x.c b/hw/tsc210x.c
index 2b3535d4fc04c1a34a94d458e1a02ca523ccbd85..2076c355d2225b303b994185cfedf4571b2ada17 100644
--- a/hw/tsc210x.c
+++ b/hw/tsc210x.c
@@ -21,7 +21,7 @@
 
 #include "hw.h"
 #include "audio/audio.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ui/console.h"
 #include "omap.h"	/* For I2SCodec and uWireSlave */
 #include "devices.h"
diff --git a/hw/tusb6010.c b/hw/tusb6010.c
index 325200bd34ae40abeeb8743a357c31bdd6d7171a..990d50619d45f7f5bf201448ed538fef12a8a53b 100644
--- a/hw/tusb6010.c
+++ b/hw/tusb6010.c
@@ -19,7 +19,7 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "usb.h"
 #include "omap.h"
 #include "irq.h"
diff --git a/hw/twl92230.c b/hw/twl92230.c
index ce699bdbddc206845085bada2e2c51e9b543cd1a..3210b9ef4e77a2921ec4132f76a5972fc409a921 100644
--- a/hw/twl92230.c
+++ b/hw/twl92230.c
@@ -20,7 +20,7 @@
  */
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "i2c.h"
 #include "sysemu.h"
 #include "ui/console.h"
diff --git a/hw/usb.h b/hw/usb.h
index efae65dcad064b188eea498b6afce95e45b86eba..81e265c4fd101b308b8839b4bf1a438b8fa32411 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -26,7 +26,7 @@
  */
 
 #include "qdev.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 /* Constants related to the USB / PCI interaction */
 #define USB_SBRN    0x60 /* Serial Bus Release Number Register */
diff --git a/hw/usb/combined-packet.c b/hw/usb/combined-packet.c
index 4a0c299457f68f20f8d01b0bf51c78a47f13c452..13f6602ad242e2643fb9518869b728d3a16066ee 100644
--- a/hw/usb/combined-packet.c
+++ b/hw/usb/combined-packet.c
@@ -21,7 +21,7 @@
  */
 #include "qemu-common.h"
 #include "hw/usb.h"
-#include "iov.h"
+#include "qemu/iov.h"
 #include "trace.h"
 
 static void usb_combined_packet_add(USBCombinedPacket *combined, USBPacket *p)
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 8e360d3ec03dfbe122b89e0a6ccad961ed35fe6b..e315fc1021b90e91980c3a9e1579a7f4c6789478 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -25,7 +25,7 @@
  */
 #include "qemu-common.h"
 #include "hw/usb.h"
-#include "iov.h"
+#include "qemu/iov.h"
 #include "trace.h"
 
 void usb_attach(USBPort *port)
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
index 6953f2e7104493d27ab2f652a6975ab71d67cf86..ce38fef9f61eff1b86d86384ed7a6f5e99505c3a 100644
--- a/hw/usb/dev-hid.c
+++ b/hw/usb/dev-hid.c
@@ -26,7 +26,7 @@
 #include "ui/console.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "hw/hid.h"
 
 /* HID interface requests */
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index bf289ff5a601d1db8b88093cf95c8cf2d54b6666..e8ada9f02cf51791804711b7b5c32d7e3a3f0dae 100644
--- a/hw/usb/dev-network.c
+++ b/hw/usb/dev-network.c
@@ -27,10 +27,10 @@
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
 #include "net/net.h"
-#include "qemu-queue.h"
-#include "qemu-config.h"
+#include "qemu/queue.h"
+#include "qemu/config-file.h"
 #include "sysemu.h"
-#include "iov.h"
+#include "qemu/iov.h"
 
 /*#define TRAFFIC_DEBUG*/
 /* Thanks to NetChip Technologies for donating this product ID.
diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 99b19df1d1b13086b75eb533a342953471fc8cd4..2ff4fe247a669b07e1e8244f348374309dce92bf 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -9,7 +9,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
 #include "qemu-char.h"
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 3862c9b6c976ac46e59b29dadd8e7bcfa66f8825..f26bb341f7e6bec40785ff794598dd850b8f288d 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -35,7 +35,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
 #include "monitor/monitor.h"
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 0d7597b4d143ca602737cdbcb27c7370bff03f29..6d27bac94f336c0863552657465507a9bed302ff 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -8,8 +8,8 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
 #include "hw/scsi.h"
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index a21b2ba62788c2257e134f71ebec320c9247b5f2..9a0088928f65faeacfaab86fbdcbbfe2eb936648 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -10,8 +10,8 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "trace.h"
 
 #include "hw/usb.h"
diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c
index 8b043966f6bd971208afe5a5bbf17b824a73e9b0..ee77d41db57ba85a68f82a6920d7a5ef121c0f6c 100644
--- a/hw/usb/hcd-ehci-pci.c
+++ b/hw/usb/hcd-ehci-pci.c
@@ -17,7 +17,7 @@
 
 #include "hw/usb/hcd-ehci.h"
 #include "hw/pci/pci.h"
-#include "range.h"
+#include "qemu/range.h"
 
 typedef struct EHCIPCIState {
     PCIDevice pcidev;
diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h
index 740f7309fb5ea1bdf549cf162968cd1fd6c8fc43..5bc80031bf5e4cfdcf272d3a7658726e63763327 100644
--- a/hw/usb/hcd-ehci.h
+++ b/hw/usb/hcd-ehci.h
@@ -18,7 +18,7 @@
 #define HW_USB_EHCI_H 1
 
 #include "hw/hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "hw/usb.h"
 #include "monitor/monitor.h"
 #include "trace.h"
diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c
index c707f7a2bb9541968bf8285e78948ded912e71c6..64e9e834bf150d14ff20e64d3cc4ae4d33abe0b3 100644
--- a/hw/usb/hcd-musb.c
+++ b/hw/usb/hcd-musb.c
@@ -21,7 +21,7 @@
  * Only host-mode and non-DMA accesses are currently supported.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "hw/usb.h"
 #include "hw/irq.h"
 #include "hw/hw.h"
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 4faf8e1aedc07a6e2521e570fa1b60443d570e5d..052c4a3037f2c0416a707e2137f7036ab2b0ef77 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -27,7 +27,7 @@
 */
 
 #include "hw/hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "hw/usb.h"
 #include "hw/pci/pci.h"
 #include "hw/sysbus.h"
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 04c944613c9704c5231964307375443ff9468465..c9b8a3146502d2acd3d4be6558b265f353d0c6f8 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -28,8 +28,8 @@
 #include "hw/hw.h"
 #include "hw/usb.h"
 #include "hw/pci/pci.h"
-#include "qemu-timer.h"
-#include "iov.h"
+#include "qemu/timer.h"
+#include "qemu/iov.h"
 #include "dma.h"
 #include "trace.h"
 
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 220c3b536a06c192dbcb0832611b7b5fa2cf068b..e2de71ef1a940da136104f7351634c0903bbbace 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -19,7 +19,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "hw/hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "hw/usb.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index 5a56e99891b925fdeaca2cd63ac647df0fb73110..9a8c26ceaf4210b3dbe6cd9221d0654d795bda1e 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -31,7 +31,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "monitor/monitor.h"
 #include "sysemu.h"
 #include "trace.h"
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 36210760200d5ed5757caf31f473fe1ba8acdee1..31e5f27595f4c8afb7e020e3b0fc6581fb11f3e5 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -26,10 +26,10 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "monitor/monitor.h"
 #include "sysemu.h"
-#include "iov.h"
+#include "qemu/iov.h"
 
 #include <dirent.h>
 #include <sys/ioctl.h>
diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c
index 096621cdbdb894cb5a860e25ace9f39ef10a0203..9f204bc113588f6e734654ba0e71491f4c40a04b 100644
--- a/hw/vfio_pci.c
+++ b/hw/vfio_pci.c
@@ -27,7 +27,7 @@
 #include <linux/vfio.h>
 
 #include "config.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 #include "exec/address-spaces.h"
 #include "kvm.h"
 #include "exec/memory.h"
@@ -35,9 +35,9 @@
 #include "pci/msix.h"
 #include "pci/pci.h"
 #include "qemu-common.h"
-#include "qemu-error.h"
-#include "qemu-queue.h"
-#include "range.h"
+#include "qemu/error-report.h"
+#include "qemu/queue.h"
+#include "qemu/range.h"
 
 /* #define DEBUG_VFIO */
 #ifdef DEBUG_VFIO
diff --git a/hw/vga-isa-mm.c b/hw/vga-isa-mm.c
index 008703ff57151f9c0f17db74caf60009753101ef..311c966f77adda164f00dbaed90b93fbc7253315 100644
--- a/hw/vga-isa-mm.c
+++ b/hw/vga-isa-mm.c
@@ -26,7 +26,7 @@
 #include "pc.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #define VGA_RAM_SIZE (8192 * 1024)
 
diff --git a/hw/vga-isa.c b/hw/vga-isa.c
index d1d5b118283c4d69ac36ff9faf7b7dd1a53739ba..cbe7b05a7e6733edcbcc943e49d666a89a6b701b 100644
--- a/hw/vga-isa.c
+++ b/hw/vga-isa.c
@@ -28,7 +28,7 @@
 #include "pc.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "loader.h"
 
 typedef struct ISAVGAState {
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index fe3a3d489952f7a9bb0ca8b73aa8d38a51a7bc1e..87c7c0648de7537e69fc96062ca8a765af9e2684 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -28,7 +28,7 @@
 #include "pci/pci.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "loader.h"
 
 #define PCI_VGA_IOPORT_OFFSET 0x400
diff --git a/hw/vga.c b/hw/vga.c
index 4007116859db68810bfaa28423f7552727159f8f..e2ba7f208c6b06a25f9e3a58a031181daa63136d 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -28,7 +28,7 @@
 #include "pci/pci.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "xen.h"
 #include "trace.h"
 
diff --git a/hw/vhost.c b/hw/vhost.c
index feaff64c15031668653a6fa787c99db816fac19d..4e1cb474187f86987b54fd225309db813a482055 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -16,7 +16,7 @@
 #include <sys/ioctl.h>
 #include "vhost.h"
 #include "hw/hw.h"
-#include "range.h"
+#include "qemu/range.h"
 #include <linux/vhost.h>
 #include "exec/address-spaces.h"
 
diff --git a/hw/vhost_net.c b/hw/vhost_net.c
index 93ad89a11c159dc579fa8641de735398bbe75b85..ae2785d83fc17dffe8edc4572e2a77e10ee68c07 100644
--- a/hw/vhost_net.c
+++ b/hw/vhost_net.c
@@ -18,7 +18,7 @@
 
 #include "virtio-net.h"
 #include "vhost_net.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 #include "config.h"
 
diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c
index 0f27c2b41485c337c3ddd9483069f6ea9d4a007a..5134e2f477847998a244f2941de0aaeedccc5c64 100644
--- a/hw/virtex_ml507.c
+++ b/hw/virtex_ml507.c
@@ -32,7 +32,7 @@
 #include "device_tree.h"
 #include "loader.h"
 #include "elf.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "exec/address-spaces.h"
 
 #include "ppc.h"
diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
index 97d3a932d95a45d97bdb6441fd5a7e51ac9f981a..2eb709b422ef58178445128c34df60d0c2532a7d 100644
--- a/hw/virtio-balloon.c
+++ b/hw/virtio-balloon.c
@@ -13,7 +13,7 @@
  *
  */
 
-#include "iov.h"
+#include "qemu/iov.h"
 #include "qemu-common.h"
 #include "virtio.h"
 #include "pc.h"
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index e25cc96477d0628d866c7735de15503bacb6c634..208caa2642be927f9a25ef085bd9548365e0189d 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -12,7 +12,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "trace.h"
 #include "hw/block-common.h"
 #include "blockdev.h"
diff --git a/hw/virtio-console.c b/hw/virtio-console.c
index cffee3d4706ececdbf37afc8d49508d8908ceb25..df0951e97368bcc3ab79831c0cade60799b0ace1 100644
--- a/hw/virtio-console.c
+++ b/hw/virtio-console.c
@@ -11,7 +11,7 @@
  */
 
 #include "qemu-char.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "trace.h"
 #include "virtio-serial.h"
 
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index dc7c6d6b565efbb3699ca0e1826e29b35bc243d4..5d03b31c1b9938cfd6b7432241f9ea8dde9feb08 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -11,13 +11,13 @@
  *
  */
 
-#include "iov.h"
+#include "qemu/iov.h"
 #include "virtio.h"
 #include "net/net.h"
 #include "net/checksum.h"
 #include "net/tap.h"
-#include "qemu-error.h"
-#include "qemu-timer.h"
+#include "qemu/error-report.h"
+#include "qemu/timer.h"
 #include "virtio-net.h"
 #include "vhost_net.h"
 
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index a2355dc8673e9a88077e0ad2ef02ef7fe1d65a2b..f58917f75fe7e9e331bddd6069343333e228550e 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -23,14 +23,14 @@
 #include "virtio-serial.h"
 #include "virtio-scsi.h"
 #include "pci/pci.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "pci/msi.h"
 #include "pci/msix.h"
 #include "loader.h"
 #include "kvm.h"
 #include "blockdev.h"
 #include "virtio-pci.h"
-#include "range.h"
+#include "qemu/range.h"
 
 /* from Linux's linux/virtio_pci.h */
 
diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c
index a73ef8e334138f2f35f69505b06d0d7f32b6f10b..e063127df638801f7283de5faaa49639eb618db3 100644
--- a/hw/virtio-rng.c
+++ b/hw/virtio-rng.c
@@ -9,7 +9,7 @@
  * top-level directory.
  */
 
-#include "iov.h"
+#include "qemu/iov.h"
 #include "qdev.h"
 #include "virtio.h"
 #include "virtio-rng.h"
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 5559518a930755a092d20fc0aa24d601a07638d1..fc5cb32277e195901c238058acdc2ec83a16ac7f 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -18,9 +18,9 @@
  * GNU GPL, version 2 or (at your option) any later version.
  */
 
-#include "iov.h"
+#include "qemu/iov.h"
 #include "monitor/monitor.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "sysbus.h"
 #include "trace.h"
 #include "virtio-serial.h"
diff --git a/hw/virtio.c b/hw/virtio.c
index f40a8c55713e637d5dbc5c8307ac4730908515cb..0455a9e8f3f1fe7d09335f008617d10faf91ad38 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -14,9 +14,9 @@
 #include <inttypes.h>
 
 #include "trace.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "virtio.h"
-#include "qemu-barrier.h"
+#include "qemu/atomic.h"
 
 /* The alignment to use between consumer and producer parts of vring.
  * x86 pagesize again. */
diff --git a/hw/virtio.h b/hw/virtio.h
index cdcb490733fb16ee752d5cfe76b2df941f255921..511a16992ef77a288dd959c9face628f843fb485 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -18,7 +18,7 @@
 #include "net/net.h"
 #include "qdev.h"
 #include "sysemu.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 #ifdef CONFIG_LINUX
 #include "9p.h"
 #endif
diff --git a/hw/vt82c686.c b/hw/vt82c686.c
index edceb5a01d461246a9f072f595e730f1228d4f95..a18aaed21768ba17124c739fc8e8075fc371e6c9 100644
--- a/hw/vt82c686.c
+++ b/hw/vt82c686.c
@@ -23,7 +23,7 @@
 #include "acpi.h"
 #include "pm_smbus.h"
 #include "sysemu.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "exec/address-spaces.h"
 
 typedef uint32_t pci_addr_t;
diff --git a/hw/watchdog.c b/hw/watchdog.c
index 623b299f71e5dbb083ca22faae51e81c110ce027..5b04215374e99d9732b1f9a11565f638b77a0d56 100644
--- a/hw/watchdog.c
+++ b/hw/watchdog.c
@@ -20,9 +20,9 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
-#include "qemu-queue.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
+#include "qemu/queue.h"
 #include "qapi/qmp/types.h"
 #include "monitor/monitor.h"
 #include "sysemu.h"
diff --git a/hw/watchdog.h b/hw/watchdog.h
index c12a29311aa149c159471cdcfc49d657f465986d..3e9a9706864cd0549587d68f53535eb41555a819 100644
--- a/hw/watchdog.h
+++ b/hw/watchdog.h
@@ -22,7 +22,7 @@
 #ifndef QEMU_WATCHDOG_H
 #define QEMU_WATCHDOG_H
 
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 struct WatchdogTimerModel {
     QLIST_ENTRY(WatchdogTimerModel) entry;
diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c
index 181774220dc63f4a57fd94742bc41fa27674b876..54f0665135e4201af9f7a9f5c90d36b1aa59b850 100644
--- a/hw/wdt_i6300esb.c
+++ b/hw/wdt_i6300esb.c
@@ -22,7 +22,7 @@
 #include <inttypes.h>
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "watchdog.h"
 #include "hw.h"
 #include "pci/pci.h"
diff --git a/hw/wdt_ib700.c b/hw/wdt_ib700.c
index 7f6c21d8095040797c8d1391efd7dcf239333070..4475f7b86246424b8b0479bcdd3673ab6e030900 100644
--- a/hw/wdt_ib700.c
+++ b/hw/wdt_ib700.c
@@ -20,7 +20,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "watchdog.h"
 #include "hw.h"
 #include "isa.h"
diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index f83a1e1d0979eb31750258add9ae93a26eb1073f..270584fc102f5ce04492f622afac007cca7b9aeb 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -36,7 +36,7 @@
 
 #include "hw.h"
 #include "qemu-char.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "xen_backend.h"
 
 #include <xen/grant_table.h>
diff --git a/hw/xen_common.h b/hw/xen_common.h
index 727757afb44677db7ceda542eb2ad40b8b253685..95bc9a7825b748c2763df82062bd2cf4904a6ae9 100644
--- a/hw/xen_common.h
+++ b/hw/xen_common.h
@@ -16,7 +16,7 @@
 
 #include "hw.h"
 #include "xen.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 /*
  * We don't support Xen prior to 3.3.0.
diff --git a/hw/xen_domainbuild.c b/hw/xen_domainbuild.c
index db1497469a60d3441317630a1ef5fa4a271a8972..a4272f0680ccbebc3e173fe44336824eeea38cb4 100644
--- a/hw/xen_domainbuild.c
+++ b/hw/xen_domainbuild.c
@@ -1,8 +1,8 @@
 #include <signal.h>
 #include "xen_backend.h"
 #include "xen_domainbuild.h"
-#include "qemu-timer.h"
-#include "qemu-log.h"
+#include "qemu/timer.h"
+#include "qemu/log.h"
 
 #include <xenguest.h>
 
diff --git a/hw/xen_pt.c b/hw/xen_pt.c
index 5c50d562d9dadd16e5a796c45e2821a6aed6b315..9ebd028f2e448716cd3892a1351f0ca4929617ab 100644
--- a/hw/xen_pt.c
+++ b/hw/xen_pt.c
@@ -58,7 +58,7 @@
 #include "xen.h"
 #include "xen_backend.h"
 #include "xen_pt.h"
-#include "range.h"
+#include "qemu/range.h"
 #include "exec/address-spaces.h"
 
 #define XEN_PT_NR_IRQS (256)
diff --git a/hw/xen_pt_config_init.c b/hw/xen_pt_config_init.c
index 0a5f82cb80029025b601579905b864e804c35195..54a179af90ac55cb2868fb8dd46d3cdb022e9c33 100644
--- a/hw/xen_pt_config_init.c
+++ b/hw/xen_pt_config_init.c
@@ -12,7 +12,7 @@
  * This file implements direct PCI assignment to a HVM guest
  */
 
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "xen_backend.h"
 #include "xen_pt.h"
 
diff --git a/hw/xgmac.c b/hw/xgmac.c
index d0d510ed6a84920dd901970ad4257dd46be09f01..acc3d376489bcb33a28edf392f7f692895871bbd 100644
--- a/hw/xgmac.c
+++ b/hw/xgmac.c
@@ -26,7 +26,7 @@
 
 #include "sysbus.h"
 #include "qemu-char.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "net/net.h"
 #include "net/checksum.h"
 
diff --git a/hw/xilinx_axidma.c b/hw/xilinx_axidma.c
index 2fd6068428474da858fdd9e5387fb659b13bff4a..ce02764b3fc56d7c96e341b51222dfc41f194d34 100644
--- a/hw/xilinx_axidma.c
+++ b/hw/xilinx_axidma.c
@@ -23,9 +23,9 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "ptimer.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "qdev-addr.h"
 
 #include "stream.h"
diff --git a/hw/xilinx_axienet.c b/hw/xilinx_axienet.c
index 35979e65c93ebd16032d3448c63f71171345f971..09e49b0aeebf2f76043916a2edd1ad3c5e64e085 100644
--- a/hw/xilinx_axienet.c
+++ b/hw/xilinx_axienet.c
@@ -23,7 +23,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "net/net.h"
 #include "net/checksum.h"
 
diff --git a/hw/xilinx_spi.c b/hw/xilinx_spi.c
index 039027442c69ff83556da9fce670459dd4bf1c04..4eed1828e36c722e8259698eacc0885e28526e92 100644
--- a/hw/xilinx_spi.c
+++ b/hw/xilinx_spi.c
@@ -26,7 +26,7 @@
 
 #include "sysbus.h"
 #include "sysemu.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "fifo.h"
 
 #include "ssi.h"
diff --git a/hw/xilinx_spips.c b/hw/xilinx_spips.c
index ee7656d7d83bd92637c8d83b007c7d391262c8dc..ebe375e56f6f29beadbe0f3fcf2c3c8b07446072 100644
--- a/hw/xilinx_spips.c
+++ b/hw/xilinx_spips.c
@@ -25,10 +25,10 @@
 #include "sysbus.h"
 #include "sysemu.h"
 #include "ptimer.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "fifo.h"
 #include "ssi.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
 
 #ifdef XILINX_SPIPS_ERR_DEBUG
 #define DB_PRINT(...) do { \
diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
index 2b01dc2869f84c46f1a364ec06f46d198c0d21a9..69294bb83c5064f5c85bc65df7336b09dfd22295 100644
--- a/hw/xilinx_timer.c
+++ b/hw/xilinx_timer.c
@@ -24,7 +24,7 @@
 
 #include "sysbus.h"
 #include "ptimer.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #define D(x)
 
diff --git a/hw/xtensa_pic.c b/hw/xtensa_pic.c
index 1ec70cd9693876c8257904df6c6b09b0ad6b4ad9..97d36be272564992ee83fc12d7931db66a5ba70c 100644
--- a/hw/xtensa_pic.c
+++ b/hw/xtensa_pic.c
@@ -26,8 +26,8 @@
  */
 
 #include "hw.h"
-#include "qemu-log.h"
-#include "qemu-timer.h"
+#include "qemu/log.h"
+#include "qemu/timer.h"
 
 void xtensa_advance_ccount(CPUXtensaState *env, uint32_t d)
 {
diff --git a/hw/zynq_slcr.c b/hw/zynq_slcr.c
index dde4306195b0b0c54d4ce995ecf34c36b1d68a08..c7ce51f4a6bd4f263ab335f9450a2ca2cfc07238 100644
--- a/hw/zynq_slcr.c
+++ b/hw/zynq_slcr.c
@@ -15,7 +15,7 @@
  */
 
 #include "hw.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysbus.h"
 #include "sysemu.h"
 
diff --git a/include/block/aio.h b/include/block/aio.h
index 31884a8f165630bca99cce2523ea8aad2d7506dc..0933f05878fae05a0c6300b1b6a8860ca0a7765c 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -15,8 +15,8 @@
 #define QEMU_AIO_H
 
 #include "qemu-common.h"
-#include "qemu-queue.h"
-#include "event_notifier.h"
+#include "qemu/queue.h"
+#include "qemu/event_notifier.h"
 
 typedef struct BlockDriverAIOCB BlockDriverAIOCB;
 typedef void BlockDriverCompletionFunc(void *opaque, int ret);
diff --git a/include/block/block.h b/include/block/block.h
index d49ce4dbc5ecc9376e98db4a7675b638d9307d64..b81d200b03c18aabeefef9a58acf6e819c1feabd 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -3,7 +3,7 @@
 
 #include "block/aio.h"
 #include "qemu-common.h"
-#include "qemu-option.h"
+#include "qemu/option.h"
 #include "block/coroutine.h"
 #include "qapi/qmp/qobject.h"
 #include "qapi-types.h"
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 14c57afd54e7e0bae04aa3b06edeff5015f2fc85..f83ffb8a08fbb001a1443cf78a6a0314041cc7eb 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -25,10 +25,10 @@
 #define BLOCK_INT_H
 
 #include "block/block.h"
-#include "qemu-option.h"
-#include "qemu-queue.h"
+#include "qemu/option.h"
+#include "qemu/queue.h"
 #include "block/coroutine.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qapi-types.h"
 #include "qapi/qmp/qerror.h"
 #include "monitor/monitor.h"
diff --git a/include/block/coroutine.h b/include/block/coroutine.h
index 34c15d41169ebb3aab061861c593ac60b4b58b51..c31fae3f3cf1b9df431a7677cf6899070928858d 100644
--- a/include/block/coroutine.h
+++ b/include/block/coroutine.h
@@ -16,8 +16,8 @@
 #define QEMU_COROUTINE_H
 
 #include <stdbool.h>
-#include "qemu-queue.h"
-#include "qemu-timer.h"
+#include "qemu/queue.h"
+#include "qemu/timer.h"
 
 /**
  * Coroutines are a mechanism for stack switching and can be used for
diff --git a/include/block/coroutine_int.h b/include/block/coroutine_int.h
index 282a3ceda61ec65e1d6a1f6346e22f8258c8abb2..17eb71e7238073cdfbaf7742250d10c92eebbb78 100644
--- a/include/block/coroutine_int.h
+++ b/include/block/coroutine_int.h
@@ -25,7 +25,7 @@
 #ifndef QEMU_COROUTINE_INT_H
 #define QEMU_COROUTINE_INT_H
 
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "block/coroutine.h"
 
 typedef enum {
diff --git a/include/block/thread-pool.h b/include/block/thread-pool.h
index a87b28708103e27a5d5550fdedb5396c7ec7ec71..200703e35f8f1f7f000d43c51ec0bc7f898f6720 100644
--- a/include/block/thread-pool.h
+++ b/include/block/thread-pool.h
@@ -19,8 +19,8 @@
 #define QEMU_THREAD_POOL_H 1
 
 #include "qemu-common.h"
-#include "qemu-queue.h"
-#include "qemu-thread.h"
+#include "qemu/queue.h"
+#include "qemu/thread.h"
 #include "block/coroutine.h"
 #include "block/block_int.h"
 
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index bec04e2008c2044e93ca4975ae74ebc1b13dc242..c12e35f54d86067bc8d974088476be13c5362c1f 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -20,7 +20,7 @@
 #define CPU_ALL_H
 
 #include "qemu-common.h"
-#include "qemu-tls.h"
+#include "qemu/tls.h"
 #include "exec/cpu-common.h"
 
 /* some important defines:
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index f83d6180f3e1220bd9ff03beee0c1c2bc459e81f..4d4f8d4e980d17443272fcbe22cff6ce6498d337 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -9,8 +9,8 @@
 #include "exec/poison.h"
 #endif
 
-#include "bswap.h"
-#include "qemu-queue.h"
+#include "qemu/bswap.h"
+#include "qemu/queue.h"
 
 #if !defined(CONFIG_USER_ONLY)
 
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index 8d2230e50eae1c1f8fcc670120555572070887cb..aea0ece051585ad2a2e70fb49afcc1f00cbc9379 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -27,8 +27,8 @@
 #include <setjmp.h>
 #include <inttypes.h>
 #include <signal.h>
-#include "osdep.h"
-#include "qemu-queue.h"
+#include "qemu/osdep.h"
+#include "qemu/queue.h"
 #include "exec/hwaddr.h"
 
 #ifndef TARGET_LONG_BITS
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 2ae8aae3d6c9f826ac1028a32b56508411fb4ecb..46dca74fda40a3201f71b15f80a2c8a845d67dff 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -70,7 +70,7 @@ typedef struct TranslationBlock TranslationBlock;
 
 #define OPPARAM_BUF_SIZE (OPC_BUF_SIZE * MAX_OPC_PARAM)
 
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 void gen_intermediate_code(CPUArchState *env, struct TranslationBlock *tb);
 void gen_intermediate_code_pc(CPUArchState *env, struct TranslationBlock *tb);
diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h
index 1541f0b1e44450d38370f3b56dfa132e94a054c8..8043b3ba2688f6132a4d7e0aa51364f18d06117e 100644
--- a/include/exec/gen-icount.h
+++ b/include/exec/gen-icount.h
@@ -1,7 +1,7 @@
 #ifndef GEN_ICOUNT_H
 #define GEN_ICOUNT_H 1
 
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /* Helpers for instruction counting code generation.  */
 
diff --git a/include/exec/memory.h b/include/exec/memory.h
index b0c474584f108bc02d2cc42638a81f24cb2c88d1..aada9696285fd8ed843172dba0e265ae3e1ca509 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -21,10 +21,10 @@
 #include "qemu-common.h"
 #include "exec/cpu-common.h"
 #include "exec/hwaddr.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "exec/iorange.h"
 #include "exec/ioport.h"
-#include "int128.h"
+#include "qemu/int128.h"
 
 typedef struct MemoryRegionOps MemoryRegionOps;
 typedef struct MemoryRegion MemoryRegion;
diff --git a/include/exec/softmmu_template.h b/include/exec/softmmu_template.h
index 15d4c519eef0ade58e27be6d0fbc4cf8e9872c99..b219191abdede7cd6675ed169ad119559087dafa 100644
--- a/include/exec/softmmu_template.h
+++ b/include/exec/softmmu_template.h
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "exec/memory.h"
 
 #define DATA_SIZE (1 << SHIFT)
diff --git a/include/migration/migration.h b/include/migration/migration.h
index a95f761e4c9db81b60bdc6dabc87137aa1dd479e..8b7af61e7e57291c5fd45496b929d93923b16def 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -16,7 +16,7 @@
 
 #include "qapi/qmp/qdict.h"
 #include "qemu-common.h"
-#include "notify.h"
+#include "qemu/notify.h"
 #include "qapi/error.h"
 #include "migration/vmstate.h"
 #include "qapi-types.h"
diff --git a/include/net/net.h b/include/net/net.h
index 41d3729867eb84fa1e8465e4a3da0f36f58babf8..de42dd76daf68d4b0927e8141f2f8f7a2e2081f3 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -1,10 +1,10 @@
 #ifndef QEMU_NET_H
 #define QEMU_NET_H
 
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "qemu-common.h"
 #include "qapi/qmp/qdict.h"
-#include "qemu-option.h"
+#include "qemu/option.h"
 #include "net/queue.h"
 #include "migration/vmstate.h"
 #include "qapi-types.h"
diff --git a/include/net/slirp.h b/include/net/slirp.h
index ac9d44964fd2a78d56945935de7d728cac325c86..54b655c272e16e57e69fc596fdd699ea7e9eee93 100644
--- a/include/net/slirp.h
+++ b/include/net/slirp.h
@@ -26,7 +26,7 @@
 
 #include "qemu-common.h"
 #include "qapi/qmp/qdict.h"
-#include "qemu-option.h"
+#include "qemu/option.h"
 #include "qapi-types.h"
 
 #ifdef CONFIG_SLIRP
diff --git a/include/qapi/error.h b/include/qapi/error.h
index 4d52e7369e9af5096b86984d84fac7b5b8b640db..5cd2f0c302508c40a560ed06d3f9b6b6db63c4f0 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -12,7 +12,7 @@
 #ifndef ERROR_H
 #define ERROR_H
 
-#include "compiler.h"
+#include "qemu/compiler.h"
 #include "qapi-types.h"
 #include <stdbool.h>
 
diff --git a/include/qapi/opts-visitor.h b/include/qapi/opts-visitor.h
index 31fa4c5628043cecebb83ade42165077eaebac78..5939eeebc7f70c29079dd7c33415a89d74263bd1 100644
--- a/include/qapi/opts-visitor.h
+++ b/include/qapi/opts-visitor.h
@@ -14,7 +14,7 @@
 #define OPTS_VISITOR_H
 
 #include "qapi/visitor.h"
-#include "qemu-option.h"
+#include "qemu/option.h"
 
 typedef struct OptsVisitor OptsVisitor;
 
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index c815981d3073f255ba8ee277f8112063d4f8051b..6d9a4be3a5fc0afb97c97f63073b6b89f6c205fb 100644
--- a/include/qapi/qmp/qdict.h
+++ b/include/qapi/qmp/qdict.h
@@ -15,7 +15,7 @@
 
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qlist.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include <stdint.h>
 
 #define QDICT_BUCKET_MAX 512
diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
index d912297590449b0d1c54aff16c5cd0283fcd275e..6c0a18dfc403537dd7d641f3dde69c1de4f20417 100644
--- a/include/qapi/qmp/qerror.h
+++ b/include/qapi/qmp/qerror.h
@@ -14,7 +14,7 @@
 
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qapi-types.h"
 #include <stdarg.h>
diff --git a/include/qapi/qmp/qjson.h b/include/qapi/qmp/qjson.h
index 0473374bf275d2a9673264ad81f1c726b8a248c4..73351ed6d683fc4f7c034e62d61ff1206d1faffb 100644
--- a/include/qapi/qmp/qjson.h
+++ b/include/qapi/qmp/qjson.h
@@ -15,7 +15,7 @@
 #define QJSON_H
 
 #include <stdarg.h>
-#include "compiler.h"
+#include "qemu/compiler.h"
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qstring.h"
 
diff --git a/include/qapi/qmp/qlist.h b/include/qapi/qmp/qlist.h
index ffa0846d48d4a683bbe063a52acc0ea7e561c675..382f04c3c4a50d55055fe0dd16a09e0ace3a6a48 100644
--- a/include/qapi/qmp/qlist.h
+++ b/include/qapi/qmp/qlist.h
@@ -14,8 +14,8 @@
 #define QLIST_H
 
 #include "qapi/qmp/qobject.h"
-#include "qemu-queue.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
+#include "qemu/queue.h"
 
 typedef struct QListEntry {
     QObject *value;
diff --git a/acl.h b/include/qemu/acl.h
similarity index 98%
rename from acl.h
rename to include/qemu/acl.h
index 0ef780401f9868e2cf629ee5523cf3b689d16f5d..116487e28231f6e095cf8845e51a8e6092267c98 100644
--- a/acl.h
+++ b/include/qemu/acl.h
@@ -25,7 +25,7 @@
 #ifndef __QEMU_ACL_H__
 #define __QEMU_ACL_H__
 
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 typedef struct qemu_acl_entry qemu_acl_entry;
 typedef struct qemu_acl qemu_acl;
diff --git a/qemu-barrier.h b/include/qemu/atomic.h
similarity index 96%
rename from qemu-barrier.h
rename to include/qemu/atomic.h
index faa83d265ea2bc1df891db9ffa6c4be0dc6e4251..96a194bbee66b9c5105d4162ad187dd0a675ca11 100644
--- a/qemu-barrier.h
+++ b/include/qemu/atomic.h
@@ -6,7 +6,7 @@
 
 #if defined(__i386__)
 
-#include "compiler.h"        /* QEMU_GNUC_PREREQ */
+#include "qemu/compiler.h"        /* QEMU_GNUC_PREREQ */
 
 /*
  * Because of the strongly ordered x86 storage model, wmb() and rmb() are nops
diff --git a/bitmap.h b/include/qemu/bitmap.h
similarity index 99%
rename from bitmap.h
rename to include/qemu/bitmap.h
index 08755eba11b291738b8b721c631ee2b5f1f2b68e..308bbb71e9b7c1041b375332cc86f44d456362da 100644
--- a/bitmap.h
+++ b/include/qemu/bitmap.h
@@ -13,7 +13,7 @@
 #define BITMAP_H
 
 #include "qemu-common.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
 
 /*
  * The available bitmap operations and their rough meaning in the
diff --git a/bitops.h b/include/qemu/bitops.h
similarity index 100%
rename from bitops.h
rename to include/qemu/bitops.h
diff --git a/bswap.h b/include/qemu/bswap.h
similarity index 100%
rename from bswap.h
rename to include/qemu/bswap.h
diff --git a/cache-utils.h b/include/qemu/cache-utils.h
similarity index 100%
rename from cache-utils.h
rename to include/qemu/cache-utils.h
diff --git a/compatfd.h b/include/qemu/compatfd.h
similarity index 100%
rename from compatfd.h
rename to include/qemu/compatfd.h
diff --git a/compiler.h b/include/qemu/compiler.h
similarity index 100%
rename from compiler.h
rename to include/qemu/compiler.h
diff --git a/qemu-config.h b/include/qemu/config-file.h
similarity index 94%
rename from qemu-config.h
rename to include/qemu/config-file.h
index 584491a29bc4495644775d87d421f856866fe6ba..486c77cad4c1f8aaec84906818f972c0712d49d8 100644
--- a/qemu-config.h
+++ b/include/qemu/config-file.h
@@ -2,9 +2,9 @@
 #define QEMU_CONFIG_H
 
 #include <stdio.h>
-#include "qemu-option.h"
+#include "qemu/option.h"
 #include "qapi/error.h"
-#include "qemu-option.h"
+#include "qemu/option.h"
 
 extern QemuOptsList qemu_fsdev_opts;
 extern QemuOptsList qemu_virtfs_opts;
diff --git a/envlist.h b/include/qemu/envlist.h
similarity index 100%
rename from envlist.h
rename to include/qemu/envlist.h
diff --git a/qemu-error.h b/include/qemu/error-report.h
similarity index 100%
rename from qemu-error.h
rename to include/qemu/error-report.h
diff --git a/event_notifier.h b/include/qemu/event_notifier.h
similarity index 100%
rename from event_notifier.h
rename to include/qemu/event_notifier.h
diff --git a/host-utils.h b/include/qemu/host-utils.h
similarity index 99%
rename from host-utils.h
rename to include/qemu/host-utils.h
index a5f8464fb2baf007b899d5a18682e1263026c716..81c9a754ae2db2af6c8a70b4ebe08ff697b2dd4c 100644
--- a/host-utils.h
+++ b/include/qemu/host-utils.h
@@ -25,7 +25,7 @@
 #ifndef HOST_UTILS_H
 #define HOST_UTILS_H 1
 
-#include "compiler.h"   /* QEMU_GNUC_PREREQ */
+#include "qemu/compiler.h"   /* QEMU_GNUC_PREREQ */
 
 #if defined(__x86_64__)
 #define __HAVE_FAST_MULU64__
diff --git a/int128.h b/include/qemu/int128.h
similarity index 100%
rename from int128.h
rename to include/qemu/int128.h
diff --git a/iov.h b/include/qemu/iov.h
similarity index 100%
rename from iov.h
rename to include/qemu/iov.h
diff --git a/qemu-log.h b/include/qemu/log.h
similarity index 100%
rename from qemu-log.h
rename to include/qemu/log.h
diff --git a/main-loop.h b/include/qemu/main-loop.h
similarity index 100%
rename from main-loop.h
rename to include/qemu/main-loop.h
diff --git a/module.h b/include/qemu/module.h
similarity index 100%
rename from module.h
rename to include/qemu/module.h
diff --git a/notify.h b/include/qemu/notify.h
similarity index 97%
rename from notify.h
rename to include/qemu/notify.h
index 03cf26c0b62352670598970d7e2a8f385280de87..4e2e7f0ec4db0aa63c4e5450b7d64467b4cb76aa 100644
--- a/notify.h
+++ b/include/qemu/notify.h
@@ -14,7 +14,7 @@
 #ifndef QEMU_NOTIFY_H
 #define QEMU_NOTIFY_H
 
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 typedef struct Notifier Notifier;
 
diff --git a/qemu-option.h b/include/qemu/option.h
similarity index 99%
rename from qemu-option.h
rename to include/qemu/option.h
index ca0dc041dd4166b831edbcb30ad9b61c92392721..ba197cddcf2ced115ecfbbaea340d77672515e9b 100644
--- a/qemu-option.h
+++ b/include/qemu/option.h
@@ -27,7 +27,7 @@
 #define QEMU_OPTIONS_H
 
 #include <stdint.h>
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 
diff --git a/qemu-option-internal.h b/include/qemu/option_int.h
similarity index 96%
rename from qemu-option-internal.h
rename to include/qemu/option_int.h
index 77899b082df80e9906cdef97dba3468fd24bece3..8212fa4a485855cd8c71fed189a5214c27b571dd 100644
--- a/qemu-option-internal.h
+++ b/include/qemu/option_int.h
@@ -26,8 +26,8 @@
 #ifndef QEMU_OPTIONS_INTERNAL_H
 #define QEMU_OPTIONS_INTERNAL_H
 
-#include "qemu-option.h"
-#include "qemu-error.h"
+#include "qemu/option.h"
+#include "qemu/error-report.h"
 
 struct QemuOpt {
     const char   *name;
diff --git a/osdep.h b/include/qemu/osdep.h
similarity index 100%
rename from osdep.h
rename to include/qemu/osdep.h
diff --git a/qemu-queue.h b/include/qemu/queue.h
similarity index 99%
rename from qemu-queue.h
rename to include/qemu/queue.h
index 9288cd8e8260c183e1d328ea04dda9aae82cdf61..d433b9017cef02a2d7a2d8bbb61f7524678e44e8 100644
--- a/qemu-queue.h
+++ b/include/qemu/queue.h
@@ -78,7 +78,7 @@
  * For details on the use of these macros, see the queue(3) manual page.
  */
 
-#include "qemu-barrier.h" /* for smp_wmb() */
+#include "qemu/atomic.h" /* for smp_wmb() */
 
 /*
  * List definitions.
diff --git a/range.h b/include/qemu/range.h
similarity index 100%
rename from range.h
rename to include/qemu/range.h
diff --git a/qemu_socket.h b/include/qemu/sockets.h
similarity index 99%
rename from qemu_socket.h
rename to include/qemu/sockets.h
index 42899fe138c99729bb8435cdb07c8e87ce4ca33f..803ae1798c4ce4f22bac4a184e5016b7b656092d 100644
--- a/qemu_socket.h
+++ b/include/qemu/sockets.h
@@ -26,7 +26,7 @@ int inet_aton(const char *cp, struct in_addr *ia);
 
 #endif /* !_WIN32 */
 
-#include "qemu-option.h"
+#include "qemu/option.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
 
diff --git a/qemu-thread-posix.h b/include/qemu/thread-posix.h
similarity index 100%
rename from qemu-thread-posix.h
rename to include/qemu/thread-posix.h
diff --git a/qemu-thread-win32.h b/include/qemu/thread-win32.h
similarity index 100%
rename from qemu-thread-win32.h
rename to include/qemu/thread-win32.h
diff --git a/qemu-thread.h b/include/qemu/thread.h
similarity index 96%
rename from qemu-thread.h
rename to include/qemu/thread.h
index 3ee2f6b1f9a82f8654c803faf9e162a985687a60..c02404b9fbf853909c6c2996b484d30129434e37 100644
--- a/qemu-thread.h
+++ b/include/qemu/thread.h
@@ -10,9 +10,9 @@ typedef struct QemuSemaphore QemuSemaphore;
 typedef struct QemuThread QemuThread;
 
 #ifdef _WIN32
-#include "qemu-thread-win32.h"
+#include "qemu/thread-win32.h"
 #else
-#include "qemu-thread-posix.h"
+#include "qemu/thread-posix.h"
 #endif
 
 #define QEMU_THREAD_JOINABLE 0
diff --git a/qemu-timer.h b/include/qemu/timer.h
similarity index 99%
rename from qemu-timer.h
rename to include/qemu/timer.h
index da7e97cd5aaa82b055222ae7775a82c404a034d3..1766b2d6c769b512e30048c560429bad017dd3e5 100644
--- a/qemu-timer.h
+++ b/include/qemu/timer.h
@@ -2,8 +2,8 @@
 #define QEMU_TIMER_H
 
 #include "qemu-common.h"
-#include "main-loop.h"
-#include "notify.h"
+#include "qemu/main-loop.h"
+#include "qemu/notify.h"
 
 #ifdef __FreeBSD__
 #include <sys/param.h>
diff --git a/qemu-tls.h b/include/qemu/tls.h
similarity index 100%
rename from qemu-tls.h
rename to include/qemu/tls.h
diff --git a/qemu-types.h b/include/qemu/typedefs.h
similarity index 100%
rename from qemu-types.h
rename to include/qemu/typedefs.h
diff --git a/uri.h b/include/qemu/uri.h
similarity index 100%
rename from uri.h
rename to include/qemu/uri.h
diff --git a/qemu-xattr.h b/include/qemu/xattr.h
similarity index 100%
rename from qemu-xattr.h
rename to include/qemu/xattr.h
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 9682dd59edc817a31c9a764810ca404d0f7a5853..9e9d044bdf21e407f0400d3e031db0354f73a374 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -21,7 +21,7 @@
 #define QEMU_CPU_H
 
 #include "qom/object.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 /**
  * SECTION:cpu
diff --git a/include/qom/object.h b/include/qom/object.h
index ed1f47f0509a0e938af176c0512bb693d1985b13..abe9691cb7ddcf6ad6c0f58da5dbce0d9ff1dfa2 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -17,7 +17,7 @@
 #include <glib.h>
 #include <stdint.h>
 #include <stdbool.h>
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 struct Visitor;
 struct Error;
diff --git a/include/ui/console.h b/include/ui/console.h
index 3db6635b0a674f41f94483d2921fd846d7ac227d..fc23baa06b35c911b2ace381d90be92850b3c21d 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -3,7 +3,7 @@
 
 #include "ui/qemu-pixman.h"
 #include "qapi/qmp/qdict.h"
-#include "notify.h"
+#include "qemu/notify.h"
 #include "monitor/monitor.h"
 #include "trace.h"
 #include "qapi-types.h"
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index 3e08be06bf083234b4c5c1bfe2ca0ae1496f96b4..73422adeee85eedfd9b1e0da2f3c23d8fa946cd1 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -22,8 +22,8 @@
 
 #include <spice.h>
 
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "monitor/monitor.h"
 
 extern int using_spice;
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
index 928e0a1baecba1b15616d2c1cd4c35f10aee603f..a0d1a50487a19d032a0433c45d7eaaa080099e33 100644
--- a/include/ui/spice-display.h
+++ b/include/ui/spice-display.h
@@ -19,7 +19,7 @@
 #include <spice/enums.h>
 #include <spice/qxl_dev.h>
 
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include "ui/qemu-pixman.h"
 #include "sysemu.h"
 
diff --git a/iohandler.c b/iohandler.c
index cf8276dffc4f545482b2db114444e4a86b3c6b57..2523adc11d62ce9549e35254a7b92390564afbb6 100644
--- a/iohandler.c
+++ b/iohandler.c
@@ -24,9 +24,9 @@
 
 #include "config-host.h"
 #include "qemu-common.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "block/aio.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 #ifndef _WIN32
 #include <sys/wait.h>
diff --git a/iov.c b/iov.c
index a81eedcedb4bf3b6bdaee7440045ddac4af26443..419e4199691a0e91ead579108f2a0d4498bcca3b 100644
--- a/iov.c
+++ b/iov.c
@@ -16,7 +16,7 @@
  * GNU GPL, version 2 or (at your option) any later version.
  */
 
-#include "iov.h"
+#include "qemu/iov.h"
 
 #ifdef _WIN32
 # include <windows.h>
diff --git a/kvm-all.c b/kvm-all.c
index c2588594e1f96edacc7e46116c1b67bc1d5a3c34..41ea3aa6ee1d6bc86d9cec6efbf16759b1b0879f 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -21,18 +21,18 @@
 #include <linux/kvm.h>
 
 #include "qemu-common.h"
-#include "qemu-barrier.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/atomic.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "sysemu.h"
 #include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "exec/gdbstub.h"
 #include "kvm.h"
-#include "bswap.h"
+#include "qemu/bswap.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 
 /* This check must be after config-host.h is included */
 #ifdef CONFIG_EVENTFD
diff --git a/kvm.h b/kvm.h
index 72d866a9668a18bc4e2f08fb0602478d73ccf2e1..131d2bdc15453235805e73b41d380efca6d44df8 100644
--- a/kvm.h
+++ b/kvm.h
@@ -16,7 +16,7 @@
 
 #include <errno.h>
 #include "config-host.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 #ifdef CONFIG_KVM
 #include <linux/kvm.h>
diff --git a/libcacard/event.c b/libcacard/event.c
index 61923761c92a2c99022e67a1ed4f0b8f785e0b3e..2d7500fac0aa8fefafc41200002aa3b4cc67816a 100644
--- a/libcacard/event.c
+++ b/libcacard/event.c
@@ -6,7 +6,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 #include "vcard.h"
 #include "vreader.h"
diff --git a/libcacard/vreader.c b/libcacard/vreader.c
index 96d2407e78a29d6c889de7d1169282ee89e19606..313349b6567aed6299ddbe7634405d6a11b32fc4 100644
--- a/libcacard/vreader.c
+++ b/libcacard/vreader.c
@@ -6,7 +6,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 #include "vcard.h"
 #include "vcard_emul.h"
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index b64c93dd692541023e1e86545c1ed1685f3b70de..2fce52bed504c8d663af0bdad24b79a272a35d5a 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -13,8 +13,8 @@
 #include <netdb.h>
 
 #include "qemu-common.h"
-#include "qemu-thread.h"
-#include "qemu_socket.h"
+#include "qemu/thread.h"
+#include "qemu/sockets.h"
 
 #include "vscard_common.h"
 
diff --git a/libfdt_env.h b/libfdt_env.h
index 90d7f3b162ccea53958aa1a6d05049c9f53ac56f..7938d73faed62243b57bf79e1e5a1447af121915 100644
--- a/libfdt_env.h
+++ b/libfdt_env.h
@@ -19,7 +19,7 @@
 #ifndef _LIBFDT_ENV_H
 #define _LIBFDT_ENV_H
 
-#include "bswap.h"
+#include "qemu/bswap.h"
 
 #ifdef HOST_WORDS_BIGENDIAN
 #define fdt32_to_cpu(x)		(x)
diff --git a/linux-user/main.c b/linux-user/main.c
index 25e35cd3dca875cca83339e91bba062457705170..f6c4c8d7a30b9b6dcbda37ee5024bc9182020fea 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -28,11 +28,11 @@
 
 #include "qemu.h"
 #include "qemu-common.h"
-#include "cache-utils.h"
+#include "qemu/cache-utils.h"
 #include "cpu.h"
 #include "tcg.h"
-#include "qemu-timer.h"
-#include "envlist.h"
+#include "qemu/timer.h"
+#include "qemu/envlist.h"
 #include "elf.h"
 
 #define DEBUG_LOGFILE "/tmp/qemu.log"
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 2af883bf74086a020d3e60fb347d915347a56793..8a3538c631f01d56541d78f9b678b2ede9e91993 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -18,7 +18,7 @@
 #include "syscall.h"
 #include "target_signal.h"
 #include "exec/gdbstub.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 #if defined(CONFIG_USE_NPTL)
 #define THREAD __thread
@@ -217,7 +217,7 @@ unsigned long init_guest_space(unsigned long host_start,
                                unsigned long guest_start,
                                bool fixed);
 
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 /* syscall.c */
 int host_to_target_waitstatus(int status);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 31d527646593394eb1944b8ecef152629f05862e..7c304e92de6b6657d36d3e602d32d5e57295abbd 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -72,7 +72,7 @@ int __clone2(int (*fn)(void *), void *child_stack_base,
 #include <sys/epoll.h>
 #endif
 #ifdef CONFIG_ATTR
-#include "qemu-xattr.h"
+#include "qemu/xattr.h"
 #endif
 
 #define termios host_termios
diff --git a/main-loop.c b/main-loop.c
index f9006118ad5c6c2fa6323ac768821a17e25b74d7..54f38ae1aeef9985c0caf12df2f6157cfe23d0cf 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -23,14 +23,14 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "slirp/slirp.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 #include "block/aio.h"
 
 #ifndef _WIN32
 
-#include "compatfd.h"
+#include "qemu/compatfd.h"
 
 /* If we have signalfd, we mask out the signals we want to handle and then
  * use signalfd to listen for them.  We rely on whatever the current signal
diff --git a/memory.c b/memory.c
index d40193d4740e834c9467c4d901997d32556eedc7..d44200335bae8d75af33fa3f5e9cecc14304e35a 100644
--- a/memory.c
+++ b/memory.c
@@ -16,7 +16,7 @@
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "exec/ioport.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
 #include "kvm.h"
 #include <assert.h>
 
diff --git a/memory_mapping.h b/memory_mapping.h
index d5ba46c7e7293de8470835a7726b712c0b1b05c3..12561259635d39a35d24cc2a70d911a981647c39 100644
--- a/memory_mapping.h
+++ b/memory_mapping.h
@@ -14,7 +14,7 @@
 #ifndef MEMORY_MAPPING_H
 #define MEMORY_MAPPING_H
 
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 /* The physical and virtual address in the memory mapping are contiguous. */
 typedef struct MemoryMapping {
diff --git a/migration-exec.c b/migration-exec.c
index 784486d2fcd853f2ec140b5be5450394c3d9d7ed..68f36f41f11518593d9c259565475578e0ee3d7e 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -16,7 +16,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "migration/migration.h"
 #include "buffered_file.h"
 #include "block/block.h"
diff --git a/migration-fd.c b/migration-fd.c
index ab5abe2aa5659444854e3b8bef64647df219db31..ea121bc0d6c406e412ebbb28f6273d5b12b2bcf7 100644
--- a/migration-fd.c
+++ b/migration-fd.c
@@ -14,12 +14,12 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "migration/migration.h"
 #include "monitor/monitor.h"
 #include "buffered_file.h"
 #include "block/block.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 
 //#define DEBUG_MIGRATION_FD
 
diff --git a/migration-tcp.c b/migration-tcp.c
index a36e637ffdc7a461830c48f701f0fc9d041ff342..3c4c3150526a55bd7bc27d47fc2dd2696977f84a 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -14,7 +14,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "migration/migration.h"
 #include "buffered_file.h"
 #include "block/block.h"
diff --git a/migration-unix.c b/migration-unix.c
index 9debc952daeefd360608383754daf557f48a4b15..d5f986853fc371d1c7e481a84d18e618ffe4cae3 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -14,7 +14,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "migration/migration.h"
 #include "buffered_file.h"
 #include "block/block.h"
diff --git a/migration.c b/migration.c
index 0456983bad094aa6de9693de9e56cce8d70b95a9..8c5c5670d8b892c870a9db82e68b48a93429c3cb 100644
--- a/migration.c
+++ b/migration.c
@@ -19,7 +19,7 @@
 #include "buffered_file.h"
 #include "sysemu.h"
 #include "block/block.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "migration/block.h"
 #include "qmp-commands.h"
 
diff --git a/module.c b/module.c
index c3a6da7a86712cd141acfce06c08cabde80c2dbc..7acc33d076a613f103aba23dbb889be154a2f4d2 100644
--- a/module.c
+++ b/module.c
@@ -14,8 +14,8 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-queue.h"
-#include "module.h"
+#include "qemu/queue.h"
+#include "qemu/module.h"
 
 typedef struct ModuleEntry
 {
diff --git a/monitor.c b/monitor.c
index 46fdc008f46380b77795043f8c44a73f44f7d76a..878b2317af75df581e9a23540fe2548cb0e7b1b0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -43,10 +43,10 @@
 #include "audio/audio.h"
 #include "disas/disas.h"
 #include "balloon.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "migration/migration.h"
 #include "kvm.h"
-#include "acl.h"
+#include "qemu/acl.h"
 #include "qapi/qmp/qint.h"
 #include "qapi/qmp/qfloat.h"
 #include "qapi/qmp/qlist.h"
@@ -55,7 +55,7 @@
 #include "qapi/qmp/qjson.h"
 #include "qapi/qmp/json-streamer.h"
 #include "qapi/qmp/json-parser.h"
-#include "osdep.h"
+#include "qemu/osdep.h"
 #include "cpu.h"
 #include "trace.h"
 #include "trace/control.h"
@@ -66,7 +66,7 @@
 #include "exec/memory.h"
 #include "qmp-commands.h"
 #include "hmp.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 /* for pic/irq_info */
 #if defined(TARGET_SPARC)
diff --git a/nbd.c b/nbd.c
index 04ff0a1d44cf273a1920a5e614e94fbc517bb1a9..0698a023add158d36c9a0935848700790b05217b 100644
--- a/nbd.c
+++ b/nbd.c
@@ -36,8 +36,8 @@
 #include <linux/fs.h>
 #endif
 
-#include "qemu_socket.h"
-#include "qemu-queue.h"
+#include "qemu/sockets.h"
+#include "qemu/queue.h"
 
 //#define DEBUG_NBD
 
diff --git a/net/dump.c b/net/dump.c
index e0a5d74644e39e716390c436613f711b775f543b..41197217205092078fa5bd59e87df1469d450750 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -24,9 +24,9 @@
 
 #include "clients.h"
 #include "qemu-common.h"
-#include "qemu-error.h"
-#include "qemu-log.h"
-#include "qemu-timer.h"
+#include "qemu/error-report.h"
+#include "qemu/log.h"
+#include "qemu/timer.h"
 #include "hub.h"
 
 typedef struct DumpState {
diff --git a/net/hub.c b/net/hub.c
index 81a73b54a72e7db960ba05f3b04f07d709c73079..5adfce444beb4385af4ef2fede11eefee9a47500 100644
--- a/net/hub.c
+++ b/net/hub.c
@@ -16,7 +16,7 @@
 #include "net/net.h"
 #include "clients.h"
 #include "hub.h"
-#include "iov.h"
+#include "qemu/iov.h"
 
 /*
  * A hub broadcasts incoming packets to all its ports except the source port.
diff --git a/net/net.c b/net/net.c
index e4d85a9cfae015cfe99acd8ab8912ed17aced742..dbf3e1b0037de52a6ce99233b74af74fecc13396 100644
--- a/net/net.c
+++ b/net/net.c
@@ -31,11 +31,11 @@
 
 #include "monitor/monitor.h"
 #include "qemu-common.h"
-#include "qemu_socket.h"
-#include "qemu-config.h"
+#include "qemu/sockets.h"
+#include "qemu/config-file.h"
 #include "qmp-commands.h"
 #include "hw/qdev.h"
-#include "iov.h"
+#include "qemu/iov.h"
 #include "qapi-visit.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/dealloc-visitor.h"
diff --git a/net/queue.c b/net/queue.c
index 542c549b1ace4855420b94824b0adf7f1ab6f0f9..6eaf5b63c0138a99ea5b1ca78e28dd168b503265 100644
--- a/net/queue.c
+++ b/net/queue.c
@@ -22,7 +22,7 @@
  */
 
 #include "net/queue.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "net/net.h"
 
 /* The delivery handler may only return zero if it will call
diff --git a/net/slirp.c b/net/slirp.c
index c37a5ef959fdaca6f5846961d86263f065712efd..87bdc9d03100662e637d7ec4667676cde59b0324 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -33,7 +33,7 @@
 #include "clients.h"
 #include "hub.h"
 #include "monitor/monitor.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "slirp/libslirp.h"
 #include "qemu-char.h"
 
diff --git a/net/socket.c b/net/socket.c
index bc2b95183286aea8439c29d1e4fed5918cad14ce..396dc8c0b100ec1a81a2e30d004cfc7cab22e36b 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -27,10 +27,10 @@
 #include "clients.h"
 #include "monitor/monitor.h"
 #include "qemu-common.h"
-#include "qemu-error.h"
-#include "qemu-option.h"
-#include "qemu_socket.h"
-#include "iov.h"
+#include "qemu/error-report.h"
+#include "qemu/option.h"
+#include "qemu/sockets.h"
+#include "qemu/iov.h"
 
 typedef struct NetSocketState {
     NetClientState nc;
diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index a1c55ad3def3e746e8450754942383c425abbf74..b48182f678c5c8492356f235ecaa710d97bb7f9b 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -25,7 +25,7 @@
 #include "tap_int.h"
 #include "qemu-common.h"
 #include "sysemu.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 #ifdef __NetBSD__
 #include <sys/ioctl.h>
diff --git a/net/tap-linux.c b/net/tap-linux.c
index 3de7b3b6ce7af6abd4be8b973b68b78f48e3dfca..dd4b9152438a84a20435ddc910383e9f85cb4f6a 100644
--- a/net/tap-linux.c
+++ b/net/tap-linux.c
@@ -32,7 +32,7 @@
 
 #include "sysemu.h"
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 #define PATH_NET_TUN "/dev/net/tun"
 
diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index f228fffb6d2c0d238203c0775fa52923207ff677..3d5fee554239a2b132e210134a2a9d9be8466b2e 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -38,7 +38,7 @@
 #include <net/if.h>
 #include <syslog.h>
 #include <stropts.h>
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen)
 {
diff --git a/net/tap-win32.c b/net/tap-win32.c
index e37d8ee458c01e17d6aa54fee3f557f1365d9da5..1ddd6fa6e6a40dd7d778bd6dd1373d1c6b1d9c96 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -32,7 +32,7 @@
 #include "clients.h"            /* net_init_tap */
 #include "net/net.h"
 #include "sysemu.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include <stdio.h>
 #include <windows.h>
 #include <winioctl.h>
diff --git a/net/tap.c b/net/tap.c
index 9a677e9864d05949765faf5e32d404cb64f1d82d..d34ff1339828fb9d2ab988db24016d0578d76b81 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -38,7 +38,7 @@
 #include "monitor/monitor.h"
 #include "sysemu.h"
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 
 #include "net/tap.h"
 
diff --git a/net/vde.c b/net/vde.c
index 52d4f19fba16891c5295a79925de5d765ce7c12e..754a141543f35a249212515c2903883eb683241a 100644
--- a/net/vde.c
+++ b/net/vde.c
@@ -28,7 +28,7 @@
 #include "net/net.h"
 #include "clients.h"
 #include "qemu-common.h"
-#include "qemu-option.h"
+#include "qemu/option.h"
 
 typedef struct VDEState {
     NetClientState nc;
diff --git a/notify.c b/notify.c
index 12282a6745c5daba71d9caa8e0ac293ddb023809..7b7692acb2c84492d39ccecf2f2fb8cc2e6d5c46 100644
--- a/notify.c
+++ b/notify.c
@@ -14,7 +14,7 @@
  */
 
 #include "qemu-common.h"
-#include "notify.h"
+#include "qemu/notify.h"
 
 void notifier_list_init(NotifierList *list)
 {
diff --git a/osdep.c b/osdep.c
index 807e90cf973f630235d5c462d33e4e81cff08bb8..5b51a0322e5bedadd82e9d0a0f64c004330d8ae9 100644
--- a/osdep.c
+++ b/osdep.c
@@ -47,7 +47,7 @@ extern int madvise(caddr_t, size_t, int);
 
 #include "qemu-common.h"
 #include "trace.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "monitor/monitor.h"
 
 static bool fips_enabled = false;
diff --git a/oslib-posix.c b/oslib-posix.c
index 9db9c3d8af1ab242cd4b93f2c9b2e48893f468f5..a737d6e0e33aa71498ae038b6ac7b792402bcc5f 100644
--- a/oslib-posix.c
+++ b/oslib-posix.c
@@ -51,7 +51,7 @@ extern int daemon(int, int);
 #include "config-host.h"
 #include "sysemu.h"
 #include "trace.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 
 #if defined(CONFIG_VALGRIND)
 static int running_on_valgrind = -1;
diff --git a/oslib-win32.c b/oslib-win32.c
index 51b33e8b2017bd1f5db2105b590cc8e1058022b5..7f0dd07e5f1889f8ac17c912677f12eb4088ec99 100644
--- a/oslib-win32.c
+++ b/oslib-win32.c
@@ -28,9 +28,9 @@
 #include <windows.h>
 #include "config-host.h"
 #include "sysemu.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 #include "trace.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 
 void *qemu_oom_check(void *ptr)
 {
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index f8149ce455f600993656f6b6cc0984d241bb4624..174bd8bdb085f03a530d8fa8d1cd95dfc27bcd6f 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -13,8 +13,8 @@
 #include "qemu-common.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/opts-visitor.h"
-#include "qemu-queue.h"
-#include "qemu-option-internal.h"
+#include "qemu/queue.h"
+#include "qemu/option_int.h"
 #include "qapi/visitor-impl.h"
 
 
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index 98f2a58efd2610e81a96c78ae2e854cb81fbfb7e..1334de33cc690057ffc80f766f604dd3f4e8e98c 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -12,7 +12,7 @@
  */
 
 #include "qapi/dealloc-visitor.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "qemu-common.h"
 #include "qapi/qmp/types.h"
 #include "qapi/visitor-impl.h"
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c
index 808790903691275a574764771cb4e1dda1da9101..67fb127050ac6379d8ae2d605f5256263487e36d 100644
--- a/qapi/qmp-input-visitor.c
+++ b/qapi/qmp-input-visitor.c
@@ -13,7 +13,7 @@
 
 #include "qapi/qmp-input-visitor.h"
 #include "qapi/visitor-impl.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "qemu-common.h"
 #include "qapi/qmp/types.h"
 #include "qapi/qmp/qerror.h"
diff --git a/qapi/qmp-output-visitor.c b/qapi/qmp-output-visitor.c
index 8015e3f88d5bef1327b504f3f1a41b916b6306b8..74a5684ed3d42a090763ba07b534c03ae57ecd4f 100644
--- a/qapi/qmp-output-visitor.c
+++ b/qapi/qmp-output-visitor.c
@@ -13,7 +13,7 @@
 
 #include "qapi/qmp-output-visitor.h"
 #include "qapi/visitor-impl.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "qemu-common.h"
 #include "qapi/qmp/types.h"
 #include "qapi/qmp/qerror.h"
diff --git a/qdict.c b/qdict.c
index fa7a62cff442766cf36742b5e21f77e9efa800fb..7543ccc10ff8d9d3343b157c1f2b3dac77546007 100644
--- a/qdict.c
+++ b/qdict.c
@@ -16,7 +16,7 @@
 #include "qapi/qmp/qbool.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qobject.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "qemu-common.h"
 
 static void qdict_destroy_obj(QObject *obj);
diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c
index 652eec99fd5c8378d99fd48c2f5930136f8b714a..287bfd5e38c11f6ccef868efd71b7d0c64ecc220 100644
--- a/qemu-bridge-helper.c
+++ b/qemu-bridge-helper.c
@@ -39,7 +39,7 @@
 #include <linux/if_bridge.h>
 #endif
 
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 
 #include "net/tap-linux.h"
 
diff --git a/qemu-char.c b/qemu-char.c
index 16021c5a4355b6b040fe0c6a4c48e1869b968772..5a8d8f75a4e19d57cb1a46680be23b3afe570a2b 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -25,7 +25,7 @@
 #include "monitor/monitor.h"
 #include "ui/console.h"
 #include "sysemu.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-char.h"
 #include "hw/usb.h"
 #include "hw/baum.h"
@@ -94,7 +94,7 @@
 #endif
 #endif
 
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "ui/qemu-spice.h"
 
 #define READ_BUF_LEN 4096
diff --git a/qemu-char.h b/qemu-char.h
index 5ff1b2ba9162a8cb7e7749d354715c7cec59c167..baa5d035fddadfa2fbc2a6787a98da30ae9000e9 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -2,13 +2,13 @@
 #define QEMU_CHAR_H
 
 #include "qemu-common.h"
-#include "qemu-queue.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/queue.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "block/aio.h"
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qstring.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 /* character device */
 
diff --git a/qemu-common.h b/qemu-common.h
index e67478607bd049560f407b8e8721ac518d0b699b..40cd198fc13d56d31b83abdc94939b808b45398f 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -12,9 +12,9 @@
 #ifndef QEMU_COMMON_H
 #define QEMU_COMMON_H
 
-#include "compiler.h"
+#include "qemu/compiler.h"
 #include "config-host.h"
-#include "qemu-types.h"
+#include "qemu/typedefs.h"
 
 #if defined(__arm__) || defined(__sparc__) || defined(__mips__) || defined(__hppa__) || defined(__ia64__)
 #define WORDS_ALIGNED
@@ -122,8 +122,8 @@ extern int use_icount;
 /* FIXME: Remove NEED_CPU_H.  */
 #ifndef NEED_CPU_H
 
-#include "osdep.h"
-#include "bswap.h"
+#include "qemu/osdep.h"
+#include "qemu/bswap.h"
 
 #else
 
@@ -408,7 +408,7 @@ static inline bool is_power_of_2(uint64_t value)
 /* round down to the nearest power of 2*/
 int64_t pow2floor(int64_t value);
 
-#include "module.h"
+#include "qemu/module.h"
 
 /*
  * Implementation of ULEB128 (http://en.wikipedia.org/wiki/LEB128)
diff --git a/qemu-config.c b/qemu-config.c
index ceec6bd1551d9e7cae07dfc8756a7be253252692..2188c3e5ec56b458c0a556d51d3ddbda8eaf23dd 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -1,7 +1,7 @@
 #include "qemu-common.h"
-#include "qemu-error.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/error-report.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "hw/qdev.h"
 #include "qapi/error.h"
 
diff --git a/qemu-coroutine-io.c b/qemu-coroutine-io.c
index 5fae9c7d47207555b4831e8a884d787d1373602a..e8ad1a40110e136e64a92ec1a58c0aca49cf851c 100644
--- a/qemu-coroutine-io.c
+++ b/qemu-coroutine-io.c
@@ -23,9 +23,9 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "block/coroutine.h"
-#include "iov.h"
+#include "qemu/iov.h"
 
 ssize_t coroutine_fn
 qemu_co_sendv_recvv(int sockfd, struct iovec *iov, unsigned iov_cnt,
diff --git a/qemu-coroutine-lock.c b/qemu-coroutine-lock.c
index c3939ac6efc7189320ba38183d12776fc4766dae..97ef01c796339bfda4d195dbc36336af61b4857d 100644
--- a/qemu-coroutine-lock.c
+++ b/qemu-coroutine-lock.c
@@ -25,7 +25,7 @@
 #include "qemu-common.h"
 #include "block/coroutine.h"
 #include "block/coroutine_int.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "block/aio.h"
 #include "trace.h"
 
diff --git a/qemu-coroutine-sleep.c b/qemu-coroutine-sleep.c
index 26e6dac2eba470df3188bc1ec57667ae4dda33bf..169ce5ccc921e9ec9705b1e8409da0fba9fbff20 100644
--- a/qemu-coroutine-sleep.c
+++ b/qemu-coroutine-sleep.c
@@ -12,7 +12,7 @@
  */
 
 #include "block/coroutine.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 typedef struct CoSleepCB {
     QEMUTimer *ts;
diff --git a/qemu-img.c b/qemu-img.c
index 2e5ca5c96459dfc91dd7ae78e495b62419ce8226..4c8e2f3849829a73d40d0b67e9ffc84c40df1c05 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -25,9 +25,9 @@
 #include "qapi/qmp-output-visitor.h"
 #include "qapi/qmp/qjson.h"
 #include "qemu-common.h"
-#include "qemu-option.h"
-#include "qemu-error.h"
-#include "osdep.h"
+#include "qemu/option.h"
+#include "qemu/error-report.h"
+#include "qemu/osdep.h"
 #include "sysemu.h"
 #include "block/block_int.h"
 #include <getopt.h>
diff --git a/qemu-io.c b/qemu-io.c
index e0e47423d71b10636de095287e8e5b849af6a718..61880932b3ea008fd7bb4398a6eaa2a1465f3ae7 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -15,7 +15,7 @@
 #include <libgen.h>
 
 #include "qemu-common.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 #include "block/block_int.h"
 #include "cmd.h"
 #include "trace/control.h"
diff --git a/qemu-log.c b/qemu-log.c
index a4c3d1f2e37f7ae23722d0acaeac690e9e48323c..b655b305eab9ba907a7622be2ccbcb16944a15ea 100644
--- a/qemu-log.c
+++ b/qemu-log.c
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #ifdef WIN32
 static const char *logfilename = "qemu.log";
diff --git a/qemu-option.c b/qemu-option.c
index ebd35370637735af195e6880951f925839a3eab7..f532b765a0bc53194fe9c7f27a1c730f8d794fb6 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -27,11 +27,11 @@
 #include <string.h>
 
 #include "qemu-common.h"
-#include "qemu-error.h"
+#include "qemu/error-report.h"
 #include "qapi/qmp/types.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
-#include "qemu-option-internal.h"
+#include "qemu/option_int.h"
 
 /*
  * Extracts the name of an option from the parameter string (p points at the
diff --git a/qemu-progress.c b/qemu-progress.c
index 5f1b8dfb97a80166598f18b1a1a1cf4390b5a62c..08d67949a1fcaf5be4ff3902fc3c078392ac1efa 100644
--- a/qemu-progress.c
+++ b/qemu-progress.c
@@ -23,7 +23,7 @@
  */
 
 #include "qemu-common.h"
-#include "osdep.h"
+#include "qemu/osdep.h"
 #include "sysemu.h"
 #include <stdio.h>
 
diff --git a/qemu-seccomp.h b/qemu-seccomp.h
index b2fc3f8c3c4256863adc7b6a087b875a2885ba61..1189fa241da89a5281a697a7345520cc74a1836d 100644
--- a/qemu-seccomp.h
+++ b/qemu-seccomp.h
@@ -16,7 +16,7 @@
 #define QEMU_SECCOMP_H
 
 #include <seccomp.h>
-#include "osdep.h"
+#include "qemu/osdep.h"
 
 int seccomp_start(void);
 #endif
diff --git a/qemu-sockets.c b/qemu-sockets.c
index cea0a4b8ac9bc16a53da92428a454e1b0e27f914..3537bf3d451e692580873ba1b0a8ca6c1df00925 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -23,9 +23,9 @@
 #include <unistd.h>
 
 #include "monitor/monitor.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "qemu-common.h" /* for qemu_isdigit */
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 #ifndef AI_ADDRCONFIG
 # define AI_ADDRCONFIG 0
diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c
index 4ef9c7b3f83469c87d09b66751ceb2e67e7877e1..7be292ed681ec66e10413a8b17d4c89d94064cf6 100644
--- a/qemu-thread-posix.c
+++ b/qemu-thread-posix.c
@@ -20,7 +20,7 @@
 #include <limits.h>
 #include <unistd.h>
 #include <sys/time.h>
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 
 static void error_exit(int err, const char *msg)
 {
diff --git a/qemu-thread-win32.c b/qemu-thread-win32.c
index 4b3db60f5cd2f4661c0c410dce527cd409d13374..8037b390455f9c31629cbcbcc5122347e0d529d8 100644
--- a/qemu-thread-win32.c
+++ b/qemu-thread-win32.c
@@ -11,7 +11,7 @@
  *
  */
 #include "qemu-common.h"
-#include "qemu-thread.h"
+#include "qemu/thread.h"
 #include <process.h>
 #include <assert.h>
 #include <limits.h>
diff --git a/qemu-timer-common.c b/qemu-timer-common.c
index 755e300bc9f1e7a066f85b35c3b2cde60f5b1bcd..16f5e758b21f642b02273f41735c147a83561b75 100644
--- a/qemu-timer-common.c
+++ b/qemu-timer-common.c
@@ -21,7 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 /***********************************************************/
 /* real time host monotonic timer */
diff --git a/qemu-timer.c b/qemu-timer.c
index 8e0dccc087d800e16bc2684c2f246e06eda9361b..80b3f2eb31a614ef74b0d689ac6ea984da00eb49 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -28,7 +28,7 @@
 
 #include "hw/hw.h"
 
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #ifdef CONFIG_POSIX
 #include <pthread.h>
 #endif
@@ -477,7 +477,7 @@ static void host_alarm_handler(int host_signum)
 
 #if defined(__linux__)
 
-#include "compatfd.h"
+#include "qemu/compatfd.h"
 
 static int dynticks_start_timer(struct qemu_alarm_timer *t)
 {
diff --git a/qemu-tool.c b/qemu-tool.c
index d1f46222eea7ea5ce8cbc03cee413d6f0ed50f2a..8ac45ff39bfd149df145dfc99630a2c38c898536 100644
--- a/qemu-tool.c
+++ b/qemu-tool.c
@@ -15,12 +15,12 @@
 
 #include "qemu-common.h"
 #include "monitor/monitor.h"
-#include "qemu-timer.h"
-#include "qemu-log.h"
+#include "qemu/timer.h"
+#include "qemu/log.h"
 #include "migration/migration.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 #include "sysemu.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "slirp/libslirp.h"
 
 #include <sys/time.h>
diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index 769a559456faab5c5d7e5c895c355dcc9bc139a5..d4fd628907ce2e050b2ea9d4e1b51ffef27c855d 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -4,8 +4,8 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdlib.h>
-#include "osdep.h"
-#include "qemu_socket.h"
+#include "qemu/osdep.h"
+#include "qemu/sockets.h"
 #include "qga/channel.h"
 
 #ifdef CONFIG_SOLARIS
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index cedf2ccf288a27d6738c9fd46eef33fa993364a4..a657201e7a9947222ff76bcf7d0c63daaff7873f 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -18,8 +18,8 @@
 #include "qga/guest-agent-core.h"
 #include "qga-qmp-commands.h"
 #include "qapi/qmp/qerror.h"
-#include "qemu-queue.h"
-#include "host-utils.h"
+#include "qemu/queue.h"
+#include "qemu/host-utils.h"
 
 #ifndef CONFIG_HAS_ENVIRON
 #ifdef __APPLE__
diff --git a/qga/main.c b/qga/main.c
index ead58cc11fd772ed3d42c44349996409c63119ba..ba5fa1c7787170fb74496920cd0fecb335a30dcd 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -25,7 +25,7 @@
 #include "qapi/qmp/qint.h"
 #include "qapi/qmp/qjson.h"
 #include "qga/guest-agent-core.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "signal.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/dispatch.h"
diff --git a/qlist.c b/qlist.c
index c5ac2115af4ae974183301b83a17dbbce67ec32c..1ced0de58e21467327aeb94223e4ee67bd114d1e 100644
--- a/qlist.c
+++ b/qlist.c
@@ -12,7 +12,7 @@
 
 #include "qapi/qmp/qlist.h"
 #include "qapi/qmp/qobject.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "qemu-common.h"
 
 static void qlist_destroy_obj(QObject *obj);
diff --git a/qom/container.c b/qom/container.c
index ceb0f0186d20fcb03c36a1b60c83be1d99f2405a..5270a5ee9cbdeab93412e876297e0813c763d41f 100644
--- a/qom/container.c
+++ b/qom/container.c
@@ -11,7 +11,7 @@
  */
 
 #include "qom/object.h"
-#include "module.h"
+#include "qemu/module.h"
 #include <assert.h>
 
 static TypeInfo container_info = {
diff --git a/savevm.c b/savevm.c
index a5205a09c3a437f75fdab5f4ee367821f7d4182e..ea01e9baf6e2ae10e2fb6a7e323ca34dcd9a5e71 100644
--- a/savevm.c
+++ b/savevm.c
@@ -75,17 +75,17 @@
 #include "net/net.h"
 #include "monitor/monitor.h"
 #include "sysemu.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "audio/audio.h"
 #include "migration/migration.h"
-#include "qemu_socket.h"
-#include "qemu-queue.h"
-#include "qemu-timer.h"
+#include "qemu/sockets.h"
+#include "qemu/queue.h"
+#include "qemu/timer.h"
 #include "cpus.h"
 #include "exec/memory.h"
 #include "qmp-commands.h"
 #include "trace.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
 
 #define SELF_ANNOUNCE_ROUNDS 5
 
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index eccc28daee8393c0bf96c9de4b550f9850634c21..e06332bd55262e4477dbaca87690bfd1311e6b57 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -367,7 +367,7 @@ def gen_command_def_prologue(prefix="", proxy=False):
  */
 
 #include "qemu-common.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/types.h"
 #include "qapi/qmp/dispatch.h"
diff --git a/slirp/if.c b/slirp/if.c
index 533295dd075c1bd9f07b8dedcb9768dc5420c190..dcd5fafe5d27cf5128c6c8b92162ee6d2b527ebe 100644
--- a/slirp/if.c
+++ b/slirp/if.c
@@ -6,7 +6,7 @@
  */
 
 #include <slirp.h>
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 static void
 ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead)
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
index 6f4cff8fdd4a57ab41760fa5e5b2bee820bae5a0..880bdfd3ccf43dcdabf324cb72a7545a79c4364e 100644
--- a/slirp/ip_input.c
+++ b/slirp/ip_input.c
@@ -39,7 +39,7 @@
  */
 
 #include <slirp.h>
-#include <osdep.h>
+#include <qemu/osdep.h>
 #include "ip_icmp.h"
 
 static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp);
diff --git a/slirp/sbuf.c b/slirp/sbuf.c
index 637f8fea3d16b831dd884540c41a029ad0f8c5a4..08ec2b4f44d0db2d0894cc6176a0923b5424a8ad 100644
--- a/slirp/sbuf.c
+++ b/slirp/sbuf.c
@@ -6,7 +6,7 @@
  */
 
 #include <slirp.h>
-#include <main-loop.h>
+#include <qemu/main-loop.h>
 
 static void sbappendsb(struct sbuf *sb, struct mbuf *m);
 
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 3395d509a2b6a32d33347de3ee3510d60a8b7b50..4b51a67e7de51aa7fb916d0eb4bbde78efe4fd03 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-char.h"
 #include "slirp.h"
 #include "hw/hw.h"
diff --git a/slirp/slirp.h b/slirp/slirp.h
index 0107b07e660b9c4fa42bbdc086e4d63f3bef1398..dfc3e3a2b869ed8c0e40111b3e1b493c2443c619 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -133,8 +133,8 @@ void free(void *ptr);
 
 #include "debug.h"
 
-#include "qemu-queue.h"
-#include "qemu_socket.h"
+#include "qemu/queue.h"
+#include "qemu/sockets.h"
 
 #include "libslirp.h"
 #include "ip.h"
diff --git a/spice-qemu-char.c b/spice-qemu-char.c
index 5f95c937f3368dd900ebb1417a67aa55f0552c62..41b1657ccd70bf1760db8b16aaad576c24332e8b 100644
--- a/spice-qemu-char.c
+++ b/spice-qemu-char.c
@@ -5,7 +5,7 @@
 #include <spice.h>
 #include <spice-experimental.h>
 
-#include "osdep.h"
+#include "qemu/osdep.h"
 
 #define dprintf(_scd, _level, _fmt, ...)                                \
     do {                                                                \
diff --git a/stubs/fd-register.c b/stubs/fd-register.c
index 813b6dd7c06f0b9cca38789f772079640c25b248..d0c34fd2a3cb78f6124cca6c0696f59fe65239ae 100644
--- a/stubs/fd-register.c
+++ b/stubs/fd-register.c
@@ -1,5 +1,5 @@
 #include "qemu-common.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 void qemu_fd_register(int fd)
 {
diff --git a/stubs/set-fd-handler.c b/stubs/set-fd-handler.c
index 4807b5dc225f4b167124b4ffb6fae653621c46c2..fc874d33fe71b1a3d2c87b0acfe6ae732f76e51c 100644
--- a/stubs/set-fd-handler.c
+++ b/stubs/set-fd-handler.c
@@ -1,5 +1,5 @@
 #include "qemu-common.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 
 int qemu_set_fd_handler2(int fd,
                          IOCanReadHandler *fd_read_poll,
diff --git a/sysemu.h b/sysemu.h
index 1b6add2dc332c7181b2ad312a2635d8fa1a1e791..8eaa4707a0fff9ddc06470ceb0779ffdafef9af9 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -2,13 +2,13 @@
 #define SYSEMU_H
 /* Misc. things related to the system emulator.  */
 
-#include "qemu-types.h"
-#include "qemu-option.h"
-#include "qemu-queue.h"
-#include "qemu-timer.h"
+#include "qemu/typedefs.h"
+#include "qemu/option.h"
+#include "qemu/queue.h"
+#include "qemu/timer.h"
 #include "qapi-types.h"
-#include "notify.h"
-#include "main-loop.h"
+#include "qemu/notify.h"
+#include "qemu/main-loop.h"
 
 /* vl.c */
 
diff --git a/target-alpha/int_helper.c b/target-alpha/int_helper.c
index 1d832f0b57698f2bcf2d57e64a3f8c2ed2d1d444..c9b42b6ed4239e65a39fdcf99c8bdf80abf3eaaf 100644
--- a/target-alpha/int_helper.c
+++ b/target-alpha/int_helper.c
@@ -19,7 +19,7 @@
 
 #include "cpu.h"
 #include "helper.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 
 uint64_t helper_umulh(uint64_t op1, uint64_t op2)
diff --git a/target-alpha/sys_helper.c b/target-alpha/sys_helper.c
index 40ca49c8837b514a1bed53c0d037965877464703..2bc2b028156011c10f7ecc4f303b2c4eb6e8270c 100644
--- a/target-alpha/sys_helper.c
+++ b/target-alpha/sys_helper.c
@@ -20,7 +20,7 @@
 #include "cpu.h"
 #include "helper.h"
 #include "sysemu.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 
 uint64_t helper_load_pcc(CPUAlphaState *env)
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 2d0d891128e00fe4885f615c2b0b0123efd94d93..c94126737f1e9457e583bf5ff56c970fb3282b3b 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -19,7 +19,7 @@
 
 #include "cpu.h"
 #include "disas/disas.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "tcg-op.h"
 
 #include "helper.h"
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 1f7a3c04c3924465c9625dfdc671e6680352f175..eef2acd18a1294ee7f8fe3b2392503d7ec56fa65 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1,9 +1,9 @@
 #include "cpu.h"
 #include "exec/gdbstub.h"
 #include "helper.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "sysemu.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
 
 #ifndef CONFIG_USER_ONLY
 static inline int get_phys_addr(CPUARMState *env, uint32_t address,
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 988b5428d4f0f5f5ffb56d5435d7b93d30283567..724e00f7cf278f8a130c3df0682318374aaeee44 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -27,7 +27,7 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg-op.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #include "helper.h"
 #define GEN_HELPER 1
diff --git a/target-cris/helper.c b/target-cris/helper.c
index 324fe052f57ab2568467ac1446b57af4d2c6cb96..8407a6d880f06c5187e15a4f2174718d48d5211b 100644
--- a/target-cris/helper.c
+++ b/target-cris/helper.c
@@ -20,7 +20,7 @@
 
 #include "cpu.h"
 #include "mmu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 
 //#define CRIS_HELPER_DEBUG
diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c
index cd0e17e099878752c4a661e1e3f69de5bd866338..79bff386633ab9c56dea1a01a91dfd81a22effb4 100644
--- a/target-cris/op_helper.c
+++ b/target-cris/op_helper.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "mmu.h"
 #include "helper.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 //#define CRIS_OP_HELPER_DEBUG
 
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 150c4dfb0cd60b646c9e82b8bbbf601f1d8f4782..8abc5561e9d908ef64acffd74f6015e0ffa2fbf3 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -24,8 +24,8 @@
 #include "cpu.h"
 #include "kvm.h"
 
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "qapi/qmp/qerror.h"
 
 #include "qapi/visitor.h"
diff --git a/target-i386/excp_helper.c b/target-i386/excp_helper.c
index aaa5ca20907f462088906923df9191dd54606dbb..64c8346d3b12442f128a3b419e4765fffc6ecfe3 100644
--- a/target-i386/excp_helper.c
+++ b/target-i386/excp_helper.c
@@ -18,7 +18,7 @@
  */
 
 #include "cpu.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "sysemu.h"
 #include "helper.h"
 
diff --git a/target-i386/int_helper.c b/target-i386/int_helper.c
index f39747e806bad2f419e1cdf77fba13cfdfb2743f..84b812dccac3960b9c62de12ffa78cc13ef27ca0 100644
--- a/target-i386/int_helper.c
+++ b/target-i386/int_helper.c
@@ -18,7 +18,7 @@
  */
 
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "helper.h"
 
 //#define DEBUG_MULDIV
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index f7c95d54247847b953d0f7ae836dc02a547a95d9..340ed3f33e5519d8076f4cd83ab4779962f64402 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -26,8 +26,8 @@
 #include "kvm_i386.h"
 #include "cpu.h"
 #include "exec/gdbstub.h"
-#include "host-utils.h"
-#include "qemu-config.h"
+#include "qemu/host-utils.h"
+#include "qemu/config-file.h"
 #include "hw/pc.h"
 #include "hw/apic.h"
 #include "exec/ioport.h"
diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c
index be795d71eb3a2f8e596dc13f0b3fa4a87f013816..c2a99ee9bc63d7936aaa58aefbb790928fef91b1 100644
--- a/target-i386/seg_helper.c
+++ b/target-i386/seg_helper.c
@@ -19,7 +19,7 @@
  */
 
 #include "cpu.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "helper.h"
 
 //#define DEBUG_PCALL
diff --git a/target-lm32/helper.c b/target-lm32/helper.c
index 0ed7cfda187073cc7d9ae5d7bc1d4b7063f596ee..d76ea3fe096a595da27aff0f447375a8355e0b6c 100644
--- a/target-lm32/helper.c
+++ b/target-lm32/helper.c
@@ -18,7 +18,7 @@
  */
 
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 int cpu_lm32_handle_mmu_fault(CPULM32State *env, target_ulong address, int rw,
                               int mmu_idx)
diff --git a/target-lm32/op_helper.c b/target-lm32/op_helper.c
index 27b3cef25c205e6d2db3ebd225727b88cfb5aba5..53410b176eb217caf246851d96abc425caaaf64f 100644
--- a/target-lm32/op_helper.c
+++ b/target-lm32/op_helper.c
@@ -1,7 +1,7 @@
 #include <assert.h>
 #include "cpu.h"
 #include "helper.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #include "hw/lm32_pic.h"
 #include "hw/lm32_juart.h"
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 1c9b5ec8d4cac469dbf750fc085addb06466e086..e763195f8673babf66642a1b997393e476bc2085 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg-op.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #include "helpers.h"
 #define GEN_HELPER 1
diff --git a/target-microblaze/helper.c b/target-microblaze/helper.c
index 530e0b5fb0fb698b2d8063fca27bcc08b692554c..97aedc52bbbbe7b54f941975b3c092d809aedafb 100644
--- a/target-microblaze/helper.c
+++ b/target-microblaze/helper.c
@@ -19,7 +19,7 @@
  */
 
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #define D(x)
 #define DMMU(x)
diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c
index 343dcc15e7b72aad47ca5060e71b953f4dac174a..1c62f3c68ff5591a55065779be0d5fd127c781c4 100644
--- a/target-microblaze/op_helper.c
+++ b/target-microblaze/op_helper.c
@@ -21,7 +21,7 @@
 #include <assert.h>
 #include "cpu.h"
 #include "helper.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #define D(x)
 
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 157f59e6bf0014903cdbe4000d22deb1b4186227..e85edce6faa8c99e7a30e8e76c7548ec6877f7c8 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -18,7 +18,7 @@
  */
 #include <stdlib.h>
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #include "helper.h"
 
diff --git a/target-openrisc/int_helper.c b/target-openrisc/int_helper.c
index 2fdfd27712c4c4cba28dd50236bbd229a5b4e984..20f9837e6a1988bc4eb0a694306f1ee6913bb757 100644
--- a/target-openrisc/int_helper.c
+++ b/target-openrisc/int_helper.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "helper.h"
 #include "exception.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 target_ulong HELPER(ff1)(target_ulong x)
 {
diff --git a/target-openrisc/interrupt.c b/target-openrisc/interrupt.c
index 226ce435132ae2831587aea07636b35010fc9f0c..7f2c025da24c5514eda539dc7b796f915f8bd3ca 100644
--- a/target-openrisc/interrupt.c
+++ b/target-openrisc/interrupt.c
@@ -20,7 +20,7 @@
 #include "cpu.h"
 #include "qemu-common.h"
 #include "exec/gdbstub.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/loader.h"
 #endif
diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c
index 4eee44434f6b21bf7e153f170c79fafc42c30f34..836465259ad7a1fbceafd16ab6f5e7e4c4fa642e 100644
--- a/target-openrisc/mmu.c
+++ b/target-openrisc/mmu.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "qemu-common.h"
 #include "exec/gdbstub.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/loader.h"
 #endif
diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
index 5883347fa73da2193b19cf39d557ae6ecabee2ea..1e1b30cdcb1ff7c2fc220546699c1c18f3fadff0 100644
--- a/target-openrisc/translate.c
+++ b/target-openrisc/translate.c
@@ -23,9 +23,9 @@
 #include "disas/disas.h"
 #include "tcg-op.h"
 #include "qemu-common.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "config.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
 
 #include "helper.h"
 #define GEN_HELPER 1
diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
index f39b4f682adb50251b912e9885bf786701744ef3..783079d995d861c2d03c0e4f3dc6d328fd22f667 100644
--- a/target-ppc/int_helper.c
+++ b/target-ppc/int_helper.c
@@ -17,7 +17,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "helper.h"
 
 #include "helper_regs.h"
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 3f5df5772fab9d624ece9d5e00a3b381ab643af3..2546c577f6b311edca3702da9152d4561ce2c0fb 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -23,7 +23,7 @@
 #include <linux/kvm.h>
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "kvm.h"
 #include "kvm_ppc.h"
diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c
index a2e49cd423591faae1851ab944b9a1d4c4c5c157..2de59fd43bc276593c9f88ee972e78dcc8ee6d68 100644
--- a/target-ppc/kvm_ppc.c
+++ b/target-ppc/kvm_ppc.c
@@ -12,7 +12,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "kvm_ppc.h"
 #include "device_tree.h"
 
diff --git a/target-ppc/mem_helper.c b/target-ppc/mem_helper.c
index 2d7a349c32012d78472f6a353ac576e4b3c1cae9..902b1cd823104ff3450b0486af59de36e71e2e49 100644
--- a/target-ppc/mem_helper.c
+++ b/target-ppc/mem_helper.c
@@ -17,7 +17,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "helper.h"
 
 #include "helper_regs.h"
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index a74d76b5a630e269b6ff8c6a195dee093db27d2e..798b7acfc9019f50c6370c406a3f8b7f2bad7128 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg-op.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #include "helper.h"
 #define GEN_HELPER 1
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 619b202b92cd0033446635a62fdf4bd4221d0731..249f063d9456ce7c52f718a3be9be80143f4be06 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -22,7 +22,7 @@
 
 #include "cpu.h"
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 
 /* CPUClass::reset() */
diff --git a/target-s390x/helper.c b/target-s390x/helper.c
index 6e9b20971309b0eb1861f895c0afb1f047170085..8e135457a3f547624ffc2f4d058f9f8b3ebc7486 100644
--- a/target-s390x/helper.c
+++ b/target-s390x/helper.c
@@ -20,7 +20,7 @@
 
 #include "cpu.h"
 #include "exec/gdbstub.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #ifndef CONFIG_USER_ONLY
 #include "sysemu.h"
 #endif
diff --git a/target-s390x/int_helper.c b/target-s390x/int_helper.c
index f202a7e1daf6540035a66af8cf460737dfa43bb3..b683709860440bfe3735d66cc003347f9b8101a8 100644
--- a/target-s390x/int_helper.c
+++ b/target-s390x/int_helper.c
@@ -19,7 +19,7 @@
  */
 
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "helper.h"
 
 /* #define DEBUG_HELPER */
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 94de7642645c0696936d377624a44d1f8439309f..dc7069991938b4c681c5784fcc98b0f648abf09f 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -25,7 +25,7 @@
 #include <asm/ptrace.h>
 
 #include "qemu-common.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "sysemu.h"
 #include "kvm.h"
 #include "cpu.h"
diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c
index a3336e16b071b6cfe1d5f2b3d3b37a583e0cb2d2..2e73d30756d82157c2cf09dfee70fc16901ba64d 100644
--- a/target-s390x/misc_helper.c
+++ b/target-s390x/misc_helper.c
@@ -20,11 +20,11 @@
 
 #include "cpu.h"
 #include "exec/memory.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "helper.h"
 #include <string.h>
 #include "kvm.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #ifdef CONFIG_KVM
 #include <linux/kvm.h>
 #endif
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 28e61c54b8368b3ff0489ea847ee553cb9d5eabd..9e34741311a1f896b7ead44eed53af80a6024f38 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -32,7 +32,7 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg-op.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 /* global register indexes */
 static TCGv_ptr cpu_env;
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 0ed511a399e803f7aab8494aa61ceab76310ab9d..04b6659909b917cfc9f7be910eac41ec1b1728ed 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -3,7 +3,7 @@
 
 #include "config.h"
 #include "qemu-common.h"
-#include "bswap.h"
+#include "qemu/bswap.h"
 
 #if !defined(TARGET_SPARC64)
 #define TARGET_LONG_BITS 32
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index 3c8e865eef1f7f03de7e90549c7c2043eb87608b..e0d78f385283940145ec5a4063909eb6b794c91b 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -18,7 +18,7 @@
  */
 
 #include "cpu.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "helper.h"
 #include "sysemu.h"
 
diff --git a/target-sparc/machine.c b/target-sparc/machine.c
index eb4d87f1589c137d9f43ed2b09666ddf0ae52fb2..a353dabdd968a0282af42aabb457c53d490b4a7c 100644
--- a/target-sparc/machine.c
+++ b/target-sparc/machine.c
@@ -1,6 +1,6 @@
 #include "hw/hw.h"
 #include "hw/boards.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 
 #include "cpu.h"
 
diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c
index 2adbd1675dc893e0201ea767bbacc9fd85399a88..ff4f6284044a4fbba2bc4c9a00bc224784a27a83 100644
--- a/target-unicore32/helper.c
+++ b/target-unicore32/helper.c
@@ -12,7 +12,7 @@
 #include "cpu.h"
 #include "exec/gdbstub.h"
 #include "helper.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #include "ui/console.h"
 
 #undef DEBUG_UC32
diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c
index 218e95eaca964cbc288b5fa66e4107f1896d1354..f4498bcb146c6ce477f7826c1d0111cf1f870665 100644
--- a/target-unicore32/translate.c
+++ b/target-unicore32/translate.c
@@ -17,7 +17,7 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg-op.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 #include "helper.h"
 #define GEN_HELPER 1
diff --git a/target-xtensa/core-dc232b.c b/target-xtensa/core-dc232b.c
index d1a594cda220cb3770a852b124ad6d0cfdcc9c0a..0bfcf2414cb9637e52d9d76e839787110d16ae8d 100644
--- a/target-xtensa/core-dc232b.c
+++ b/target-xtensa/core-dc232b.c
@@ -28,7 +28,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #include "core-dc232b/core-isa.h"
 #include "overlay_tool.h"
diff --git a/target-xtensa/core-dc233c.c b/target-xtensa/core-dc233c.c
index ead6b3b128902860fff3cf883b2448f298de41c9..11acbf35809afee7a6920be0910f9d3b0a831d4d 100644
--- a/target-xtensa/core-dc233c.c
+++ b/target-xtensa/core-dc233c.c
@@ -29,7 +29,7 @@
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu-common.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #include "core-dc233c/core-isa.h"
 #include "overlay_tool.h"
diff --git a/target-xtensa/core-fsf.c b/target-xtensa/core-fsf.c
index a387aeeca5fd2fa86dbfa67460e2b3a425979d30..d4660edde9162873d7a4c60c383d04b06574ed21 100644
--- a/target-xtensa/core-fsf.c
+++ b/target-xtensa/core-fsf.c
@@ -28,7 +28,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 #include "core-fsf/core-isa.h"
 #include "overlay_tool.h"
diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c
index 3d7a3990084897842778e55ea43d4b6dc9d25b8f..94c03a1d3c06c16a6684e6a6cba4f39d67e4ae3b 100644
--- a/target-xtensa/helper.c
+++ b/target-xtensa/helper.c
@@ -28,7 +28,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 #if !defined(CONFIG_USER_ONLY)
 #include "hw/loader.h"
 #endif
diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c
index a93abcb1dd9e42e2c97a91b908552f817bcb3240..3813a72626e0137effb11dca87285830d49b1d0f 100644
--- a/target-xtensa/op_helper.c
+++ b/target-xtensa/op_helper.c
@@ -27,7 +27,7 @@
 
 #include "cpu.h"
 #include "helper.h"
-#include "host-utils.h"
+#include "qemu/host-utils.h"
 
 static void do_unaligned_access(CPUXtensaState *env,
         target_ulong addr, int is_write, int is_user, uintptr_t retaddr);
diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
index 3c2d1853d6681c7427dcfaeae5837e1805ce257b..f61a497d2190c4ce8b69d86f8c869215c33a117f 100644
--- a/target-xtensa/translate.c
+++ b/target-xtensa/translate.c
@@ -34,7 +34,7 @@
 #include "exec/exec-all.h"
 #include "disas/disas.h"
 #include "tcg-op.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 #include "sysemu.h"
 
 #include "helper.h"
diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c
index 851ff546f0672ae4433a97b26d43fc557dc4f31e..5fe0361c02e825a542893b68bc02ff5219f3eb10 100644
--- a/target-xtensa/xtensa-semi.c
+++ b/target-xtensa/xtensa-semi.c
@@ -31,7 +31,7 @@
 #include <stddef.h>
 #include "cpu.h"
 #include "helper.h"
-#include "qemu-log.h"
+#include "qemu/log.h"
 
 enum {
     TARGET_SYS_exit = 1,
diff --git a/tcg/tcg.c b/tcg/tcg.c
index cb193f26830b5737b29f9bfbba533ce9c10db3ab..ede51a396083503ddc6223428d36583572bf38df 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -37,9 +37,9 @@
 #endif
 
 #include "qemu-common.h"
-#include "cache-utils.h"
-#include "host-utils.h"
-#include "qemu-timer.h"
+#include "qemu/cache-utils.h"
+#include "qemu/host-utils.h"
+#include "qemu/timer.h"
 
 /* Note: the long term plan is to reduce the dependancies on the QEMU
    CPU definitions. Currently they are used for qemu_ld/st
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 71b84c12dd6c6b1d32e26fcea5db328ced30ba50..913fa0535c8c5f79d8dcefb3988b7acbca3b42ab 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -26,8 +26,8 @@
 #include <unistd.h>
 #include <string.h>
 
-#include "compiler.h"
-#include "osdep.h"
+#include "qemu/compiler.h"
+#include "qemu/osdep.h"
 
 #define MAX_IRQ 256
 
diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c
index 8c7a4d1ff43a9966f5de7b370e0460bb09639ee7..e91fb1ae93c5e19cd90de067f959f1ff021791c3 100644
--- a/tests/tcg/test-i386-fprem.c
+++ b/tests/tcg/test-i386-fprem.c
@@ -22,8 +22,8 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#include "compiler.h"
-#include "osdep.h"
+#include "qemu/compiler.h"
+#include "qemu/osdep.h"
 #include <stdio.h>
 #include <inttypes.h>
 
diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c
index 40392ac51dca8ce2adf5307139bebe52a5f0bff2..6dc730d882fd853946bac3701d17dd08c4bf7f41 100644
--- a/tests/tcg/test-i386.c
+++ b/tests/tcg/test-i386.c
@@ -17,7 +17,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #define _GNU_SOURCE
-#include "compiler.h"
+#include "qemu/compiler.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/tests/test-iov.c b/tests/test-iov.c
index cbe7a8955cace24de10043ded777be46207251fe..a480bc87256910df0695b6b112af341405bb230f 100644
--- a/tests/test-iov.c
+++ b/tests/test-iov.c
@@ -1,7 +1,7 @@
 #include <glib.h>
 #include "qemu-common.h"
-#include "iov.h"
-#include "qemu_socket.h"
+#include "qemu/iov.h"
+#include "qemu/sockets.h"
 
 /* create a randomly-sized iovec with random vectors */
 static void iov_random(struct iovec **iovp, unsigned *iov_cntp)
diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
index 61b533a0711323eead1c5da01c70208a2b4d974f..5a3e82a854ff3e2d973807ec08619efa1a58c994 100644
--- a/tests/test-qmp-commands.c
+++ b/tests/test-qmp-commands.c
@@ -3,7 +3,7 @@
 #include "qapi/qmp/types.h"
 #include "test-qmp-commands.h"
 #include "qapi/qmp/dispatch.h"
-#include "module.h"
+#include "qemu/module.h"
 #include "qapi/qmp-input-visitor.h"
 #include "tests/test-qapi-types.h"
 #include "tests/test-qapi-visit.h"
diff --git a/thread-pool.c b/thread-pool.c
index 4c73a7db977eaa22207f02bd1e6e4ba22d62422a..e3ca64d790ad944ca96ba0b5dbea61614776f989 100644
--- a/thread-pool.c
+++ b/thread-pool.c
@@ -15,13 +15,13 @@
  * GNU GPL, version 2 or (at your option) any later version.
  */
 #include "qemu-common.h"
-#include "qemu-queue.h"
-#include "qemu-thread.h"
-#include "osdep.h"
+#include "qemu/queue.h"
+#include "qemu/thread.h"
+#include "qemu/osdep.h"
 #include "block/coroutine.h"
 #include "trace.h"
 #include "block/block_int.h"
-#include "event_notifier.h"
+#include "qemu/event_notifier.h"
 #include "block/thread-pool.h"
 
 static void do_spawn_thread(void);
diff --git a/trace/simple.c b/trace/simple.c
index d83681b2270ddc4584ccad08f62dbdd301c117a5..ce17d64bd7b9e9c96bbfa2cc07620bc68fe4d6ba 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -16,7 +16,7 @@
 #include <signal.h>
 #include <pthread.h>
 #endif
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "trace.h"
 #include "trace/control.h"
 
diff --git a/translate-all.c b/translate-all.c
index e0cdad38c7bb05bd4a944cba3c2280aebefdf19f..b621748ec052a5e6e7152a4ef7d72a94f8b8382f 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -35,7 +35,7 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #if defined(CONFIG_USER_ONLY)
diff --git a/ui/console.c b/ui/console.c
index 60bfb72ac2a9c48fa06c58d2ac0c6696e7342e84..a4bff8ce8a961db16ec0ecd8283027de4032d3e6 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "ui/console.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qmp-commands.h"
 #include "qemu-char.h"
 
diff --git a/ui/sdl_zoom.c b/ui/sdl_zoom.c
index a986c7c14c6c187c7cd5cdfce3711134f688fe01..122027cb365d53367ef02bc8552245a22d9eb481 100644
--- a/ui/sdl_zoom.c
+++ b/ui/sdl_zoom.c
@@ -12,7 +12,7 @@
  */
 
 #include "sdl_zoom.h"
-#include "osdep.h"
+#include "qemu/osdep.h"
 #include <stdint.h>
 #include <stdio.h>
 
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 962475de6b260ad8dd9fa7446df468229c28190c..8727bf49ca95053fe06ea2922fd2a4e0d900c70d 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -23,17 +23,17 @@
 
 #include "qemu-common.h"
 #include "ui/qemu-spice.h"
-#include "qemu-thread.h"
-#include "qemu-timer.h"
-#include "qemu-queue.h"
+#include "qemu/thread.h"
+#include "qemu/timer.h"
+#include "qemu/queue.h"
 #include "qemu-x509.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 #include "qmp-commands.h"
 #include "qapi/qmp/qint.h"
 #include "qapi/qmp/qbool.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qjson.h"
-#include "notify.h"
+#include "qemu/notify.h"
 #include "migration/migration.h"
 #include "monitor/monitor.h"
 #include "hw/hw.h"
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 56ebf808054ff7b64be89d410f123a594c0cbea2..a19b3d95fb018a5309ec52b3f77c5e8f6fced1bd 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -17,8 +17,8 @@
 
 #include "qemu-common.h"
 #include "ui/qemu-spice.h"
-#include "qemu-timer.h"
-#include "qemu-queue.h"
+#include "qemu/timer.h"
+#include "qemu/queue.h"
 #include "monitor/monitor.h"
 #include "ui/console.h"
 #include "sysemu.h"
diff --git a/ui/vnc-auth-sasl.h b/ui/vnc-auth-sasl.h
index ee243a9d64c5934067aa1480fc4031120914b876..8091d689cbc9c19bc83f2abeb9f7f84ec53c1a84 100644
--- a/ui/vnc-auth-sasl.h
+++ b/ui/vnc-auth-sasl.h
@@ -32,7 +32,7 @@
 typedef struct VncStateSASL VncStateSASL;
 typedef struct VncDisplaySASL VncDisplaySASL;
 
-#include "acl.h"
+#include "qemu/acl.h"
 
 struct VncStateSASL {
     sasl_conn_t *conn;
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index 09199ef584c3e0af1d9d443572f6dc0610b77d5e..4ddea7d4f5540f0ce487add8676dee685d3caccd 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -44,7 +44,7 @@
 #include <jpeglib.h>
 #endif
 
-#include "bswap.h"
+#include "qemu/bswap.h"
 #include "qapi/qmp/qint.h"
 #include "vnc.h"
 #include "vnc-enc-tight.h"
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
index 57c091683b3803024616e2038192416c037af2d9..0bfc0c5485b6eceadf625d4f61bb6238f4028b17 100644
--- a/ui/vnc-jobs.c
+++ b/ui/vnc-jobs.c
@@ -28,7 +28,7 @@
 
 #include "vnc.h"
 #include "vnc-jobs.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 
 /*
  * Locking:
diff --git a/ui/vnc-palette.h b/ui/vnc-palette.h
index bfc7fe642e36117b53a9c251a84c2728c65313e5..d02f0236c1c69e8523289cd7aee8bf1e5edf2d2f 100644
--- a/ui/vnc-palette.h
+++ b/ui/vnc-palette.h
@@ -30,7 +30,7 @@
 #define VNC_PALETTE_H
 
 #include "qapi/qmp/qlist.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include <stdint.h>
 #include <stdbool.h>
 
diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c
index a7f7d07ac838ad598015fffb6cd00d8a825b6e31..56292636d7c514935f7ed72796ee4fb6d9256298 100644
--- a/ui/vnc-tls.c
+++ b/ui/vnc-tls.c
@@ -26,7 +26,7 @@
 
 #include "qemu-x509.h"
 #include "vnc.h"
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 
 #if defined(_VNC_DEBUG) && _VNC_DEBUG >= 2
 /* Very verbose, so only enabled for _VNC_DEBUG >= 2 */
diff --git a/ui/vnc-tls.h b/ui/vnc-tls.h
index 2b93633896bf385ce0cf7df3a5470a94421b3856..36a2227fece1d6bfd02c43313bf4018369f5e6e6 100644
--- a/ui/vnc-tls.h
+++ b/ui/vnc-tls.h
@@ -31,7 +31,7 @@
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
 
-#include "acl.h"
+#include "qemu/acl.h"
 
 enum {
     VNC_WIREMODE_CLEAR,
diff --git a/ui/vnc.c b/ui/vnc.c
index dad2ddee29775abe0390230e97d55ab255368b1c..d9e5315e79a85158a69e7bcc8d86e1033452c731 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -27,12 +27,12 @@
 #include "vnc.h"
 #include "vnc-jobs.h"
 #include "sysemu.h"
-#include "qemu_socket.h"
-#include "qemu-timer.h"
-#include "acl.h"
+#include "qemu/sockets.h"
+#include "qemu/timer.h"
+#include "qemu/acl.h"
 #include "qapi/qmp/types.h"
 #include "qmp-commands.h"
-#include "osdep.h"
+#include "qemu/osdep.h"
 
 #define VNC_REFRESH_INTERVAL_BASE 30
 #define VNC_REFRESH_INTERVAL_INC  50
diff --git a/ui/vnc.h b/ui/vnc.h
index e5c043ff458f98333a9e29e73c337113add9904d..8b40f09117772306a5da4f892af0cba53d7f3c58 100644
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -28,12 +28,12 @@
 #define __QEMU_VNC_H
 
 #include "qemu-common.h"
-#include "qemu-queue.h"
-#include "qemu-thread.h"
+#include "qemu/queue.h"
+#include "qemu/thread.h"
 #include "ui/console.h"
 #include "monitor/monitor.h"
 #include "audio/audio.h"
-#include "bitmap.h"
+#include "qemu/bitmap.h"
 #include <zlib.h>
 #include <stdbool.h>
 
diff --git a/uri.c b/uri.c
index 138547b821a2200c730b9054f8c164440166981a..4238729b83f467542a630d9ab8799a53f2a43a1a 100644
--- a/uri.c
+++ b/uri.c
@@ -55,7 +55,7 @@
 #include <string.h>
 #include <stdio.h>
 
-#include "uri.h"
+#include "qemu/uri.h"
 
 static void uri_clean(URI *uri);
 
diff --git a/vl.c b/vl.c
index 2debde0a4ab5d4e2bdc3cdceba271b460ae7a93b..9b80e7abc444b58689501cfeea7f5cf32937684a 100644
--- a/vl.c
+++ b/vl.c
@@ -28,7 +28,7 @@
 #include <errno.h>
 #include <sys/time.h>
 #include <zlib.h>
-#include "bitmap.h"
+#include "qemu/bitmap.h"
 
 /* Needed early for CONFIG_BSD etc. */
 #include "config-host.h"
@@ -133,9 +133,9 @@ int main(int argc, char **argv)
 #include "ui/console.h"
 #include "sysemu.h"
 #include "exec/gdbstub.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
 #include "qemu-char.h"
-#include "cache-utils.h"
+#include "qemu/cache-utils.h"
 #include "blockdev.h"
 #include "hw/block-common.h"
 #include "migration/block.h"
@@ -144,11 +144,11 @@ int main(int argc, char **argv)
 #include "migration/migration.h"
 #include "kvm.h"
 #include "qapi/qmp/qjson.h"
-#include "qemu-option.h"
-#include "qemu-config.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
 #include "qemu-options.h"
 #include "qmp-commands.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
 #ifdef CONFIG_VIRTFS
 #include "fsdev/qemu-fsdev.h"
 #endif
@@ -156,16 +156,16 @@ int main(int argc, char **argv)
 
 #include "disas/disas.h"
 
-#include "qemu_socket.h"
+#include "qemu/sockets.h"
 
 #include "slirp/libslirp.h"
 
 #include "trace.h"
 #include "trace/control.h"
-#include "qemu-queue.h"
+#include "qemu/queue.h"
 #include "cpus.h"
 #include "arch_init.h"
-#include "osdep.h"
+#include "qemu/osdep.h"
 
 #include "ui/qemu-spice.h"
 #include "qapi/string-input-visitor.h"
diff --git a/xen-all.c b/xen-all.c
index 95d383f41fffc8e1db8c7a2b26ed23df0838ea54..6965626db8053d9c3de5f31940b4551f01c1b143 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -16,7 +16,7 @@
 #include "hw/xen_backend.h"
 #include "qmp-commands.h"
 
-#include "range.h"
+#include "qemu/range.h"
 #include "xen-mapcache.h"
 #include "trace.h"
 #include "exec/address-spaces.h"
diff --git a/xen-mapcache.c b/xen-mapcache.c
index 31c06dc9501abaca0c256076048618b829a323a1..8f4648cc32aabb7f19960dc4b11e2db7729fbe85 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -14,7 +14,7 @@
 
 #include "hw/xen_backend.h"
 #include "blockdev.h"
-#include "bitmap.h"
+#include "qemu/bitmap.h"
 
 #include <xen/hvm/params.h>
 #include <sys/mman.h>