summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--block/quorum.c2
-rw-r--r--blockdev.c17
-rw-r--r--chardev/char.c2
-rw-r--r--contrib/vhost-user-gpu/virgl.c1
-rw-r--r--contrib/vhost-user-gpu/vugbm.c1
-rw-r--r--contrib/vhost-user-gpu/vugbm.h2
-rw-r--r--contrib/vhost-user-gpu/vugpu.h1
-rw-r--r--contrib/vhost-user-input/main.c1
-rw-r--r--docs/devel/writing-qmp-commands.txt2
-rw-r--r--hw/core/qdev-properties-system.c2
-rw-r--r--hw/display/artist.c1
-rw-r--r--hw/s390x/s390-pci-vfio.c3
-rw-r--r--include/hw/block/swim.h1
-rw-r--r--include/hw/display/macfb.h1
-rw-r--r--include/monitor/monitor.h3
-rw-r--r--include/qapi/qmp/qerror.h23
-rw-r--r--include/qemu/nvdimm-utils.h1
-rw-r--r--include/sysemu/sev.h2
-rw-r--r--monitor/misc.c29
-rw-r--r--monitor/qmp-cmds.c38
-rw-r--r--net/net.c2
-rw-r--r--qapi/block-core.json28
-rw-r--r--qapi/block-export.json6
-rw-r--r--qapi/block.json2
-rw-r--r--qapi/char.json4
-rw-r--r--qapi/control.json14
-rw-r--r--qapi/machine-target.json22
-rw-r--r--qapi/machine.json46
-rw-r--r--qapi/migration.json16
-rw-r--r--qapi/misc-target.json20
-rw-r--r--qapi/misc.json30
-rw-r--r--qapi/net.json6
-rw-r--r--qapi/pci.json12
-rw-r--r--qapi/qdev.json2
-rw-r--r--qapi/run-state.json16
-rw-r--r--qapi/ui.json40
-rw-r--r--qga/commands-win32.c5
-rw-r--r--qom/object.c5
-rw-r--r--qom/qom-qmp-cmds.c17
-rw-r--r--softmmu/qdev-monitor.c4
-rw-r--r--target/i386/cpu.c31
-rw-r--r--target/i386/cpu.h4
-rw-r--r--target/i386/monitor.c7
-rw-r--r--target/i386/sev-stub.c5
-rw-r--r--target/i386/sev.c65
-rw-r--r--target/i386/trace-events1
-rwxr-xr-xtests/qemu-iotests/04012
-rw-r--r--tests/qtest/fuzz/fuzz.h1
-rw-r--r--tests/qtest/fuzz/generic_fuzz_configs.h1
-rw-r--r--tools/virtiofsd/buffer.c5
-rw-r--r--tools/virtiofsd/fuse_common.h2
-rw-r--r--tools/virtiofsd/fuse_log.c2
-rw-r--r--tools/virtiofsd/fuse_log.h1
-rw-r--r--tools/virtiofsd/fuse_lowlevel.c10
-rw-r--r--tools/virtiofsd/fuse_lowlevel.h3
-rw-r--r--tools/virtiofsd/fuse_misc.h1
-rw-r--r--tools/virtiofsd/fuse_opt.c4
-rw-r--r--tools/virtiofsd/fuse_signals.c5
-rw-r--r--tools/virtiofsd/fuse_virtio.c10
-rw-r--r--tools/virtiofsd/helper.c8
-rw-r--r--tools/virtiofsd/passthrough_ll.c12
-rw-r--r--tools/virtiofsd/passthrough_seccomp.c3
-rw-r--r--tools/virtiofsd/passthrough_seccomp.h1
-rw-r--r--util/nvdimm-utils.c1
64 files changed, 331 insertions, 294 deletions
diff --git a/block/quorum.c b/block/quorum.c
index b10fc2089e..4b08a199b7 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -856,7 +856,7 @@ static int quorum_valid_threshold(int threshold, int num_children, Error **errp)
 
     if (threshold < 1) {
         error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
-                   "vote-threshold", "value >= 1");
+                   "vote-threshold", "a value >= 1");
         return -ERANGE;
     }
 
diff --git a/blockdev.c b/blockdev.c
index fe6fb5dc1d..6c7be7c522 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2531,7 +2531,7 @@ void qmp_block_stream(bool has_job_id, const char *job_id, const char *device,
     if (has_base) {
         base_bs = bdrv_find_backing_image(bs, base);
         if (base_bs == NULL) {
-            error_setg(errp, QERR_BASE_NOT_FOUND, base);
+            error_setg(errp, "Can't find '%s' in the backing chain", base);
             goto out;
         }
         assert(bdrv_get_aio_context(base_bs) == aio_context);
@@ -2703,13 +2703,16 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device,
         }
     } else if (has_base && base) {
         base_bs = bdrv_find_backing_image(top_bs, base);
+        if (base_bs == NULL) {
+            error_setg(errp, "Can't find '%s' in the backing chain", base);
+            goto out;
+        }
     } else {
         base_bs = bdrv_find_base(top_bs);
-    }
-
-    if (base_bs == NULL) {
-        error_setg(errp, QERR_BASE_NOT_FOUND, base ? base : "NULL");
-        goto out;
+        if (base_bs == NULL) {
+            error_setg(errp, "There is no backimg image");
+            goto out;
+        }
     }
 
     assert(bdrv_get_aio_context(base_bs) == aio_context);
@@ -2988,7 +2991,7 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
     }
     if (granularity & (granularity - 1)) {
         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "granularity",
-                   "power of 2");
+                   "a power of 2");
         return;
     }
 
diff --git a/chardev/char.c b/chardev/char.c
index aa4282164a..a9b8c5a9aa 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -521,7 +521,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp)
 
     if (object_class_is_abstract(oc)) {
         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver",
-                   "abstract device type");
+                   "an abstract device type");
         return NULL;
     }
 
diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
index b0bc22c3c1..e647278052 100644
--- a/contrib/vhost-user-gpu/virgl.c
+++ b/contrib/vhost-user-gpu/virgl.c
@@ -12,6 +12,7 @@
  * See the COPYING file in the top-level directory.
  */
 
+#include "qemu/osdep.h"
 #include <virglrenderer.h>
 #include "virgl.h"
 
diff --git a/contrib/vhost-user-gpu/vugbm.c b/contrib/vhost-user-gpu/vugbm.c
index 9c357b6399..f5304ada2f 100644
--- a/contrib/vhost-user-gpu/vugbm.c
+++ b/contrib/vhost-user-gpu/vugbm.c
@@ -7,6 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 
+#include "qemu/osdep.h"
 #include "vugbm.h"
 
 static bool
diff --git a/contrib/vhost-user-gpu/vugbm.h b/contrib/vhost-user-gpu/vugbm.h
index 07e698fcd7..66f1520764 100644
--- a/contrib/vhost-user-gpu/vugbm.h
+++ b/contrib/vhost-user-gpu/vugbm.h
@@ -10,10 +10,8 @@
 #ifndef VHOST_USER_GPU_VUGBM_H
 #define VHOST_USER_GPU_VUGBM_H
 
-#include "qemu/osdep.h"
 
 #ifdef CONFIG_MEMFD
-#include <sys/mman.h>
 #include <sys/ioctl.h>
 #endif
 
diff --git a/contrib/vhost-user-gpu/vugpu.h b/contrib/vhost-user-gpu/vugpu.h
index bdf9a74b46..ad664c4df8 100644
--- a/contrib/vhost-user-gpu/vugpu.h
+++ b/contrib/vhost-user-gpu/vugpu.h
@@ -15,7 +15,6 @@
 #ifndef VUGPU_H
 #define VUGPU_H
 
-#include "qemu/osdep.h"
 
 #include "libvhost-user-glib.h"
 #include "standard-headers/linux/virtio_gpu.h"
diff --git a/contrib/vhost-user-input/main.c b/contrib/vhost-user-input/main.c
index d2de47cee7..c15d18c33f 100644
--- a/contrib/vhost-user-input/main.c
+++ b/contrib/vhost-user-input/main.c
@@ -6,7 +6,6 @@
 
 #include "qemu/osdep.h"
 
-#include <glib.h>
 #include <linux/input.h>
 
 #include "qemu/iov.h"
diff --git a/docs/devel/writing-qmp-commands.txt b/docs/devel/writing-qmp-commands.txt
index 46a6c48683..28984686c9 100644
--- a/docs/devel/writing-qmp-commands.txt
+++ b/docs/devel/writing-qmp-commands.txt
@@ -243,7 +243,7 @@ There are many examples of such documentation in the schema file already, but
 here goes "hello-world"'s new entry for qapi/misc.json:
 
 ##
-# @hello-world
+# @hello-world:
 #
 # Print a client provided string to the standard output stream.
 #
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 9d80a07d26..8912fb4e9c 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -776,7 +776,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name,
         }
         if (value < -1 || value > 255) {
             error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
-                       name ? name : "null", "pci_devfn");
+                       name ? name : "null", "a value between -1 and 255");
             return;
         }
         *ptr = value;
diff --git a/hw/display/artist.c b/hw/display/artist.c
index ed0e637f25..aa7bd594aa 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -9,7 +9,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/error-report.h"
-#include "qemu/typedefs.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "qemu/units.h"
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 9296e1bb6e..ead4f222d5 100644
--- a/hw/s390x/s390-pci-vfio.c
+++ b/hw/s390x/s390-pci-vfio.c
@@ -9,11 +9,12 @@
  * directory.
  */
 
+#include "qemu/osdep.h"
+
 #include <sys/ioctl.h>
 #include <linux/vfio.h>
 #include <linux/vfio_zdev.h>
 
-#include "qemu/osdep.h"
 #include "trace.h"
 #include "hw/s390x/s390-pci-bus.h"
 #include "hw/s390x/s390-pci-clp.h"
diff --git a/include/hw/block/swim.h b/include/hw/block/swim.h
index 5a49029543..c1bd5f6555 100644
--- a/include/hw/block/swim.h
+++ b/include/hw/block/swim.h
@@ -11,7 +11,6 @@
 #ifndef SWIM_H
 #define SWIM_H
 
-#include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "qom/object.h"
 
diff --git a/include/hw/display/macfb.h b/include/hw/display/macfb.h
index c133fa271e..80806b0306 100644
--- a/include/hw/display/macfb.h
+++ b/include/hw/display/macfb.h
@@ -13,7 +13,6 @@
 #ifndef MACFB_H
 #define MACFB_H
 
-#include "qemu/osdep.h"
 #include "exec/memory.h"
 #include "ui/console.h"
 #include "qom/object.h"
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index 348bfad3d5..af3887bb71 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -4,6 +4,7 @@
 #include "block/block.h"
 #include "qapi/qapi-types-misc.h"
 #include "qemu/readline.h"
+#include "include/exec/hwaddr.h"
 
 typedef struct MonitorHMP MonitorHMP;
 typedef struct MonitorOptions MonitorOptions;
@@ -37,6 +38,8 @@ void monitor_flush(Monitor *mon);
 int monitor_set_cpu(Monitor *mon, int cpu_index);
 int monitor_get_cpu_index(Monitor *mon);
 
+void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, uint64_t size, Error **errp);
+
 void monitor_read_command(MonitorHMP *mon, int show_prompt);
 int monitor_read_password(MonitorHMP *mon, ReadLineFunc *readline_func,
                           void *opaque);
diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
index 7c76e24aa7..596fce0c54 100644
--- a/include/qapi/qmp/qerror.h
+++ b/include/qapi/qmp/qerror.h
@@ -16,8 +16,6 @@
  * These macros will go away, please don't use in new code, and do not
  * add new ones!
  */
-#define QERR_BASE_NOT_FOUND \
-    "Base '%s' not found"
 
 #define QERR_BUS_NO_HOTPLUG \
     "Bus '%s' does not support hotplugging"
@@ -25,27 +23,15 @@
 #define QERR_DEVICE_HAS_NO_MEDIUM \
     "Device '%s' has no medium"
 
-#define QERR_DEVICE_INIT_FAILED \
-    "Device '%s' could not be initialized"
-
 #define QERR_DEVICE_IN_USE \
     "Device '%s' is in use"
 
 #define QERR_DEVICE_NO_HOTPLUG \
     "Device '%s' does not support hotplugging"
 
-#define QERR_FD_NOT_FOUND \
-    "File descriptor named '%s' not found"
-
-#define QERR_FD_NOT_SUPPLIED \
-    "No file descriptor supplied via SCM_RIGHTS"
-
 #define QERR_FEATURE_DISABLED \
     "The feature '%s' is not enabled"
 
-#define QERR_INVALID_BLOCK_FORMAT \
-    "Invalid block format '%s'"
-
 #define QERR_INVALID_PARAMETER \
     "Invalid parameter '%s'"
 
@@ -55,9 +41,6 @@
 #define QERR_INVALID_PARAMETER_VALUE \
     "Parameter '%s' expects %s"
 
-#define QERR_INVALID_PASSWORD \
-    "Password incorrect"
-
 #define QERR_IO_ERROR \
     "An IO error has occurred"
 
@@ -82,12 +65,6 @@
 #define QERR_REPLAY_NOT_SUPPORTED \
     "Record/replay feature is not supported for '%s'"
 
-#define QERR_SET_PASSWD_FAILED \
-    "Could not set password"
-
-#define QERR_UNDEFINED_ERROR \
-    "An undefined error has occurred"
-
 #define QERR_UNSUPPORTED \
     "this feature or command is not currently supported"
 
diff --git a/include/qemu/nvdimm-utils.h b/include/qemu/nvdimm-utils.h
index 4b8b198ba7..5f45774c2c 100644
--- a/include/qemu/nvdimm-utils.h
+++ b/include/qemu/nvdimm-utils.h
@@ -1,7 +1,6 @@
 #ifndef NVDIMM_UTILS_H
 #define NVDIMM_UTILS_H
 
-#include "qemu/osdep.h"
 
 GSList *nvdimm_get_device_list(void);
 #endif
diff --git a/include/sysemu/sev.h b/include/sysemu/sev.h
index 98c1ec8d38..7ab6e3e31d 100644
--- a/include/sysemu/sev.h
+++ b/include/sysemu/sev.h
@@ -18,4 +18,6 @@
 
 void *sev_guest_init(const char *id);
 int sev_encrypt_data(void *handle, uint8_t *ptr, uint64_t len);
+int sev_inject_launch_secret(const char *hdr, const char *secret,
+                             uint64_t gpa, Error **errp);
 #endif
diff --git a/monitor/misc.c b/monitor/misc.c
index 398211a034..fde6e36a0b 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -441,13 +441,13 @@ void qmp_client_migrate_info(const char *protocol, const char *hostname,
                                     has_port ? port : -1,
                                     has_tls_port ? tls_port : -1,
                                     cert_subject)) {
-            error_setg(errp, QERR_UNDEFINED_ERROR);
+            error_setg(errp, "Could not set up display for migration");
             return;
         }
         return;
     }
 
-    error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol", "spice");
+    error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol", "'spice'");
 }
 
 static void hmp_logfile(Monitor *mon, const QDict *qdict)
@@ -667,10 +667,11 @@ static void hmp_physical_memory_dump(Monitor *mon, const QDict *qdict)
     memory_dump(mon, count, format, size, addr, 1);
 }
 
-static void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, Error **errp)
+void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, uint64_t size, Error **errp)
 {
+    Int128 gpa_region_size;
     MemoryRegionSection mrs = memory_region_find(get_system_memory(),
-                                                 addr, 1);
+                                                 addr, size);
 
     if (!mrs.mr) {
         error_setg(errp, "No memory is mapped at address 0x%" HWADDR_PRIx, addr);
@@ -683,6 +684,14 @@ static void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, Error **errp)
         return NULL;
     }
 
+    gpa_region_size = int128_make64(size);
+    if (int128_lt(mrs.size, gpa_region_size)) {
+        error_setg(errp, "Size of memory region at 0x%" HWADDR_PRIx
+                   " exceeded.", addr);
+        memory_region_unref(mrs.mr);
+        return NULL;
+    }
+
     *p_mr = mrs.mr;
     return qemu_map_ram_ptr(mrs.mr->ram_block, mrs.offset_within_region);
 }
@@ -694,7 +703,7 @@ static void hmp_gpa2hva(Monitor *mon, const QDict *qdict)
     MemoryRegion *mr = NULL;
     void *ptr;
 
-    ptr = gpa2hva(&mr, addr, &local_err);
+    ptr = gpa2hva(&mr, addr, 1, &local_err);
     if (local_err) {
         error_report_err(local_err);
         return;
@@ -770,7 +779,7 @@ static void hmp_gpa2hpa(Monitor *mon, const QDict *qdict)
     void *ptr;
     uint64_t physaddr;
 
-    ptr = gpa2hva(&mr, addr, &local_err);
+    ptr = gpa2hva(&mr, addr, 1, &local_err);
     if (local_err) {
         error_report_err(local_err);
         return;
@@ -1232,7 +1241,7 @@ void qmp_getfd(const char *fdname, Error **errp)
 
     fd = qemu_chr_fe_get_msgfd(&cur_mon->chr);
     if (fd == -1) {
-        error_setg(errp, QERR_FD_NOT_SUPPLIED);
+        error_setg(errp, "No file descriptor supplied via SCM_RIGHTS");
         return;
     }
 
@@ -1286,7 +1295,7 @@ void qmp_closefd(const char *fdname, Error **errp)
     }
 
     qemu_mutex_unlock(&cur_mon->mon_lock);
-    error_setg(errp, QERR_FD_NOT_FOUND, fdname);
+    error_setg(errp, "File descriptor named '%s' not found", fdname);
 }
 
 int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp)
@@ -1357,7 +1366,7 @@ AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
 
     fd = qemu_chr_fe_get_msgfd(&mon->chr);
     if (fd == -1) {
-        error_setg(errp, QERR_FD_NOT_SUPPLIED);
+        error_setg(errp, "No file descriptor supplied via SCM_RIGHTS");
         goto error;
     }
 
@@ -1410,7 +1419,7 @@ error:
     } else {
         snprintf(fd_str, sizeof(fd_str), "fdset-id:%" PRId64, fdset_id);
     }
-    error_setg(errp, QERR_FD_NOT_FOUND, fd_str);
+    error_setg(errp, "File descriptor named '%s' not found", fd_str);
 }
 
 FdsetInfoList *qmp_query_fdsets(Error **errp)
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 6299c0c8c7..6223a28e8b 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -199,13 +199,7 @@ void qmp_set_password(const char *protocol, const char *password,
         }
         rc = qemu_spice.set_passwd(password, fail_if_connected,
                                    disconnect_if_connected);
-        if (rc != 0) {
-            error_setg(errp, QERR_SET_PASSWD_FAILED);
-        }
-        return;
-    }
-
-    if (strcmp(protocol, "vnc") == 0) {
+    } else if (strcmp(protocol, "vnc") == 0) {
         if (fail_if_connected || disconnect_if_connected) {
             /* vnc supports "connected=keep" only */
             error_setg(errp, QERR_INVALID_PARAMETER, "connected");
@@ -214,13 +208,15 @@ void qmp_set_password(const char *protocol, const char *password,
         /* Note that setting an empty password will not disable login through
          * this interface. */
         rc = vnc_display_password(NULL, password);
-        if (rc < 0) {
-            error_setg(errp, QERR_SET_PASSWD_FAILED);
-        }
+    } else {
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol",
+                   "'vnc' or 'spice'");
         return;
     }
 
-    error_setg(errp, QERR_INVALID_PARAMETER, "protocol");
+    if (rc != 0) {
+        error_setg(errp, "Could not set password");
+    }
 }
 
 void qmp_expire_password(const char *protocol, const char *whenstr,
@@ -244,28 +240,24 @@ void qmp_expire_password(const char *protocol, const char *whenstr,
             return;
         }
         rc = qemu_spice.set_pw_expire(when);
-        if (rc != 0) {
-            error_setg(errp, QERR_SET_PASSWD_FAILED);
-        }
-        return;
-    }
-
-    if (strcmp(protocol, "vnc") == 0) {
+    } else if (strcmp(protocol, "vnc") == 0) {
         rc = vnc_display_pw_expire(NULL, when);
-        if (rc != 0) {
-            error_setg(errp, QERR_SET_PASSWD_FAILED);
-        }
+    } else {
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol",
+                   "'vnc' or 'spice'");
         return;
     }
 
-    error_setg(errp, QERR_INVALID_PARAMETER, "protocol");
+    if (rc != 0) {
+        error_setg(errp, "Could not set password expire time");
+    }
 }
 
 #ifdef CONFIG_VNC
 void qmp_change_vnc_password(const char *password, Error **errp)
 {
     if (vnc_display_password(NULL, password) < 0) {
-        error_setg(errp, QERR_SET_PASSWD_FAILED);
+        error_setg(errp, "Could not set password");
     }
 }
 
diff --git a/net/net.c b/net/net.c
index 6a2c3d9567..e1035f21d1 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1013,7 +1013,7 @@ static int net_client_init1(const Netdev *netdev, bool is_netdev, Error **errp)
     if (net_client_init_fun[netdev->type](netdev, netdev->id, peer, errp) < 0) {
         /* FIXME drop when all init functions store an Error */
         if (errp && !*errp) {
-            error_setg(errp, QERR_DEVICE_INIT_FAILED,
+            error_setg(errp, "Device '%s' could not be initialized",
                        NetClientDriver_str(netdev->type));
         }
         return -1;
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 04ad80bc1e..04c5196e59 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -302,7 +302,7 @@
 # @ro: true if the backing device was open read-only
 #
 # @drv: the name of the block format used to open the backing device. As of
-#       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
+#       0.14 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
 #       'http', 'https', 'luks', 'nbd', 'parallels', 'qcow',
 #       'qcow2', 'raw', 'vdi', 'vmdk', 'vpc', 'vvfat'
@@ -389,7 +389,7 @@
 # @deprecated: Member @encryption_key_missing is deprecated.  It is
 #              always false.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 ##
 { 'struct': 'BlockDeviceInfo',
@@ -607,7 +607,7 @@
 # @deprecated: Member @dirty-bitmaps is deprecated.  Use @inserted
 #              member @dirty-bitmaps instead.
 #
-# Since:  0.14.0
+# Since:  0.14
 ##
 { 'struct': 'BlockInfo',
   'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool',
@@ -655,7 +655,7 @@
 # Returns: a list of @BlockInfo describing each virtual block device. Filter
 #          nodes that were created implicitly are skipped over.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -812,17 +812,17 @@
 # @wr_operations: The number of write operations performed by the device.
 #
 # @flush_operations: The number of cache flush operations performed by the
-#                    device (since 0.15.0)
+#                    device (since 0.15)
 #
 # @unmap_operations: The number of unmap operations performed by the device
 #                    (Since 4.2)
 #
-# @rd_total_time_ns: Total time spent on reads in nanoseconds (since 0.15.0).
+# @rd_total_time_ns: Total time spent on reads in nanoseconds (since 0.15).
 #
-# @wr_total_time_ns: Total time spent on writes in nanoseconds (since 0.15.0).
+# @wr_total_time_ns: Total time spent on writes in nanoseconds (since 0.15).
 #
 # @flush_total_time_ns: Total time spent on cache flushes in nanoseconds
-#                       (since 0.15.0).
+#                       (since 0.15).
 #
 # @unmap_total_time_ns: Total time spent on unmap operations in nanoseconds
 #                       (Since 4.2)
@@ -884,7 +884,7 @@
 #
 # @flush_latency_histogram: @BlockLatencyHistogramInfo. (Since 4.0)
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'BlockDeviceStats',
   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'unmap_bytes' : 'int',
@@ -987,7 +987,7 @@
 # @backing: This describes the backing block device if it has one.
 #           (Since 2.0)
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'BlockStats',
   'data': {'*device': 'str', '*qdev': 'str', '*node-name': 'str',
@@ -1011,7 +1011,7 @@
 #
 # Returns: A list of @BlockStats for each virtual block devices.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1299,7 +1299,7 @@
 # Returns: - nothing on success
 #          - If @device is not a valid block device, DeviceNotFound
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1484,7 +1484,7 @@
 # Returns: - nothing on success
 #          - If @device is not a valid block device, DeviceNotFound
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -4852,7 +4852,7 @@
 # Note: If action is "stop", a STOP event will eventually follow the
 #       BLOCK_IO_ERROR event
 #
-# Since: 0.13.0
+# Since: 0.13
 #
 # Example:
 #
diff --git a/qapi/block-export.json b/qapi/block-export.json
index a9f488f99c..4eeac7842d 100644
--- a/qapi/block-export.json
+++ b/qapi/block-export.json
@@ -54,7 +54,7 @@
 #
 # Returns: error if the server is already running.
 #
-# Since: 1.3.0
+# Since: 1.3
 ##
 { 'command': 'nbd-server-start',
   'data': { 'addr': 'SocketAddressLegacy',
@@ -155,7 +155,7 @@
 # Returns: error if the server is not running, or export with the same name
 #          already exists.
 #
-# Since: 1.3.0
+# Since: 1.3
 ##
 { 'command': 'nbd-server-add',
   'data': 'NbdServerAddOptions', 'boxed': true, 'features': ['deprecated'] }
@@ -211,7 +211,7 @@
 # Stop QEMU's embedded NBD server, and unregister all devices previously
 # added via @nbd-server-add.
 #
-# Since: 1.3.0
+# Since: 1.3
 ##
 { 'command': 'nbd-server-stop' }
 
diff --git a/qapi/block.json b/qapi/block.json
index a009f7d3a2..82fcf2c914 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -107,7 +107,7 @@
 #          - If @device is not a valid block device, DeviceNotFound
 # Notes:    Ejecting a device with no media results in success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
diff --git a/qapi/char.json b/qapi/char.json
index 43486d1daa..58338ed62d 100644
--- a/qapi/char.json
+++ b/qapi/char.json
@@ -24,7 +24,7 @@
 # Notes: @filename is encoded using the QEMU command line character device
 #        encoding.  See the QEMU man page for details.
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'ChardevInfo',
   'data': { 'label': 'str',
@@ -38,7 +38,7 @@
 #
 # Returns: a list of @ChardevInfo
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
diff --git a/qapi/control.json b/qapi/control.json
index 134f842baf..9c8a51352d 100644
--- a/qapi/control.json
+++ b/qapi/control.json
@@ -87,7 +87,7 @@
 #           exact format depends on the downstream however it highly
 #           recommended that a unique name is used.
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'VersionInfo',
   'data': {'qemu': 'VersionTriple', 'package': 'str'} }
@@ -99,7 +99,7 @@
 #
 # Returns: A @VersionInfo object describing the current version of QEMU.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -126,7 +126,7 @@
 #
 # @name: The command name
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
 
@@ -137,7 +137,7 @@
 #
 # Returns: A list of @CommandInfo for all supported commands
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -166,7 +166,7 @@
 #
 # @name: The event name
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
 
@@ -182,7 +182,7 @@
 #
 # Returns: A list of @EventInfo.
 #
-# Since: 1.2.0
+# Since: 1.2
 #
 # Example:
 #
@@ -212,7 +212,7 @@
 # guaranteed.  When using this interface, a premature EOF would not be
 # unexpected.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
diff --git a/qapi/machine-target.json b/qapi/machine-target.json
index fec3bb8679..e7811654b7 100644
--- a/qapi/machine-target.json
+++ b/qapi/machine-target.json
@@ -17,7 +17,7 @@
 # @name: the name of the CPU definition the model is based on
 # @props: a dictionary of QOM properties to be applied
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'struct': 'CpuModelInfo',
   'data': { 'name': 'str',
@@ -49,7 +49,7 @@
 #       version or machine-type, use @static (but keep in mind that some features may
 #       be omitted).
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'enum': 'CpuModelExpansionType',
   'data': [ 'static', 'full' ] }
@@ -73,7 +73,7 @@
 # @subset: If model A is a subset of model B, model A is guaranteed to run
 #          where model B runs. There are no guarantees about the other way.
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'enum': 'CpuModelCompareResult',
   'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
@@ -85,7 +85,7 @@
 #
 # @model: the baselined CpuModelInfo.
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'struct': 'CpuModelBaselineInfo',
   'data': { 'model': 'CpuModelInfo' },
@@ -107,7 +107,7 @@
 # CPU models identical. If the special property name "type" is included, the
 # models are by definition not identical and cannot be made identical.
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'struct': 'CpuModelCompareInfo',
   'data': { 'result': 'CpuModelCompareResult',
@@ -151,7 +151,7 @@
 # Note: this command isn't specific to s390x, but is only implemented
 #       on this architecture currently.
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'command': 'query-cpu-model-comparison',
   'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
@@ -194,7 +194,7 @@
 # Note: this command isn't specific to s390x, but is only implemented
 #       on this architecture currently.
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'command': 'query-cpu-model-baseline',
   'data': { 'modela': 'CpuModelInfo',
@@ -209,7 +209,7 @@
 #
 # @model: the expanded CpuModelInfo.
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'struct': 'CpuModelExpansionInfo',
   'data': { 'model': 'CpuModelInfo' },
@@ -246,7 +246,7 @@
 #          with a wrong type. Also returns an error if an expansion type is
 #          not supported.
 #
-# Since: 2.8.0
+# Since: 2.8
 ##
 { 'command': 'query-cpu-model-expansion',
   'data': { 'type': 'CpuModelExpansionType',
@@ -306,7 +306,7 @@
 # If @unavailable-features is not present, runnability
 # information for the CPU is not available.
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'struct': 'CpuDefinitionInfo',
   'data': { 'name': 'str',
@@ -325,7 +325,7 @@
 #
 # Returns: a list of CpuDefInfo
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'],
   'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
diff --git a/qapi/machine.json b/qapi/machine.json
index 7c9a263778..330189efe3 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -71,7 +71,7 @@
 # @arch: architecture of the cpu, which determines which additional fields
 #        will be listed (since 2.6)
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: @halted is a transient state that changes frequently.  By the time the
 #        data is sent to the client, the guest may no longer be halted.
@@ -196,7 +196,7 @@
 #
 # Returns: a list of @CpuInfo for each virtual CPU
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -319,23 +319,23 @@
 # @is-default: whether the machine is default
 #
 # @cpu-max: maximum number of CPUs supported by the machine type
-#           (since 1.5.0)
+#           (since 1.5)
 #
-# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
+# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
 #
 # @numa-mem-supported: true if '-numa node,mem' option is supported by
 #                      the machine type and false otherwise (since 4.1)
 #
 # @deprecated: if true, the machine type is deprecated and may be removed
 #              in future versions of QEMU according to the QEMU deprecation
-#              policy (since 4.1.0)
+#              policy (since 4.1)
 #
 # @default-cpu-type: default CPU model typename if none is requested via
 #                    the -cpu argument. (since 4.2)
 #
 # @default-ram-id: the default ID of initial RAM memory backend (since 5.2)
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'struct': 'MachineInfo',
   'data': { 'name': 'str', '*alias': 'str',
@@ -351,7 +351,7 @@
 #
 # Returns: a list of MachineInfo
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
 
@@ -386,7 +386,7 @@
 #
 # @arch: the target architecture
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'struct': 'TargetInfo',
   'data': { 'arch': 'SysEmuTarget' } }
@@ -398,7 +398,7 @@
 #
 # Returns: TargetInfo
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'command': 'query-target', 'returns': 'TargetInfo' }
 
@@ -409,7 +409,7 @@
 #
 # @UUID: the UUID of the guest
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: If no UUID was specified for the guest, a null UUID is returned.
 ##
@@ -422,7 +422,7 @@
 #
 # Returns: The @UuidInfo for the guest
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -457,7 +457,7 @@
 #
 # Performs a hard reset of a guest.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -472,7 +472,7 @@
 #
 # Requests that a guest perform a powerdown operation.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: A guest may or may not respond to this command.  This command
 #        returning does not indicate that a guest has accepted the request or
@@ -549,7 +549,7 @@
 #
 # Returns:  If successful, nothing
 #
-# Since:  0.14.0
+# Since:  0.14
 #
 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
 #
@@ -570,7 +570,7 @@
 #
 # @present: true if KVM acceleration is built into this executable
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
 
@@ -581,7 +581,7 @@
 #
 # Returns: @KvmInfo
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -933,7 +933,7 @@
 #
 # Returns: Nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: Errors were not reliably returned until 1.1
 #
@@ -962,7 +962,7 @@
 #
 # Returns: Nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: Errors were not reliably returned until 1.1
 #
@@ -1185,7 +1185,7 @@
 #        the balloon size may not have changed.  A guest can change the balloon
 #        size independent of this command.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1205,7 +1205,7 @@
 # @actual: the logical size of the VM in bytes
 #          Formula used: logical_vm_size = vm_ram_size - balloon_size
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 ##
 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
@@ -1220,7 +1220,7 @@
 #            kernel module cannot support it, KvmMissingCap
 #          - If no balloon device is present, DeviceNotActive
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1268,7 +1268,7 @@
 #                  is omitted if target doesn't support memory hotplug
 #                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
 #
-# Since: 2.11.0
+# Since: 2.11
 ##
 { 'struct': 'MemoryInfo',
   'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
@@ -1284,7 +1284,7 @@
 # -> { "execute": "query-memory-size-summary" }
 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
 #
-# Since: 2.11.0
+# Since: 2.11
 ##
 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
 
diff --git a/qapi/migration.json b/qapi/migration.json
index 3c75820527..d1d9632c2a 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -46,7 +46,7 @@
 # @pages-per-second: the number of memory pages transferred per second
 #                    (Since 4.0)
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'MigrationStats',
   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
@@ -224,7 +224,7 @@
 #        only returned if VFIO device is present, migration is supported by all
 #        VFIO devices and status is 'active' or 'completed' (since 5.2)
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'MigrationInfo',
   'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
@@ -252,7 +252,7 @@
 #
 # Returns: @MigrationInfo
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1143,7 +1143,7 @@
 # @tls-port:     spice tcp port for tls-secured channels
 # @cert-subject: server certificate subject
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1343,7 +1343,7 @@
 #
 # Notes: This command succeeds even if there is no migration process running.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1383,7 +1383,7 @@
 #
 # Returns: nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1407,7 +1407,7 @@
 #
 # Returns: nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -1486,7 +1486,7 @@
 #
 # Returns: nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes:
 #
diff --git a/qapi/misc-target.json b/qapi/misc-target.json
index 1e561fa97b..06ef8757f0 100644
--- a/qapi/misc-target.json
+++ b/qapi/misc-target.json
@@ -12,7 +12,7 @@
 #
 # Note: This event is rate-limited.
 #
-# Since: 0.13.0
+# Since: 0.13
 #
 # Example:
 #
@@ -202,6 +202,24 @@
   'if': 'defined(TARGET_I386)' }
 
 ##
+# @sev-inject-launch-secret:
+#
+# This command injects a secret blob into memory of SEV guest.
+#
+# @packet-header: the launch secret packet header encoded in base64
+#
+# @secret: the launch secret data to be injected encoded in base64
+#
+# @gpa: the guest physical address where secret will be injected.
+#
+# Since: 6.0
+#
+##
+{ 'command': 'sev-inject-launch-secret',
+  'data': { 'packet-header': 'str', 'secret': 'str', 'gpa': 'uint64' },
+  'if': 'defined(TARGET_I386)' }
+
+##
 # @dump-skeys:
 #
 # Dump guest's storage keys
diff --git a/qapi/misc.json b/qapi/misc.json
index 40df513856..27ccd7385f 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -27,7 +27,7 @@
 #
 # Returns: nothing on success.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -47,7 +47,7 @@
 #
 # @name: The name of the guest
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
 
@@ -58,7 +58,7 @@
 #
 # Returns: @NameInfo of the guest
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -132,7 +132,7 @@
 #
 # Stop all guest VCPU execution.
 #
-# Since:  0.14.0
+# Since:  0.14
 #
 # Notes: This function will succeed even if the guest is already in the stopped
 #        state.  In "inmigrate" state, it will ensure that the guest
@@ -152,7 +152,7 @@
 #
 # Resume guest VCPU execution.
 #
-# Since:  0.14.0
+# Since:  0.14
 #
 # Returns:  If successful, nothing
 #
@@ -210,7 +210,7 @@
 #
 # Returns: the output of the command as a string
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: This command only exists as a stop-gap.  Its use is highly
 #        discouraged.  The semantics of this command are not
@@ -264,7 +264,7 @@
 # Returns: - Nothing on success.
 #          - If @device is not a valid block device, DeviceNotFound
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -296,7 +296,7 @@
 #
 # Returns: Nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: If @fdname already exists, the file descriptor assigned to
 #        it will be closed and replaced by the received file
@@ -322,7 +322,7 @@
 #
 # Returns: Nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -342,7 +342,7 @@
 # @fd: The file descriptor that was received via SCM rights and
 #      added to the fd set.
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
 
@@ -363,7 +363,7 @@
 #
 #        If @fdset-id is not specified, a new fd set will be created.
 #
-# Since: 1.2.0
+# Since: 1.2
 #
 # Example:
 #
@@ -388,7 +388,7 @@
 # Returns: - Nothing on success
 #          - If @fdset-id or @fd is not found, FdNotFound
 #
-# Since: 1.2.0
+# Since: 1.2
 #
 # Notes: The list of fd sets is shared by all monitor connections.
 #
@@ -412,7 +412,7 @@
 #
 # @opaque: A free-form string that can be used to describe the fd.
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'struct': 'FdsetFdInfo',
   'data': {'fd': 'int', '*opaque': 'str'} }
@@ -426,7 +426,7 @@
 #
 # @fds: A list of file descriptors that belong to this fd set.
 #
-# Since: 1.2.0
+# Since: 1.2
 ##
 { 'struct': 'FdsetInfo',
   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
@@ -438,7 +438,7 @@
 #
 # Returns: A list of @FdsetInfo
 #
-# Since: 1.2.0
+# Since: 1.2
 #
 # Note: The list of fd sets is shared by all monitor connections.
 #
diff --git a/qapi/net.json b/qapi/net.json
index a3a1336001..c31748c87f 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -20,7 +20,7 @@
 # Returns: Nothing on success
 #          If @name is not a valid network device, DeviceNotFound
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: Not all network adapters support setting link status.  This command
 #        will succeed even if the network adapter does not support link status
@@ -42,7 +42,7 @@
 #
 # Additional arguments depend on the type.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Returns: Nothing on success
 #          If @type is not a valid network backend, DeviceNotFound
@@ -67,7 +67,7 @@
 # Returns: Nothing on success
 #          If @id is not a valid network backend, DeviceNotFound
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
diff --git a/qapi/pci.json b/qapi/pci.json
index b79cbd787b..ee7c659fec 100644
--- a/qapi/pci.json
+++ b/qapi/pci.json
@@ -18,7 +18,7 @@
 #
 # @limit: the ending address (guest physical)
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
 
@@ -38,7 +38,7 @@
 #
 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'PciMemoryRegion',
   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
@@ -82,7 +82,7 @@
 #
 # @devices: a list of @PciDeviceInfo for each device on this bridge
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'PciBridgeInfo',
   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
@@ -148,7 +148,7 @@
 # Notes: the contents of @class_info.desc are not stable and should only be
 #        treated as informational.
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'PciDeviceInfo',
   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
@@ -165,7 +165,7 @@
 #
 # @devices: a list of devices on this bus
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
 
@@ -179,7 +179,7 @@
 #          all PCI devices attached to it. Each device is represented by a
 #          json-object.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
diff --git a/qapi/qdev.json b/qapi/qdev.json
index 13254529bf..b83178220b 100644
--- a/qapi/qdev.json
+++ b/qapi/qdev.json
@@ -86,7 +86,7 @@
 #        DEVICE_DELETED event. Guest reset will automatically complete removal
 #        for all devices.
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
diff --git a/qapi/run-state.json b/qapi/run-state.json
index 964c8ef391..b2f77cbf3f 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -107,7 +107,7 @@
 #
 # @status: the virtual machine @RunState
 #
-# Since:  0.14.0
+# Since:  0.14
 #
 # Notes: @singlestep is enabled through the GDB stub
 ##
@@ -121,7 +121,7 @@
 #
 # Returns: @StatusInfo reflecting all VCPUs
 #
-# Since:  0.14.0
+# Since:  0.14
 #
 # Example:
 #
@@ -149,7 +149,7 @@
 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
 #       not exit, and a STOP event will eventually follow the SHUTDOWN event
 #
-# Since: 0.12.0
+# Since: 0.12
 #
 # Example:
 #
@@ -165,7 +165,7 @@
 # Emitted when the virtual machine is powered down through the power control
 # system, such as via ACPI.
 #
-# Since: 0.12.0
+# Since: 0.12
 #
 # Example:
 #
@@ -187,7 +187,7 @@
 #
 # @reason: The @ShutdownCause of the RESET. (since 4.0)
 #
-# Since: 0.12.0
+# Since: 0.12
 #
 # Example:
 #
@@ -202,7 +202,7 @@
 #
 # Emitted when the virtual machine is stopped
 #
-# Since: 0.12.0
+# Since: 0.12
 #
 # Example:
 #
@@ -217,7 +217,7 @@
 #
 # Emitted when the virtual machine resumes execution
 #
-# Since: 0.12.0
+# Since: 0.12
 #
 # Example:
 #
@@ -288,7 +288,7 @@
 #
 # Note: This event is rate-limited.
 #
-# Since: 0.13.0
+# Since: 0.13
 #
 # Example:
 #
diff --git a/qapi/ui.json b/qapi/ui.json
index 6c7b33cb72..d08d72b439 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -27,7 +27,7 @@
 # Returns: - Nothing on success
 #          - If Spice is not enabled, DeviceNotFound
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -56,7 +56,7 @@
 # Returns: - Nothing on success
 #          - If @protocol is 'spice' and Spice is not active, DeviceNotFound
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Notes: Time is relative to the server and currently there is no way to
 #        coordinate server time with client time.  It is not recommended to
@@ -88,7 +88,7 @@
 #
 # Returns: Nothing on success
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -156,7 +156,7 @@
 #
 # @tls: true if the channel is encrypted, false otherwise.
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'SpiceChannel',
   'base': 'SpiceBasicInfo',
@@ -215,7 +215,7 @@
 #
 # @channels: a list of @SpiceChannel for each active spice channel
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'SpiceInfo',
   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
@@ -230,7 +230,7 @@
 #
 # Returns: @SpiceInfo
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -278,7 +278,7 @@
 #
 # @client: client information
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -305,7 +305,7 @@
 #
 # @client: client information
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -333,7 +333,7 @@
 #
 # @client: client information
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -420,7 +420,7 @@
 # @sasl_username: If SASL authentication is in use, the SASL username
 #                 used for authentication.
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'VncClientInfo',
   'base': 'VncBasicInfo',
@@ -462,7 +462,7 @@
 #
 # @clients: a list of @VncClientInfo of all currently connected clients
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'VncInfo',
   'data': {'enabled': 'bool', '*host': 'str',
@@ -555,7 +555,7 @@
 #
 # Returns: @VncInfo
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -619,7 +619,7 @@
 # Note: This event is emitted before any authentication takes place, thus
 #       the authentication ID is not provided
 #
-# Since: 0.13.0
+# Since: 0.13
 #
 # Example:
 #
@@ -647,7 +647,7 @@
 #
 # @client: client information
 #
-# Since: 0.13.0
+# Since: 0.13
 #
 # Example:
 #
@@ -674,7 +674,7 @@
 #
 # @client: client information
 #
-# Since: 0.13.0
+# Since: 0.13
 #
 # Example:
 #
@@ -709,7 +709,7 @@
 #
 # @absolute: true if this device supports absolute coordinates as input
 #
-# Since: 0.14.0
+# Since: 0.14
 ##
 { 'struct': 'MouseInfo',
   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
@@ -722,7 +722,7 @@
 #
 # Returns: a list of @MouseInfo for each device
 #
-# Since: 0.14.0
+# Since: 0.14
 #
 # Example:
 #
@@ -792,7 +792,7 @@
 # 'sysrq' will be transparently changed to 'print', so they
 # are effectively synonyms.
 #
-# Since: 1.3.0
+# Since: 1.3
 #
 ##
 { 'enum': 'QKeyCode',
@@ -824,7 +824,7 @@
 #
 # Represents a keyboard key.
 #
-# Since: 1.3.0
+# Since: 1.3
 ##
 { 'union': 'KeyValue',
   'data': {
@@ -847,7 +847,7 @@
 # Returns: - Nothing on success
 #          - If key is unknown or redundant, InvalidParameter
 #
-# Since: 1.3.0
+# Since: 1.3
 #
 # Example:
 #
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 300b87c859..ba1fd07d06 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -334,7 +334,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
         shutdown_flag |= EWX_REBOOT;
     } else {
         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "mode",
-                   "halt|powerdown|reboot");
+                   "'halt', 'powerdown', or 'reboot'");
         return;
     }
 
@@ -1441,8 +1441,7 @@ static void check_suspend_mode(GuestSuspendMode mode, Error **errp)
         }
         break;
     default:
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "mode",
-                   "GuestSuspendMode");
+        abort();
     }
 }
 
diff --git a/qom/object.c b/qom/object.c
index 75a78c9343..f2ae6e6b2a 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1196,11 +1196,11 @@ object_property_try_add(Object *obj, const char *name, const char *type,
 
     if (name_len >= 3 && !memcmp(name + name_len - 3, "[*]", 4)) {
         int i;
-        ObjectProperty *ret;
+        ObjectProperty *ret = NULL;
         char *name_no_array = g_strdup(name);
 
         name_no_array[name_len - 3] = '\0';
-        for (i = 0; ; ++i) {
+        for (i = 0; i < INT16_MAX; ++i) {
             char *full_name = g_strdup_printf("%s[%d]", name_no_array, i);
 
             ret = object_property_try_add(obj, full_name, type, get, set,
@@ -1211,6 +1211,7 @@ object_property_try_add(Object *obj, const char *name, const char *type,
             }
         }
         g_free(name_no_array);
+        assert(ret);
         return ret;
     }
 
diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c
index 310ab2d048..2dd233f293 100644
--- a/qom/qom-qmp-cmds.c
+++ b/qom/qom-qmp-cmds.c
@@ -138,15 +138,10 @@ ObjectPropertyInfoList *qmp_device_list_properties(const char *typename,
         return NULL;
     }
 
-    klass = object_class_dynamic_cast(klass, TYPE_DEVICE);
-    if (klass == NULL) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename", TYPE_DEVICE);
-        return NULL;
-    }
-
-    if (object_class_is_abstract(klass)) {
+    if (!object_class_dynamic_cast(klass, TYPE_DEVICE)
+        || object_class_is_abstract(klass)) {
         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename",
-                   "non-abstract device type");
+                   "a non-abstract device type");
         return NULL;
     }
 
@@ -208,9 +203,9 @@ ObjectPropertyInfoList *qmp_qom_list_properties(const char *typename,
         return NULL;
     }
 
-    klass = object_class_dynamic_cast(klass, TYPE_OBJECT);
-    if (klass == NULL) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename", TYPE_OBJECT);
+    if (!object_class_dynamic_cast(klass, TYPE_OBJECT)) {
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename",
+                   "a QOM type");
         return NULL;
     }
 
diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
index c2816c5a29..832e254842 100644
--- a/softmmu/qdev-monitor.c
+++ b/softmmu/qdev-monitor.c
@@ -237,7 +237,7 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)
 
     if (object_class_is_abstract(oc)) {
         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver",
-                   "non-abstract device type");
+                   "a non-abstract device type");
         return NULL;
     }
 
@@ -245,7 +245,7 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)
     if (!dc->user_creatable ||
         (qdev_hotplug && !dc->hotpluggable)) {
         error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver",
-                   "pluggable device type");
+                   "a pluggable device type");
         return NULL;
     }
 
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index af48e3f79e..6c11feeb92 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -673,6 +673,7 @@ static void x86_cpu_vendor_words2str(char *dst, uint32_t vendor1,
 #define TCG_XSAVE_FEATURES (CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XGETBV1)
           /* missing:
           CPUID_XSAVE_XSAVEC, CPUID_XSAVE_XSAVES */
+#define TCG_14_0_ECX_FEATURES 0
 
 typedef enum FeatureWordType {
    CPUID_FEATURE_WORD,
@@ -1302,6 +1303,26 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         }
     },
 
+    [FEAT_14_0_ECX] = {
+        .type = CPUID_FEATURE_WORD,
+        .feat_names = {
+            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, "intel-pt-lip",
+        },
+        .cpuid = {
+            .eax = 0x14,
+            .needs_ecx = true, .ecx = 0,
+            .reg = R_ECX,
+        },
+        .tcg_features = TCG_14_0_ECX_FEATURES,
+     },
+
 };
 
 typedef struct FeatureMask {
@@ -1375,6 +1396,10 @@ static FeatureDep feature_dependencies[] = {
         .to = { FEAT_VMX_SECONDARY_CTLS,    VMX_SECONDARY_EXEC_RDSEED_EXITING },
     },
     {
+        .from = { FEAT_7_0_EBX,             CPUID_7_0_EBX_INTEL_PT },
+        .to = { FEAT_14_0_ECX,              ~0ull },
+    },
+    {
         .from = { FEAT_8000_0001_EDX,       CPUID_EXT2_RDTSCP },
         .to = { FEAT_VMX_SECONDARY_CTLS,    VMX_SECONDARY_EXEC_RDTSCP },
     },
@@ -5756,6 +5781,9 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
             *eax = INTEL_PT_MAX_SUBLEAF;
             *ebx = INTEL_PT_MINIMAL_EBX;
             *ecx = INTEL_PT_MINIMAL_ECX;
+            if (env->features[FEAT_14_0_ECX] & CPUID_14_0_ECX_LIP) {
+                *ecx |= CPUID_14_0_ECX_LIP;
+            }
         } else if (count == 1) {
             *eax = INTEL_PT_MTC_BITMAP | INTEL_PT_ADDR_RANGES_NUM;
             *ebx = INTEL_PT_PSB_BITMAP | INTEL_PT_CYCLE_BITMAP;
@@ -6504,7 +6532,8 @@ static void x86_cpu_filter_features(X86CPU *cpu, bool verbose)
                                            INTEL_PT_ADDR_RANGES_NUM) ||
            ((ebx_1 & (INTEL_PT_PSB_BITMAP | INTEL_PT_CYCLE_BITMAP)) !=
                 (INTEL_PT_PSB_BITMAP | INTEL_PT_CYCLE_BITMAP)) ||
-           (ecx_0 & INTEL_PT_IP_LIP)) {
+           ((ecx_0 & CPUID_14_0_ECX_LIP) !=
+                (env->features[FEAT_14_0_ECX] & CPUID_14_0_ECX_LIP))) {
             /*
              * Processor Trace capabilities aren't configurable, so if the
              * host can't emulate the capabilities we report on
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 88e8586f8f..c4a49c06a8 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -541,6 +541,7 @@ typedef enum FeatureWord {
     FEAT_VMX_EPT_VPID_CAPS,
     FEAT_VMX_BASIC,
     FEAT_VMX_VMFUNC,
+    FEAT_14_0_ECX,
     FEATURE_WORDS,
 } FeatureWord;
 
@@ -797,6 +798,9 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
 /* AVX512 BFloat16 Instruction */
 #define CPUID_7_1_EAX_AVX512_BF16       (1U << 5)
 
+/* Packets which contain IP payload have LIP values */
+#define CPUID_14_0_ECX_LIP              (1U << 31)
+
 /* CLZERO instruction */
 #define CPUID_8000_0008_EBX_CLZERO      (1U << 0)
 /* Always save/restore FP error pointers */
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 9f9e1c42f4..1bc91442b1 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -729,3 +729,10 @@ SevCapability *qmp_query_sev_capabilities(Error **errp)
 {
     return sev_get_capabilities(errp);
 }
+
+void qmp_sev_inject_launch_secret(const char *packet_hdr,
+                                  const char *secret, uint64_t gpa,
+                                  Error **errp)
+{
+    sev_inject_launch_secret(packet_hdr, secret, gpa, errp);
+}
diff --git a/target/i386/sev-stub.c b/target/i386/sev-stub.c
index 88e3f39a1e..c1fecc2101 100644
--- a/target/i386/sev-stub.c
+++ b/target/i386/sev-stub.c
@@ -49,3 +49,8 @@ SevCapability *sev_get_capabilities(Error **errp)
     error_setg(errp, "SEV is not available in this QEMU");
     return NULL;
 }
+int sev_inject_launch_secret(const char *hdr, const char *secret,
+                             uint64_t gpa, Error **errp)
+{
+    return 1;
+}
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 93c4d60b82..1546606811 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -29,6 +29,8 @@
 #include "trace.h"
 #include "migration/blocker.h"
 #include "qom/object.h"
+#include "exec/address-spaces.h"
+#include "monitor/monitor.h"
 
 #define TYPE_SEV_GUEST "sev-guest"
 OBJECT_DECLARE_SIMPLE_TYPE(SevGuestState, SEV_GUEST)
@@ -785,6 +787,69 @@ sev_encrypt_data(void *handle, uint8_t *ptr, uint64_t len)
     return 0;
 }
 
+int sev_inject_launch_secret(const char *packet_hdr, const char *secret,
+                             uint64_t gpa, Error **errp)
+{
+    struct kvm_sev_launch_secret input;
+    g_autofree guchar *data = NULL, *hdr = NULL;
+    int error, ret = 1;
+    void *hva;
+    gsize hdr_sz = 0, data_sz = 0;
+    MemoryRegion *mr = NULL;
+
+    if (!sev_guest) {
+        error_setg(errp, "SEV: SEV not enabled.");
+        return 1;
+    }
+
+    /* secret can be injected only in this state */
+    if (!sev_check_state(sev_guest, SEV_STATE_LAUNCH_SECRET)) {
+        error_setg(errp, "SEV: Not in correct state. (LSECRET) %x",
+                     sev_guest->state);
+        return 1;
+    }
+
+    hdr = g_base64_decode(packet_hdr, &hdr_sz);
+    if (!hdr || !hdr_sz) {
+        error_setg(errp, "SEV: Failed to decode sequence header");
+        return 1;
+    }
+
+    data = g_base64_decode(secret, &data_sz);
+    if (!data || !data_sz) {
+        error_setg(errp, "SEV: Failed to decode data");
+        return 1;
+    }
+
+    hva = gpa2hva(&mr, gpa, data_sz, errp);
+    if (!hva) {
+        error_prepend(errp, "SEV: Failed to calculate guest address: ");
+        return 1;
+    }
+
+    input.hdr_uaddr = (uint64_t)(unsigned long)hdr;
+    input.hdr_len = hdr_sz;
+
+    input.trans_uaddr = (uint64_t)(unsigned long)data;
+    input.trans_len = data_sz;
+
+    input.guest_uaddr = (uint64_t)(unsigned long)hva;
+    input.guest_len = data_sz;
+
+    trace_kvm_sev_launch_secret(gpa, input.guest_uaddr,
+                                input.trans_uaddr, input.trans_len);
+
+    ret = sev_ioctl(sev_guest->sev_fd, KVM_SEV_LAUNCH_SECRET,
+                    &input, &error);
+    if (ret) {
+        error_setg(errp, "SEV: failed to inject secret ret=%d fw_error=%d '%s'",
+                     ret, error, fw_error_to_str(error));
+        return ret;
+    }
+
+    return 0;
+}
+
 static void
 sev_register_types(void)
 {
diff --git a/target/i386/trace-events b/target/i386/trace-events
index 789c700d4a..9f299e94a2 100644
--- a/target/i386/trace-events
+++ b/target/i386/trace-events
@@ -15,3 +15,4 @@ kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session
 kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64
 kvm_sev_launch_measurement(const char *value) "data %s"
 kvm_sev_launch_finish(void) ""
+kvm_sev_launch_secret(uint64_t hpa, uint64_t hva, uint64_t secret, int len) "hpa 0x%" PRIx64 " hva 0x%" PRIx64 " data 0x%" PRIx64 " len %d"
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
index caf286571a..dc6069edc0 100755
--- a/tests/qemu-iotests/040
+++ b/tests/qemu-iotests/040
@@ -156,7 +156,7 @@ class TestSingleDrive(ImageCommitTestCase):
         self.assert_no_active_block_jobs()
         result = self.vm.qmp('block-commit', device='drive0', top='%s' % backing_img, base='%s' % backing_img)
         self.assert_qmp(result, 'error/class', 'GenericError')
-        self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % backing_img)
+        self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % backing_img)
 
     def test_top_invalid(self):
         self.assert_no_active_block_jobs()
@@ -168,7 +168,7 @@ class TestSingleDrive(ImageCommitTestCase):
         self.assert_no_active_block_jobs()
         result = self.vm.qmp('block-commit', device='drive0', top='%s' % mid_img, base='badfile')
         self.assert_qmp(result, 'error/class', 'GenericError')
-        self.assert_qmp(result, 'error/desc', 'Base \'badfile\' not found')
+        self.assert_qmp(result, 'error/desc', "Can't find 'badfile' in the backing chain")
 
     def test_top_node_invalid(self):
         self.assert_no_active_block_jobs()
@@ -208,7 +208,7 @@ class TestSingleDrive(ImageCommitTestCase):
         self.assert_no_active_block_jobs()
         result = self.vm.qmp('block-commit', device='drive0', top='%s' % backing_img, base='%s' % mid_img)
         self.assert_qmp(result, 'error/class', 'GenericError')
-        self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % mid_img)
+        self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % mid_img)
 
     def test_top_and_base_node_reversed(self):
         self.assert_no_active_block_jobs()
@@ -349,7 +349,7 @@ class TestRelativePaths(ImageCommitTestCase):
         self.assert_no_active_block_jobs()
         result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.mid_img, base='%s' % self.mid_img)
         self.assert_qmp(result, 'error/class', 'GenericError')
-        self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % self.mid_img)
+        self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % self.mid_img)
 
     def test_top_invalid(self):
         self.assert_no_active_block_jobs()
@@ -361,7 +361,7 @@ class TestRelativePaths(ImageCommitTestCase):
         self.assert_no_active_block_jobs()
         result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.mid_img, base='badfile')
         self.assert_qmp(result, 'error/class', 'GenericError')
-        self.assert_qmp(result, 'error/desc', 'Base \'badfile\' not found')
+        self.assert_qmp(result, 'error/desc', "Can't find 'badfile' in the backing chain")
 
     def test_top_is_active(self):
         self.run_commit_test(self.test_img, self.backing_img)
@@ -372,7 +372,7 @@ class TestRelativePaths(ImageCommitTestCase):
         self.assert_no_active_block_jobs()
         result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.backing_img, base='%s' % self.mid_img)
         self.assert_qmp(result, 'error/class', 'GenericError')
-        self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % self.mid_img)
+        self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % self.mid_img)
 
 
 class TestSetSpeed(ImageCommitTestCase):
diff --git a/tests/qtest/fuzz/fuzz.h b/tests/qtest/fuzz/fuzz.h
index 08e9560a79..3a8570e84c 100644
--- a/tests/qtest/fuzz/fuzz.h
+++ b/tests/qtest/fuzz/fuzz.h
@@ -14,7 +14,6 @@
 #ifndef FUZZER_H_
 #define FUZZER_H_
 
-#include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
 
diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h
index c4d925f9e6..b4c5fefeca 100644
--- a/tests/qtest/fuzz/generic_fuzz_configs.h
+++ b/tests/qtest/fuzz/generic_fuzz_configs.h
@@ -13,7 +13,6 @@
 #ifndef GENERIC_FUZZ_CONFIGS_H
 #define GENERIC_FUZZ_CONFIGS_H
 
-#include "qemu/osdep.h"
 
 typedef struct generic_fuzz_config {
     const char *name, *args, *objects;
diff --git a/tools/virtiofsd/buffer.c b/tools/virtiofsd/buffer.c
index bdc608c221..874f01c488 100644
--- a/tools/virtiofsd/buffer.c
+++ b/tools/virtiofsd/buffer.c
@@ -12,11 +12,6 @@
 #include "qemu/osdep.h"
 #include "fuse_i.h"
 #include "fuse_lowlevel.h"
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 size_t fuse_buf_size(const struct fuse_bufvec *bufv)
 {
diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
index 5aee5193eb..30b18b4966 100644
--- a/tools/virtiofsd/fuse_common.h
+++ b/tools/virtiofsd/fuse_common.h
@@ -18,8 +18,6 @@
 
 #include "fuse_log.h"
 #include "fuse_opt.h"
-#include <stdint.h>
-#include <sys/types.h>
 
 /** Major version of FUSE library interface */
 #define FUSE_MAJOR_VERSION 3
diff --git a/tools/virtiofsd/fuse_log.c b/tools/virtiofsd/fuse_log.c
index c301ff6da1..745d88cd2a 100644
--- a/tools/virtiofsd/fuse_log.c
+++ b/tools/virtiofsd/fuse_log.c
@@ -11,8 +11,6 @@
 #include "qemu/osdep.h"
 #include "fuse_log.h"
 
-#include <stdarg.h>
-#include <stdio.h>
 
 static void default_log_func(__attribute__((unused)) enum fuse_log_level level,
                              const char *fmt, va_list ap)
diff --git a/tools/virtiofsd/fuse_log.h b/tools/virtiofsd/fuse_log.h
index bf6c11ff11..8d7091bd4d 100644
--- a/tools/virtiofsd/fuse_log.h
+++ b/tools/virtiofsd/fuse_log.h
@@ -14,7 +14,6 @@
  * This file defines the logging interface of FUSE
  */
 
-#include <stdarg.h>
 
 /**
  * Log severity level
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
index c70fb16a9a..d4119e92ab 100644
--- a/tools/virtiofsd/fuse_lowlevel.c
+++ b/tools/virtiofsd/fuse_lowlevel.c
@@ -16,17 +16,7 @@
 #include "fuse_opt.h"
 #include "fuse_virtio.h"
 
-#include <assert.h>
-#include <errno.h>
-#include <glib.h>
-#include <limits.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/file.h>
-#include <unistd.h>
 
 #define THREAD_POOL_SIZE 64
 
diff --git a/tools/virtiofsd/fuse_lowlevel.h b/tools/virtiofsd/fuse_lowlevel.h
index 9c06240f9e..0e10a14bc9 100644
--- a/tools/virtiofsd/fuse_lowlevel.h
+++ b/tools/virtiofsd/fuse_lowlevel.h
@@ -25,10 +25,7 @@
 
 #include "fuse_common.h"
 
-#include <fcntl.h>
-#include <sys/stat.h>
 #include <sys/statvfs.h>
-#include <sys/types.h>
 #include <sys/uio.h>
 #include <utime.h>
 
diff --git a/tools/virtiofsd/fuse_misc.h b/tools/virtiofsd/fuse_misc.h
index 5c618ce21f..f252baa752 100644
--- a/tools/virtiofsd/fuse_misc.h
+++ b/tools/virtiofsd/fuse_misc.h
@@ -7,7 +7,6 @@
  */
 
 #include <pthread.h>
-#include "config-host.h"
 
 /*
  * Versioned symbols cannot be used in some cases because it
diff --git a/tools/virtiofsd/fuse_opt.c b/tools/virtiofsd/fuse_opt.c
index 28922361a2..f0ab8d22f4 100644
--- a/tools/virtiofsd/fuse_opt.c
+++ b/tools/virtiofsd/fuse_opt.c
@@ -14,10 +14,6 @@
 #include "fuse_i.h"
 #include "fuse_misc.h"
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 struct fuse_opt_context {
     void *data;
diff --git a/tools/virtiofsd/fuse_signals.c b/tools/virtiofsd/fuse_signals.c
index f18625b6e2..1de46de1ce 100644
--- a/tools/virtiofsd/fuse_signals.c
+++ b/tools/virtiofsd/fuse_signals.c
@@ -12,11 +12,6 @@
 #include "fuse_i.h"
 #include "fuse_lowlevel.h"
 
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 static struct fuse_session *fuse_instance;
 
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 623812c432..b264dcbd18 100644
--- a/tools/virtiofsd/fuse_virtio.c
+++ b/tools/virtiofsd/fuse_virtio.c
@@ -20,20 +20,10 @@
 #include "fuse_opt.h"
 #include "fuse_virtio.h"
 
-#include <assert.h>
-#include <errno.h>
-#include <glib.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/eventfd.h>
 #include <sys/socket.h>
-#include <sys/types.h>
 #include <sys/un.h>
-#include <sys/types.h>
 #include <grp.h>
-#include <unistd.h>
 
 #include "libvhost-user.h"
 
diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
index 75ac48dec2..28243b51b2 100644
--- a/tools/virtiofsd/helper.c
+++ b/tools/virtiofsd/helper.c
@@ -16,16 +16,8 @@
 #include "fuse_misc.h"
 #include "fuse_opt.h"
 
-#include <errno.h>
-#include <limits.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/param.h>
-#include <sys/time.h>
 #include <sys/resource.h>
-#include <unistd.h>
 
 #define FUSE_HELPER_OPT(t, p)                       \
     {                                               \
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 97485b22b4..12de321745 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -41,29 +41,17 @@
 #include "fuse_log.h"
 #include "fuse_lowlevel.h"
 #include "standard-headers/linux/fuse.h"
-#include <assert.h>
 #include <cap-ng.h>
 #include <dirent.h>
-#include <errno.h>
-#include <glib.h>
-#include <inttypes.h>
-#include <limits.h>
 #include <pthread.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/file.h>
 #include <sys/mount.h>
 #include <sys/prctl.h>
 #include <sys/resource.h>
 #include <sys/syscall.h>
-#include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/xattr.h>
 #include <syslog.h>
-#include <unistd.h>
 
 #include "qemu/cutils.h"
 #include "passthrough_helpers.h"
diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c
index 11623f56f2..a60d7da4b4 100644
--- a/tools/virtiofsd/passthrough_seccomp.c
+++ b/tools/virtiofsd/passthrough_seccomp.c
@@ -10,10 +10,7 @@
 #include "passthrough_seccomp.h"
 #include "fuse_i.h"
 #include "fuse_log.h"
-#include <errno.h>
-#include <glib.h>
 #include <seccomp.h>
-#include <stdlib.h>
 
 /* Bodge for libseccomp 2.4.2 which broke ppoll */
 #if !defined(__SNR_ppoll) && defined(__SNR_brk)
diff --git a/tools/virtiofsd/passthrough_seccomp.h b/tools/virtiofsd/passthrough_seccomp.h
index d47c8eade6..a3ab073f08 100644
--- a/tools/virtiofsd/passthrough_seccomp.h
+++ b/tools/virtiofsd/passthrough_seccomp.h
@@ -9,7 +9,6 @@
 #ifndef VIRTIOFSD_SECCOMP_H
 #define VIRTIOFSD_SECCOMP_H
 
-#include <stdbool.h>
 
 void setup_seccomp(bool enable_syslog);
 
diff --git a/util/nvdimm-utils.c b/util/nvdimm-utils.c
index 5cc768ca47..aa3d199f2d 100644
--- a/util/nvdimm-utils.c
+++ b/util/nvdimm-utils.c
@@ -1,3 +1,4 @@
+#include "qemu/osdep.h"
 #include "qemu/nvdimm-utils.h"
 #include "hw/mem/nvdimm.h"