diff --git a/blockdev.h b/blockdev.h
index 5f27b64..4be871e 100644
--- a/blockdev.h
+++ b/blockdev.h
@@ -11,7 +11,7 @@
 #define BLOCKDEV_H
 
 #include "block.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qemu-queue.h"
 
 void blockdev_mark_auto_del(BlockDriverState *bs);
diff --git a/dump.c b/dump.c
index 6b7c127..8826e8e 100644
--- a/dump.c
+++ b/dump.c
@@ -21,7 +21,7 @@
 #include "dump.h"
 #include "sysemu.h"
 #include "memory_mapping.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qmp-commands.h"
 #include "gdbstub.h"
 
diff --git a/error.c b/error.c
index 128d88c..cd600af 100644
--- a/error.c
+++ b/error.c
@@ -11,7 +11,7 @@
  */
 
 #include "qemu-common.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qjson.h"
 #include "qdict.h"
 #include "qapi-types.h"
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 1be8263..62c7f9d 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -32,7 +32,7 @@
 #include "virtio-blk.h"
 #include "qemu-config.h"
 #include "blockdev.h"
-#include "error.h"
+#include "qapi/error.h"
 
 #if defined(TARGET_I386)
 static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
diff --git a/hw/qdev.c b/hw/qdev.c
index bc20417..4498de0 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -28,7 +28,7 @@
 #include "net/net.h"
 #include "qdev.h"
 #include "sysemu.h"
-#include "error.h"
+#include "qapi/error.h"
 
 int qdev_hotplug = 0;
 static bool qdev_hot_added = false;
diff --git a/hw/qdev.h b/hw/qdev.h
index 8ba1613..855e47b 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -4,9 +4,9 @@
 #include "hw.h"
 #include "qemu-queue.h"
 #include "qemu-option.h"
-#include "qapi/qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "qemu/object.h"
-#include "error.h"
+#include "qapi/error.h"
 
 typedef struct Property Property;
 
diff --git a/hw/vga_int.h b/hw/vga_int.h
index 144e7d3..6093867 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -23,7 +23,7 @@
  */
 
 #include <hw/hw.h>
-#include "error.h"
+#include "qapi/error.h"
 #include "memory.h"
 
 #define ST01_V_RETRACE      0x08
diff --git a/qapi/qapi-dealloc-visitor.h b/include/qapi/dealloc-visitor.h
similarity index 95%
rename from qapi/qapi-dealloc-visitor.h
rename to include/qapi/dealloc-visitor.h
index 5842bc7..a8d3fcb 100644
--- a/qapi/qapi-dealloc-visitor.h
+++ b/include/qapi/dealloc-visitor.h
@@ -14,7 +14,7 @@
 #ifndef QAPI_DEALLOC_VISITOR_H
 #define QAPI_DEALLOC_VISITOR_H
 
-#include "qapi-visit-core.h"
+#include "qapi/visit-core.h"
 
 typedef struct QapiDeallocVisitor QapiDeallocVisitor;
 
diff --git a/error.h b/include/qapi/error.h
similarity index 100%
rename from error.h
rename to include/qapi/error.h
diff --git a/qapi/opts-visitor.h b/include/qapi/opts-visitor.h
similarity index 96%
rename from qapi/opts-visitor.h
rename to include/qapi/opts-visitor.h
index ea1a395..5408e53 100644
--- a/qapi/opts-visitor.h
+++ b/include/qapi/opts-visitor.h
@@ -13,7 +13,7 @@
 #ifndef OPTS_VISITOR_H
 #define OPTS_VISITOR_H
 
-#include "qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "qemu-option.h"
 
 typedef struct OptsVisitor OptsVisitor;
diff --git a/qapi/qmp-core.h b/include/qapi/qmp-core.h
similarity index 98%
rename from qapi/qmp-core.h
rename to include/qapi/qmp-core.h
index 00446cf..2a57a0c 100644
--- a/qapi/qmp-core.h
+++ b/include/qapi/qmp-core.h
@@ -16,7 +16,7 @@
 
 #include "qobject.h"
 #include "qdict.h"
-#include "error.h"
+#include "qapi/error.h"
 
 typedef void (QmpCommandFunc)(QDict *, QObject **, Error **);
 
diff --git a/qapi/qmp-input-visitor.h b/include/qapi/qmp-input-visitor.h
similarity index 95%
rename from qapi/qmp-input-visitor.h
rename to include/qapi/qmp-input-visitor.h
index e0a48a5..9071f9c 100644
--- a/qapi/qmp-input-visitor.h
+++ b/include/qapi/qmp-input-visitor.h
@@ -14,7 +14,7 @@
 #ifndef QMP_INPUT_VISITOR_H
 #define QMP_INPUT_VISITOR_H
 
-#include "qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "qobject.h"
 
 typedef struct QmpInputVisitor QmpInputVisitor;
diff --git a/qapi/qmp-output-visitor.h b/include/qapi/qmp-output-visitor.h
similarity index 95%
rename from qapi/qmp-output-visitor.h
rename to include/qapi/qmp-output-visitor.h
index 4a649c2..39cb575 100644
--- a/qapi/qmp-output-visitor.h
+++ b/include/qapi/qmp-output-visitor.h
@@ -14,7 +14,7 @@
 #ifndef QMP_OUTPUT_VISITOR_H
 #define QMP_OUTPUT_VISITOR_H
 
-#include "qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "qobject.h"
 
 typedef struct QmpOutputVisitor QmpOutputVisitor;
diff --git a/qapi/string-input-visitor.h b/include/qapi/string-input-visitor.h
similarity index 95%
rename from qapi/string-input-visitor.h
rename to include/qapi/string-input-visitor.h
index d269d42..15c9cd5 100644
--- a/qapi/string-input-visitor.h
+++ b/include/qapi/string-input-visitor.h
@@ -13,7 +13,7 @@
 #ifndef STRING_INPUT_VISITOR_H
 #define STRING_INPUT_VISITOR_H
 
-#include "qapi-visit-core.h"
+#include "qapi/visit-core.h"
 
 typedef struct StringInputVisitor StringInputVisitor;
 
diff --git a/qapi/string-output-visitor.h b/include/qapi/string-output-visitor.h
similarity index 95%
rename from qapi/string-output-visitor.h
rename to include/qapi/string-output-visitor.h
index 8868454..daa8c9d 100644
--- a/qapi/string-output-visitor.h
+++ b/include/qapi/string-output-visitor.h
@@ -13,7 +13,7 @@
 #ifndef STRING_OUTPUT_VISITOR_H
 #define STRING_OUTPUT_VISITOR_H
 
-#include "qapi-visit-core.h"
+#include "qapi/visit-core.h"
 
 typedef struct StringOutputVisitor StringOutputVisitor;
 
diff --git a/qapi/qapi-types-core.h b/include/qapi/types-core.h
similarity index 94%
rename from qapi/qapi-types-core.h
rename to include/qapi/types-core.h
index f781fc3..0080206 100644
--- a/qapi/qapi-types-core.h
+++ b/include/qapi/types-core.h
@@ -15,7 +15,7 @@
 #define QAPI_TYPES_CORE_H
 
 #include "qemu-common.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qerror.h"
 
 #endif
diff --git a/qapi/qapi-visit-core.h b/include/qapi/visit-core.h
similarity index 99%
rename from qapi/qapi-visit-core.h
rename to include/qapi/visit-core.h
index 60aceda..ba666b9 100644
--- a/qapi/qapi-visit-core.h
+++ b/include/qapi/visit-core.h
@@ -13,7 +13,7 @@
 #ifndef QAPI_VISITOR_CORE_H
 #define QAPI_VISITOR_CORE_H
 
-#include "qapi/qapi-types-core.h"
+#include "qapi/types-core.h"
 #include <stdlib.h>
 
 typedef struct GenericList
diff --git a/qapi/qapi-visit-impl.h b/include/qapi/visit-impl.h
similarity index 90%
rename from qapi/qapi-visit-impl.h
rename to include/qapi/visit-impl.h
index 0f3a189..7910898 100644
--- a/qapi/qapi-visit-impl.h
+++ b/include/qapi/visit-impl.h
@@ -12,8 +12,8 @@
 #ifndef QAPI_VISITOR_IMPL_H
 #define QAPI_VISITOR_IMPL_H
 
-#include "qapi/qapi-types-core.h"
-#include "qapi/qapi-visit-core.h"
+#include "qapi/types-core.h"
+#include "qapi/visit-core.h"
 
 void input_type_enum(Visitor *v, int *obj, const char *strings[],
                      const char *kind, const char *name, Error **errp);
diff --git a/include/ui/console.h b/include/ui/console.h
index a9f8952..b9a8a65 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -6,7 +6,7 @@
 #include "monitor.h"
 #include "trace.h"
 #include "qapi-types.h"
-#include "error.h"
+#include "qapi/error.h"
 
 /* keyboard/mouse support */
 
diff --git a/json-parser.h b/json-parser.h
index 8f2b5ec..4e346ac 100644
--- a/json-parser.h
+++ b/json-parser.h
@@ -16,7 +16,7 @@
 
 #include "qemu-common.h"
 #include "qlist.h"
-#include "error.h"
+#include "qapi/error.h"
 
 QObject *json_parser_parse(QList *tokens, va_list *ap);
 QObject *json_parser_parse_err(QList *tokens, va_list *ap, Error **errp);
diff --git a/migration.h b/migration.h
index c3a23cc..86e4118 100644
--- a/migration.h
+++ b/migration.h
@@ -17,7 +17,7 @@
 #include "qdict.h"
 #include "qemu-common.h"
 #include "notify.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "vmstate.h"
 #include "qapi-types.h"
 
diff --git a/net/net.c b/net/net.c
index 8b8ba12..680113f 100644
--- a/net/net.c
+++ b/net/net.c
@@ -38,7 +38,7 @@
 #include "iov.h"
 #include "qapi-visit.h"
 #include "qapi/opts-visitor.h"
-#include "qapi/qapi-dealloc-visitor.h"
+#include "qapi/dealloc-visitor.h"
 
 /* Net bridge is currently not supported for W32. */
 #if !defined(_WIN32)
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index e048b6c..4af2468 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -10,10 +10,10 @@
  *
  */
 
-#include "opts-visitor.h"
+#include "qapi/opts-visitor.h"
 #include "qemu-queue.h"
 #include "qemu-option-internal.h"
-#include "qapi-visit-impl.h"
+#include "qapi/visit-impl.h"
 
 
 struct OptsVisitor
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index a154523..d6ae4a8 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -11,7 +11,7 @@
  *
  */
 
-#include "qapi-dealloc-visitor.h"
+#include "qapi/dealloc-visitor.h"
 #include "qemu-queue.h"
 #include "qemu-common.h"
 #include "qemu-objects.h"
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 7a82b63..bce7868 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -11,8 +11,8 @@
  *
  */
 
-#include "qapi/qapi-visit-core.h"
-#include "qapi/qapi-visit-impl.h"
+#include "qapi/visit-core.h"
+#include "qapi/visit-impl.h"
 
 void visit_start_handle(Visitor *v, void **obj, const char *kind,
                         const char *name, Error **errp)
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 4085994..6b29e64 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -15,7 +15,7 @@
 #include "qapi/qmp-core.h"
 #include "json-parser.h"
 #include "qapi-types.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qerror.h"
 
 static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp)
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c
index 107d8d3..9878ef6 100644
--- a/qapi/qmp-input-visitor.c
+++ b/qapi/qmp-input-visitor.c
@@ -11,8 +11,8 @@
  *
  */
 
-#include "qmp-input-visitor.h"
-#include "qapi/qapi-visit-impl.h"
+#include "qapi/qmp-input-visitor.h"
+#include "qapi/visit-impl.h"
 #include "qemu-queue.h"
 #include "qemu-common.h"
 #include "qemu-objects.h"
diff --git a/qapi/qmp-output-visitor.c b/qapi/qmp-output-visitor.c
index 2bce9d5..3a056ef 100644
--- a/qapi/qmp-output-visitor.c
+++ b/qapi/qmp-output-visitor.c
@@ -11,8 +11,8 @@
  *
  */
 
-#include "qmp-output-visitor.h"
-#include "qapi/qapi-visit-impl.h"
+#include "qapi/qmp-output-visitor.h"
+#include "qapi/visit-impl.h"
 #include "qemu-queue.h"
 #include "qemu-common.h"
 #include "qemu-objects.h"
diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c
index 497eb9a..eaf6b11 100644
--- a/qapi/string-input-visitor.c
+++ b/qapi/string-input-visitor.c
@@ -11,8 +11,8 @@
  */
 
 #include "qemu-common.h"
-#include "string-input-visitor.h"
-#include "qapi/qapi-visit-impl.h"
+#include "qapi/string-input-visitor.h"
+#include "qapi/visit-impl.h"
 #include "qerror.h"
 
 struct StringInputVisitor
diff --git a/qapi/string-output-visitor.c b/qapi/string-output-visitor.c
index 34e525e..507ebf7 100644
--- a/qapi/string-output-visitor.c
+++ b/qapi/string-output-visitor.c
@@ -11,8 +11,8 @@
  */
 
 #include "qemu-common.h"
-#include "string-output-visitor.h"
-#include "qapi/qapi-visit-impl.h"
+#include "qapi/string-output-visitor.h"
+#include "qapi/visit-impl.h"
 #include "qerror.h"
 
 struct StringOutputVisitor
diff --git a/qemu-config.c b/qemu-config.c
index cd1ec21..e53c444 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -3,7 +3,7 @@
 #include "qemu-option.h"
 #include "qemu-config.h"
 #include "hw/qdev.h"
-#include "error.h"
+#include "qapi/error.h"
 
 static QemuOptsList qemu_drive_opts = {
     .name = "drive",
diff --git a/qemu-config.h b/qemu-config.h
index daf1539..f3c6276 100644
--- a/qemu-config.h
+++ b/qemu-config.h
@@ -1,7 +1,7 @@
 #ifndef QEMU_CONFIG_H
 #define QEMU_CONFIG_H
 
-#include "error.h"
+#include "qapi/error.h"
 #include "qemu-option.h"
 
 extern QemuOptsList qemu_fsdev_opts;
diff --git a/qemu-option.c b/qemu-option.c
index 27891e7..734b13c 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -29,7 +29,7 @@
 #include "qemu-common.h"
 #include "qemu-error.h"
 #include "qemu-objects.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qerror.h"
 #include "qemu-option-internal.h"
 
diff --git a/qemu-option.h b/qemu-option.h
index ca72986..53eca74 100644
--- a/qemu-option.h
+++ b/qemu-option.h
@@ -28,7 +28,7 @@
 
 #include <stdint.h>
 #include "qemu-queue.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qdict.h"
 
 enum QEMUOptionParType {
diff --git a/qemu_socket.h b/qemu_socket.h
index 02490ad..c10d732 100644
--- a/qemu_socket.h
+++ b/qemu_socket.h
@@ -27,7 +27,7 @@ int inet_aton(const char *cp, struct in_addr *ia);
 #endif /* !_WIN32 */
 
 #include "qemu-option.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qerror.h"
 
 /* misc helpers */
diff --git a/qerror.h b/qerror.h
index f23b978..cfdabba 100644
--- a/qerror.h
+++ b/qerror.h
@@ -15,7 +15,7 @@
 #include "qdict.h"
 #include "qstring.h"
 #include "qemu-error.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qapi-types.h"
 #include <stdarg.h>
 
diff --git a/qom/object.c b/qom/object.c
index e3e9242..d195890 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -12,7 +12,7 @@
 
 #include "qemu/object.h"
 #include "qemu-common.h"
-#include "qapi/qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-output-visitor.h"
 
diff --git a/qom/qom-qobject.c b/qom/qom-qobject.c
index 0689914..ee41346 100644
--- a/qom/qom-qobject.c
+++ b/qom/qom-qobject.c
@@ -12,7 +12,7 @@
 #include "qemu-common.h"
 #include "qemu/object.h"
 #include "qemu/qom-qobject.h"
-#include "qapi/qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "qapi/qmp-input-visitor.h"
 #include "qapi/qmp-output-visitor.h"
 
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 3c4678d..4d0847a 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -343,7 +343,7 @@ def gen_command_decl_prologue(header, guard, prefix=""):
 
 #include "%(prefix)sqapi-types.h"
 #include "qdict.h"
-#include "error.h"
+#include "qapi/error.h"
 
 ''',
                  header=basename(header), guard=guardname(header), prefix=prefix)
@@ -368,10 +368,10 @@ def gen_command_def_prologue(prefix="", proxy=False):
 
 #include "qemu-objects.h"
 #include "qapi/qmp-core.h"
-#include "qapi/qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "qapi/qmp-output-visitor.h"
 #include "qapi/qmp-input-visitor.h"
-#include "qapi/qapi-dealloc-visitor.h"
+#include "qapi/dealloc-visitor.h"
 #include "%(prefix)sqapi-types.h"
 #include "%(prefix)sqapi-visit.h"
 
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 1b84834..69e3dd7 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -248,7 +248,7 @@ fdef.write(mcgen('''
  *
  */
 
-#include "qapi/qapi-dealloc-visitor.h"
+#include "qapi/dealloc-visitor.h"
 #include "%(prefix)sqapi-types.h"
 #include "%(prefix)sqapi-visit.h"
 
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index a360de7..d292528 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -321,7 +321,7 @@ fdecl.write(mcgen('''
 #ifndef %(guard)s
 #define %(guard)s
 
-#include "qapi/qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "%(prefix)sqapi-types.h"
 ''',
                   prefix=prefix, guard=guardname(h_file)))
diff --git a/target-i386/cpu-qom.h b/target-i386/cpu-qom.h
index 5901140..3a7bc6a 100644
--- a/target-i386/cpu-qom.h
+++ b/target-i386/cpu-qom.h
@@ -22,7 +22,7 @@
 
 #include "qemu/cpu.h"
 #include "cpu.h"
-#include "error.h"
+#include "qapi/error.h"
 
 #ifdef TARGET_X86_64
 #define TYPE_X86_CPU "x86_64-cpu"
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index f3708e6..e847a22 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -27,7 +27,7 @@
 #include "qemu-option.h"
 #include "qemu-config.h"
 
-#include "qapi/qapi-visit-core.h"
+#include "qapi/visit-core.h"
 #include "arch_init.h"
 
 #include "hyperv.h"
diff --git a/target-openrisc/cpu.h b/target-openrisc/cpu.h
index de21a87..f118718 100644
--- a/target-openrisc/cpu.h
+++ b/target-openrisc/cpu.h
@@ -33,7 +33,7 @@ struct OpenRISCCPU;
 #include "cpu-defs.h"
 #include "softfloat.h"
 #include "qemu/cpu.h"
-#include "error.h"
+#include "qapi/error.h"
 
 #define TYPE_OPENRISC_CPU "or32-cpu"
 
diff --git a/ui/input.c b/ui/input.c
index 58d3b47..65950af 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -25,7 +25,7 @@
 #include "sysemu.h"
 #include "monitor.h"
 #include "ui/console.h"
-#include "error.h"
+#include "qapi/error.h"
 #include "qmp-commands.h"
 #include "qapi-types.h"
 
