From 4b870f1a05336690b169512ef9f3c93fee8fde34 Mon Sep 17 00:00:00 2001 From: Stefano Garzarella Date: Wed, 16 Sep 2020 17:26:34 +0200 Subject: [PATCH 1/8] vhost-vdpa: fix indentation in vdpa_ops This patch fixes wrong indentation of some vdpa_ops fields introduced with the initial commit 108a64818e ("vhost-vdpa: introduce vhost-vdpa backend") Signed-off-by: Stefano Garzarella Reviewed-by: Li Qiang Reviewed-by: Laurent Vivier Message-Id: <20200916152634.56917-1-sgarzare@redhat.com> Signed-off-by: Laurent Vivier --- hw/virtio/vhost-vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 4580f3efd8..e123837a55 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -469,6 +469,6 @@ const VhostOps vdpa_ops = { .vhost_send_device_iotlb_msg = NULL, .vhost_dev_start = vhost_vdpa_dev_start, .vhost_get_device_id = vhost_vdpa_get_device_id, - .vhost_vq_get_addr = vhost_vdpa_vq_get_addr, - .vhost_force_iommu = vhost_vdpa_force_iommu, + .vhost_vq_get_addr = vhost_vdpa_vq_get_addr, + .vhost_force_iommu = vhost_vdpa_force_iommu, }; From 3e8529dd8554d77467734db6f84b3619eeeb6895 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 17 Sep 2020 16:07:00 +0200 Subject: [PATCH 2/8] meson: fix static flag summary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'static build:' must display value of CONFIG_STATIC rather than value of CONFIG_TOOLS. Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200917140700.673171-1-lvivier@redhat.com> Signed-off-by: Laurent Vivier --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f4d1ab1096..b26c8bffc6 100644 --- a/meson.build +++ b/meson.build @@ -1368,7 +1368,7 @@ summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')} summary_info += {'sparse enabled': meson.get_compiler('c').cmd_array().contains('cgcc')} summary_info += {'strip binaries': get_option('strip')} summary_info += {'profiler': config_host.has_key('CONFIG_PROFILER')} -summary_info += {'static build': config_host.has_key('CONFIG_TOOLS')} +summary_info += {'static build': config_host.has_key('CONFIG_STATIC')} if targetos == 'darwin' summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')} endif From 986d4f78742b7419f01d8ede242abde6f2f74cf2 Mon Sep 17 00:00:00 2001 From: Li Qiang Date: Wed, 19 Aug 2020 07:43:09 -0700 Subject: [PATCH 3/8] virtio: vdpa: omit check return of g_malloc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If g_malloc fails, the application will be terminated. No need to check the return value of g_malloc. Signed-off-by: Li Qiang Reviewed-by: Laurent Vivier Reviewed-by: Alex Bennée Message-Id: <20200819144309.67579-1-liq3ea@163.com> Signed-off-by: Laurent Vivier --- hw/virtio/vhost-vdpa.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index e123837a55..97f4b2e353 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -320,10 +320,8 @@ static int vhost_vdpa_set_config(struct vhost_dev *dev, const uint8_t *data, struct vhost_vdpa_config *config; int ret; unsigned long config_size = offsetof(struct vhost_vdpa_config, buf); + config = g_malloc(size + config_size); - if (config == NULL) { - return -1; - } config->off = offset; config->len = size; memcpy(config->buf, data, size); @@ -340,9 +338,6 @@ static int vhost_vdpa_get_config(struct vhost_dev *dev, uint8_t *config, int ret; v_config = g_malloc(config_len + config_size); - if (v_config == NULL) { - return -1; - } v_config->len = config_len; v_config->off = 0; ret = vhost_vdpa_call(dev, VHOST_VDPA_GET_CONFIG, v_config); From ab800bb38b2d275209071e6c4f38c4269c178102 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Sat, 19 Sep 2020 12:18:59 +0200 Subject: [PATCH 4/8] Add *.pyc back to the .gitignore file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python still dumps its bytecode into the source directory, so we should continue to ignore the *.pyc files. Fixes: 0e72b7df4d ("Simplify the .gitignore file") Reported-by: Peter Maydell Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200919101859.28739-1-thuth@redhat.com> Signed-off-by: Laurent Vivier --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5515f595e6..b32bca1315 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /GNUmakefile /build/ +*.pyc .sdk .stgit-* .git-submodule-status From 9e32d4ead3531f70d26e374219884d42e5d8b170 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Sun, 20 Sep 2020 17:20:24 +0200 Subject: [PATCH 5/8] vhost-vdpa: remove useless variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in vhost_vdpa_listener_region_del(), try_unmap is always true and so, vhost_vdpa_dma_unmap() is always called. We can remove the variable Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang Message-Id: <20200920152024.860172-1-lvivier@redhat.com> Signed-off-by: Laurent Vivier --- hw/virtio/vhost-vdpa.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 97f4b2e353..aedc52c4d7 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -153,7 +153,6 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener, hwaddr iova; Int128 llend, llsize; int ret; - bool try_unmap = true; if (vhost_vdpa_listener_skipped_section(section)) { return; @@ -176,11 +175,9 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener, llsize = int128_sub(llend, int128_make64(iova)); - if (try_unmap) { - ret = vhost_vdpa_dma_unmap(v, iova, int128_get64(llsize)); - if (ret) { - error_report("vhost_vdpa dma unmap error!"); - } + ret = vhost_vdpa_dma_unmap(v, iova, int128_get64(llsize)); + if (ret) { + error_report("vhost_vdpa dma unmap error!"); } memory_region_unref(section->mr); From 420bd5660b87f3d3ebca58548f14548c984fab82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sun, 20 Sep 2020 17:50:42 +0200 Subject: [PATCH 6/8] timer: Fix timer_mod_anticipate() documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit timer_mod_anticipate() will be scaled to the timer unit, which is not always nanosecond. Fix the documentation. Fixes: add40e9777d ("timer: add timer_mod_anticipate*") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200920155042.400737-1-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- include/qemu/timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 6a8b48b5a9..1dc880e94e 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -679,7 +679,7 @@ void timer_mod(QEMUTimer *ts, int64_t expire_timer); /** * timer_mod_anticipate: * @ts: the timer - * @expire_time: the expiry time in nanoseconds + * @expire_time: the expire time in the units associated with the timer * * Modify a timer to expire at @expire_time or the current time, whichever * comes earlier, taking into account the scale associated with the timer. From df55509470d9b386be10510824e787140fd6ca05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 21 Sep 2020 06:02:31 +0200 Subject: [PATCH 7/8] migration/multifd: Remove superfluous semicolons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit checkpatch.pl report superfluous semicolons since commit ee0f3c09e01, but this one was missed: scripts/checkpatch.pl d32ca5ad798~..d32ca5ad798 ERROR: superfluous trailing semicolon #498: FILE: migration/multifd.c:308: + ram_counters.transferred += transferred;; total: 1 errors, 1 warnings, 2073 lines checked Fixes: d32ca5ad798 ("multifd: Split multifd code into its own file") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang Message-Id: <20200921040231.437653-1-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- migration/multifd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/multifd.c b/migration/multifd.c index ac84a61797..2de5263c32 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -447,7 +447,7 @@ static int multifd_send_pages(QEMUFile *f) + p->packet_len; qemu_file_update_transfer(f, transferred); ram_counters.multifd_bytes += transferred; - ram_counters.transferred += transferred;; + ram_counters.transferred += transferred; qemu_mutex_unlock(&p->mutex); qemu_sem_post(&p->sem); From c66790b5dfc2430c04bf5876cf485e1f538af7f2 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 23 Sep 2020 10:00:15 +0200 Subject: [PATCH 8/8] docs/system/deprecated: Move lm32 and unicore32 to the right section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lm32 and unicore32 are softmmut targets, and not linux-user targets. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200923080015.77373-1-thuth@redhat.com> Signed-off-by: Laurent Vivier --- docs/system/deprecated.rst | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 808c334fe7..b2f383ce52 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -329,6 +329,22 @@ The ``compat`` property used to set backwards compatibility modes for the processor has been deprecated. The ``max-cpu-compat`` property of the ``pseries`` machine type should be used instead. +``lm32`` CPUs (since 5.2.0) +''''''''''''''''''''''''''' + +The ``lm32`` guest CPU support is deprecated and will be removed in +a future version of QEMU. The only public user of this architecture +was the milkymist project, which has been dead for years; there was +never an upstream Linux port. + +``unicore32`` CPUs (since 5.2.0) +'''''''''''''''''''''''''''''''' + +The ``unicore32`` guest CPU support is deprecated and will be removed in +a future version of QEMU. Support for this CPU was removed from the +upstream Linux kernel, and there is no available upstream toolchain +to build binaries for it. + System emulator devices ----------------------- @@ -408,22 +424,6 @@ The above, converted to the current supported format:: linux-user mode CPUs -------------------- -``lm32`` CPUs (since 5.2.0) -''''''''''''''''''''''''''' - -The ``lm32`` guest CPU support is deprecated and will be removed in -a future version of QEMU. The only public user of this architecture -was the milkymist project, which has been dead for years; there was -never an upstream Linux port. - -``unicore32`` CPUs (since 5.2.0) -'''''''''''''''''''''''''''''''' - -The ``unicore32`` guest CPU support is deprecated and will be removed in -a future version of QEMU. Support for this CPU was removed from the -upstream Linux kernel, and there is no available upstream toolchain -to build binaries for it. - ``tilegx`` CPUs (since 5.1.0) '''''''''''''''''''''''''''''