From b54b82df250685b8ee7f947909d10dc30a0ac2b1 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 9 Nov 2020 09:59:06 +0100 Subject: [PATCH 1/6] meson: Clarify the confusing vhost-user vs. vhost-kernel output The configuration summary prints a line with "vhost-user: YES/NO", but the value is currently the vhost-kernel setting instead which looks wrong. Print the kernel setting in a separate line and switch the "vhost-user:" line to CONFIG_VHOST_USER instead. Signed-off-by: Thomas Huth Message-Id: <20201109085906.87921-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f5175010df..b7f91cb08d 100644 --- a/meson.build +++ b/meson.build @@ -2102,11 +2102,12 @@ summary_info += {'madvise': config_host.has_key('CONFIG_MADVISE')} summary_info += {'posix_madvise': config_host.has_key('CONFIG_POSIX_MADVISE')} summary_info += {'posix_memalign': config_host.has_key('CONFIG_POSIX_MEMALIGN')} summary_info += {'libcap-ng support': config_host.has_key('CONFIG_LIBCAP_NG')} +summary_info += {'vhost-kernel support': config_host.has_key('CONFIG_VHOST_KERNEL')} summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')} summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')} summary_info += {'vhost-scsi support': config_host.has_key('CONFIG_VHOST_SCSI')} summary_info += {'vhost-vsock support': config_host.has_key('CONFIG_VHOST_VSOCK')} -summary_info += {'vhost-user support': config_host.has_key('CONFIG_VHOST_KERNEL')} +summary_info += {'vhost-user support': config_host.has_key('CONFIG_VHOST_USER')} summary_info += {'vhost-user-fs support': config_host.has_key('CONFIG_VHOST_USER_FS')} summary_info += {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST_VDPA')} summary_info += {'Trace backends': config_host['TRACE_BACKENDS']} From 1023e0033db712b0742de226f133a494f7c474c8 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 5 Nov 2020 07:44:56 -0500 Subject: [PATCH 2/6] fix make clean/distclean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A misplaced $(quiet-@) meant that "make clean" and "make distclean" did not work properly. Reported-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9465720696..6f2da3e7dc 100644 --- a/Makefile +++ b/Makefile @@ -212,8 +212,8 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS)) ###################################################################### clean: recurse-clean - -@test -f build.ninja && $(quiet-@)$(NINJA) $(NINJAFLAGS) -t clean || : - -@test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || : + -$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || : + -$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || : # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \ @@ -231,7 +231,7 @@ qemu-%.tar.bz2: $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" distclean: clean - -@test -f build.ninja && $(quiet-@)$(NINJA) $(NINJAFLAGS) -t clean -g || : + -$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || : rm -f config-host.mak config-host.h* rm -f tests/tcg/config-*.mak rm -f config-all-disas.mak config.status From dc24926baf9d577bb00b385f12ade9cad6bb4cba Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Thu, 5 Nov 2020 09:10:14 +0300 Subject: [PATCH 3/6] replay: remove some dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes dead code in replay_continue_stop() function. Signed-off-by: Pavel Dovgalyuk Reported-by: Philippe Mathieu-Daudé Message-Id: <160455661411.3455.4177953912304752892.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini --- replay/replay-debugging.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/replay/replay-debugging.c b/replay/replay-debugging.c index ee9e86daa9..1d6a968406 100644 --- a/replay/replay-debugging.c +++ b/replay/replay-debugging.c @@ -278,7 +278,6 @@ static void replay_continue_stop(void *opaque) replay_continue_end(); } replay_last_snapshot = replay_get_current_icount(); - return; } else { /* Seek to the very first step */ replay_seek(0, replay_stop_vm_debug, &err); @@ -286,9 +285,7 @@ static void replay_continue_stop(void *opaque) error_free(err); replay_continue_end(); } - return; } - replay_continue_end(); } bool replay_reverse_continue(void) From 784106ec98b68cd4c1470a3f92cc46ac3e8926c1 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Thu, 5 Nov 2020 16:47:00 +0100 Subject: [PATCH 4/6] Makefile: No echoing for 'make help V=1' It doesn't bring much to have echoing with "make help". Suppress it unconditionally. Signed-off-by: Greg Kurz Message-Id: <160459122012.462591.8467906402712875729.stgit@bahia.lan> Signed-off-by: Paolo Bonzini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f2da3e7dc..76dbb917f5 100644 --- a/Makefile +++ b/Makefile @@ -270,7 +270,7 @@ include $(SRC_PATH)/tests/docker/Makefile.include include $(SRC_PATH)/tests/vm/Makefile.include print-help-run = printf " %-30s - %s\\n" "$1" "$2" -print-help = $(quiet-@)$(call print-help-run,$1,$2) +print-help = @$(call print-help-run,$1,$2) .PHONY: help help: From a3a929083b03c839b3c87c461769e605ec79b0a7 Mon Sep 17 00:00:00 2001 From: Pankaj Gupta Date: Thu, 22 Oct 2020 13:13:02 +0200 Subject: [PATCH 5/6] physmem: improve ram size error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ram size mismatch condition logs below message. "Length mismatch: pc.ram: 0x80000000 in != 0x180000000: Invalid argument" This patch improves the readability of error messages. Removed the superflous "in" and changed "Length" to "Size". Signed-off-by: Pankaj Gupta Reported-by: Li Zhang Message-Id: <20201022111302.8105-1-pankaj.gupta.linux@gmail.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- softmmu/physmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 0b31be2928..dd60ff79e9 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -1756,15 +1756,15 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp) if (!(block->flags & RAM_RESIZEABLE)) { error_setg_errno(errp, EINVAL, - "Length mismatch: %s: 0x" RAM_ADDR_FMT - " in != 0x" RAM_ADDR_FMT, block->idstr, + "Size mismatch: %s: 0x" RAM_ADDR_FMT + " != 0x" RAM_ADDR_FMT, block->idstr, newsize, block->used_length); return -EINVAL; } if (block->max_length < newsize) { error_setg_errno(errp, EINVAL, - "Length too large: %s: 0x" RAM_ADDR_FMT + "Size too large: %s: 0x" RAM_ADDR_FMT " > 0x" RAM_ADDR_FMT, block->idstr, newsize, block->max_length); return -EINVAL; From b1b0393c3c58c0e96c7c44e2e98baa252d6c6813 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 9 Nov 2020 08:53:04 -0500 Subject: [PATCH 6/6] pvpanic: Advertise the PVPANIC_CRASHLOADED event support Advertise both types of events as supported when the guest OS queries the pvpanic device. Currently only PVPANIC_PANICKED is exposed; PVPANIC_CRASHLOADED must also be advertised, but only on new machine types. Fixes: 7dc58deea79a ("pvpanic: implement crashloaded event handling") Reported-by: Alejandro Jimenez Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 1 + hw/misc/pvpanic.c | 5 ++++- tests/qtest/pvpanic-test.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 98b87f76cb..d0408049b5 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -35,6 +35,7 @@ GlobalProperty hw_compat_5_1[] = { { "virtio-blk-device", "num-queues", "1"}, { "virtio-scsi-device", "num_queues", "1"}, { "nvme", "use-intel-id", "on"}, + { "pvpanic", "events", "1"}, /* PVPANIC_PANICKED */ }; const size_t hw_compat_5_1_len = G_N_ELEMENTS(hw_compat_5_1); diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index 598d5471a4..35d6797831 100644 --- a/hw/misc/pvpanic.c +++ b/hw/misc/pvpanic.c @@ -61,12 +61,14 @@ struct PVPanicState { MemoryRegion io; uint16_t ioport; + uint8_t events; }; /* return supported events on read */ static uint64_t pvpanic_ioport_read(void *opaque, hwaddr addr, unsigned size) { - return PVPANIC_PANICKED; + PVPanicState *pvp = opaque; + return pvp->events; } static void pvpanic_ioport_write(void *opaque, hwaddr addr, uint64_t val, @@ -112,6 +114,7 @@ static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp) static Property pvpanic_isa_properties[] = { DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicState, ioport, 0x505), + DEFINE_PROP_UINT8("events", PVPanicState, events, PVPANIC_PANICKED | PVPANIC_CRASHLOADED), DEFINE_PROP_END_OF_LIST(), }; diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c index 0657de797f..016b32ebee 100644 --- a/tests/qtest/pvpanic-test.c +++ b/tests/qtest/pvpanic-test.c @@ -20,7 +20,7 @@ static void test_panic(void) qts = qtest_init("-device pvpanic"); val = qtest_inb(qts, 0x505); - g_assert_cmpuint(val, ==, 1); + g_assert_cmpuint(val, ==, 3); qtest_outb(qts, 0x505, 0x1);