- Dec 15, 2020
-
-
Paolo Bonzini authored
machine_init_done is not the right flag to check when preconfig is taken into account; for example "./qemu-system-x86_64 -serial mon:stdio -preconfig" does not print the QEMU monitor header until after exit_preconfig. Add back a custom bool for mux character devices. This partially undoes commit c7278b43 ("chardev: introduce chr_machine_done hook", 2018-03-12), but it keeps the cleaner logic using a function pointer in ChardevClass. Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The preconfig state is only used if -incoming is not specified, which makes the RunState state machine more tricky than it need be. However there is already an equivalent condition which works even with -incoming, namely qdev_hotplug. Use it instead of a separate runstate. Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Nov 16, 2020
-
-
David Hildenbrand authored
Currently, when using "nvme://" for a block device, like -drive file=nvme://0000:01:00.0/1,if=none,id=drive0 \ -device virtio-blk,drive=drive0 \ VFIO may pin all guest memory, and discarding of RAM no longer works as expected. I was able to reproduce this easily with my 01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 Similar to common VFIO, we have to disable it, making sure that: a) virtio-balloon won't discard any memory ("silently disabled") b) virtio-mem and nvme:// run mutually exclusive Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Wei Yang <richardw.yang@linux.intel.com> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com> Cc: Peter Xu <peterx@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20201116105947.9194-1-david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
We should never build something that calls this without having it. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201110192316.26397-6-alex.bennee@linaro.org>
-
- Oct 23, 2020
-
-
Stefan Hajnoczi authored
Block exports are used by softmmu, qemu-storage-daemon, and qemu-nbd. They are not used by other programs and are not otherwise needed in libblock. Undo the recent move of blockdev-nbd.c from blockdev_ss into block_ss. Since bdrv_close_all() (libblock) calls blk_exp_close_all() (libblockdev) a stub function is required.. Make qemu-nbd.c use signal handling utility functions instead of duplicating the code. This helps because os-posix.c is in libblockdev and it depends on a qemu_system_killed() symbol that qemu-nbd.c lacks. Once we use the signal handling utility functions we also end up providing the necessary symbol. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20200929125516.186715-4-stefanha@redhat.com [Fixed s/ndb/nbd/ typo in commit description as suggested by Eric Blake --Stefan] Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Oct 22, 2020
-
-
Claudio Fontana authored
this fixes non-TCG builds broken recently by replay reverse debugging. Stub the needed functions in stub/, splitting roughly between functions needed only by system emulation, by system emulation and tools, and by everyone. This includes duplicating some code in replay/, and puts the logic for non-replay related events in the replay/ module (+ the stubs), so this should be revisited in the future. Surprisingly, only _one_ qtest was affected by this, ide-test.c, which resulted in a buzz as the bh events were never delivered, and the bh never executed. Many other subsystems _should_ have been affected. This fixes the immediate issue, however a better way to group replay functionality to TCG-only code could be developed in the long term. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Message-Id: <20201013192123.22632-4-cfontana@suse.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 09, 2020
-
-
Kevin Wolf authored
This way, a monitor command handler will still be able to access the current monitor, but when it yields, all other code code will correctly get NULL from monitor_cur(). This uses a hash table to map the coroutine pointer to the current monitor of that coroutine. Outside of coroutine context, we associate the current monitor with the leader coroutine of the current thread. Approaches to implement some form of coroutine local storage directly in the coroutine core code have been considered and discarded because they didn't end up being much more generic than the hash table and their performance impact on coroutines not using coroutine local storage was unclear. As the block layer uses a coroutine per I/O request, this is a fast path and we have to be careful. It's safest to just stay out of this path with code only used by the monitor. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20201005155855.256490-8-kwolf@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Kevin Wolf authored
The correct way to set the current monitor for a coroutine handler will be different than for a blocking handler, so monitor_set_cur() needs to be called in qmp_dispatch(). Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-7-kwolf@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Kevin Wolf authored
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove all direct accesses to cur_mon so that we can implement this in the getter function later. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-4-kwolf@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Oct 06, 2020
-
-
Pavel Dovgaluk authored
This patch adds support of the reverse continue operation for gdbstub. Reverse continue finds the last breakpoint that would happen in normal execution from the beginning to the current moment. Implementation of the reverse continue replays the execution twice: to find the breakpoints that were hit and to seek to the last breakpoint. Reverse continue loads the previous snapshot and tries to find the breakpoint since that moment. If there are no such breakpoints, it proceeds to the earlier snapshot, and so on. When no breakpoints or watchpoints were hit at all, execution stops at the beginning of the replay log. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Message-Id: <160174522930.12451.6994758004725016836.stgit@pasha-ThinkPad-X280> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
GDB remote protocol supports two reverse debugging commands: reverse step and reverse continue. This patch adds support of the first one to the gdbstub. Reverse step is intended to step one instruction in the backwards direction. This is not possible in regular execution. But replayed execution is deterministic, therefore we can load one of the prior snapshots and proceed to the desired step. It is equivalent to stepping one instruction back. There should be at least one snapshot preceding the debugged part of the replay log. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> -- v4 changes: - inverted condition in cpu_handle_guest_debug (suggested by Alex Bennée) Message-Id: <160174522341.12451.1498758422543765253.stgit@pasha-ThinkPad-X280> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgalyuk authored
Saving icount as a parameters of the snapshot allows navigation between them in the execution replay scenario. This information can be used for finding a specific snapshot for proceeding the recorded execution to the specific moment of the time. E.g., 'reverse step' action (introduced in one of the following patches) needs to load the nearest snapshot which is prior to the current moment of time. This patch also updates snapshot test which verifies qemu monitor output. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Acked-by:
Markus Armbruster <armbru@redhat.com> Acked-by:
Kevin Wolf <kwolf@redhat.com> -- v4 changes: - squashed format update with test output update v7 changes: - introduced the spaces between the fields in snapshot info output - updated the test to match new field widths Message-Id: <160174518865.12451.14327573383978752463.stgit@pasha-ThinkPad-X280> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 05, 2020
-
-
Claudio Fontana authored
The new interface starts unused, will start being used by the next patches. It provides methods for each accelerator to start a vcpu, kick a vcpu, synchronize state, get cpu virtual clock and elapsed ticks. In qemu_wait_io_event, make it clear that APC is used only for HAX on Windows. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
refactoring of cpus.c continues with cpu timer state extraction. cpu-timers: responsible for the softmmu cpu timers state, including cpu clocks and ticks. icount: counts the TCG instructions executed. As such it is specific to the TCG accelerator. Therefore, it is built only under CONFIG_TCG. One complication is due to qtest, which uses an icount field to warp time as part of qtest (qtest_clock_warp). In order to solve this problem, provide a separate counter for qtest. This requires fixing assumptions scattered in the code that qtest_enabled() implies icount_enabled(), checking each specific case. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> [remove redundant initialization with qemu_spice_init] Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> [fix lingering calls to icount_get] Signed-off-by:
Claudio Fontana <cfontana@suse.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 30, 2020
-
-
Philippe Mathieu-Daudé authored
xen_hvm_init() is restricted to the X86 architecture. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200908155530.249806-6-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Move hardware stubs unrelated from the accelerator to xen-hw-stub.c. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200908155530.249806-5-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 29, 2020
-
-
Philippe Mathieu-Daudé authored
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Restricting the query-uuid command to machine.json pulls less QAPI-generated code into user-mode. Acked-by:
Markus Armbruster <armbru@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200913195348.1064154-6-philmd@redhat.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Philippe Mathieu-Daudé authored
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Restricting the query-vm-generation-id command to machine.json pulls less QAPI-generated code into user-mode. Acked-by:
Igor Mammedov <imammedo@redhat.com> Acked-by:
Markus Armbruster <armbru@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200913195348.1064154-5-philmd@redhat.com> [Commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Sep 16, 2020
-
-
Daniel P. Berrangé authored
Currently code has to call monitor_fdset_get_fd, then dup the return fd, and then add the duplicate FD back into the fdset. This dance is overly verbose for the caller and introduces extra failure modes which can be avoided by folding all the logic into monitor_fdset_dup_fd_add and removing monitor_fdset_get_fd entirely. Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Sep 07, 2020
-
-
Thomas Huth authored
The linker of MinGW sometimes runs into the following problem: libqemuutil.a(util_main-loop.c.obj): In function `qemu_fd_register': /builds/huth/qemu/build/../util/main-loop.c:331: multiple definition of `qemu_fd_register' libqemuutil.a(stubs_fd-register.c.obj):/builds/huth/qemu/stubs/fd-register.c:5: first defined here collect2: error: ld returned 1 exit status /builds/huth/qemu/rules.mak:88: recipe for target 'tests/test-timed-average.exe' failed qemu_fd_register() is defined in util/main-loop.c for WIN32, so let's simply move the stub also there in the #else part of the corresponding #ifndef to fix this problem. Message-Id: <20200903054503.425435-1-thuth@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
When cross-compiling with MinGW, there are sometimes some weird linker errors like: ibqemuutil.a(util_main-loop.c.obj): In function `qemu_notify_event': /builds/huth/qemu/build/../util/main-loop.c:139: multiple definition of `qemu_notify_event' libqemuutil.a(stubs_notify-event.c.obj):/builds/huth/qemu/stubs/notify-event.c:5: first defined here collect2: error: ld returned 1 exit status /builds/huth/qemu/rules.mak:88: recipe for target 'tests/test-timed-average.exe' failed It seems like it works better when the qemu_timer_notify_cb() stub (which calls qemu_notify_event()) is in a separate file - then we can also even remove the qemu_notify_event() stub now. This patch is based on ideas from the patch "stubs: Remove qemu_notify_event()" by Philippe Mathieu-Daudé and the patch "cpu-timers, icount: new modules" from Claudio Fontana. Message-Id: <20200902102433.304737-1-thuth@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Sep 01, 2020
-
-
Philippe Mathieu-Daudé authored
cmos_get_fd_drive_type() is declared in "hw/block/fdc.h". This currently works because "hw/i386/pc.h" happens to include it. Simplify including the correct header. Fixes: 2055dbc1 ("acpi: move aml builder code for floppy device") Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
John Snow <jsnow@redhat.com> Message-Id: <20200724084315.1606-1-f4bug@amsat.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Aug 21, 2020
-
-
Paolo Bonzini authored
This shows how to do some "computations" in meson.build using its array and dictionary data structures, and also a basic usage of the sourceset module for conditional compilation. Notice the new "if have_system" part of util/meson.build, which fixes a bug in the old build system was buggy: util/dbus.c was built even for non-softmmu builds, but the dependency on -lgio was lost when the linking was done through libqemuutil.a. Because all of its users required gio otherwise, the bug was hidden. Meson instead propagates libqemuutil's dependencies down to its users, and shows the problem. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 24, 2020
-
-
Markus Armbruster authored
This reverts commit d10e05f1. We report some -tpmdev failures, but then continue as if all was fine. Reproducer: $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -chardev null,id=tpm0 -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0 qemu-system-x86_64: -tpmdev emulator,id=tpm0,chardev=chrtpm: tpm-emulator: tpm chardev 'chrtpm' not found. qemu-system-x86_64: -tpmdev emulator,id=tpm0,chardev=chrtpm: tpm-emulator: Could not cleanly shutdown the TPM: No such file or directory QEMU 5.0.90 monitor - type 'help' for more information (qemu) qemu-system-x86_64: -device tpm-tis,tpmdev=tpm0: Property 'tpm-tis.tpmdev' can't find value 'tpm0' $ echo $? 1 This is a regression caused by commit d10e05f1 "tpm: Clean up error reporting in tpm_init_tpmdev()". It's incomplete: be->create(opts) continues to use error_report(), and we don't set an error when it fails. I figure converting the create() methods to Error would make some sense, but I'm not sure it's worth the effort right now. Revert the broken commit instead, and add a comment to tpm_init_tpmdev(). Straightforward conflict in tpm.c resolved. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Stefan Berger <stefanb@linux.ibm.com> Signed-off-by:
Stefan Berger <stefanb@linux.ibm.com>
-
- Jul 07, 2020
-
-
Christophe de Dinechin authored
The vmgenid.o is the only file that is not in alphabetical order. Signed-off-by:
Christophe de Dinechin <dinechin@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200629094934.2081180-1-dinechin@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jul 06, 2020
-
-
Gerd Hoffmann authored
Needed for -soundhw cleanup. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200702132525.6849-3-kraxel@redhat.com
-
Gerd Hoffmann authored
Needed for -soundhw cleanup. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200702132525.6849-2-kraxel@redhat.com
-
- Jun 24, 2020
-
-
Gerd Hoffmann authored
DSDT change: isa device order changes in case MI1 (ipmi) is present. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Message-Id: <20200619091905.21676-4-kraxel@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Jun 12, 2020
-
-
Paolo Bonzini authored
Keep them close to the other accelerator-dependent stubs, so as to remove stubs that are not needed by tools. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 10, 2020
-
-
Philippe Mathieu-Daudé authored
This code is not related to hardware emulation. Move it under accel/ with the other hypervisors. Reviewed-by:
Paul Durrant <paul@xen.org> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200508100222.7112-1-philmd@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
We use the Object type all over the place. Forward declare it in "qemu/typedefs.h". Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200504115656.6045-2-f4bug@amsat.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 05, 2020
-
-
Philippe Mathieu-Daudé authored
In Makefile.objs, the ui/ directory is restricted to system-mode: 43 ifeq ($(CONFIG_SOFTMMU),y) ... 65 common-obj-y += ui/ 66 common-obj-m += ui/ ... 82 endif # CONFIG_SOFTMMU Restrict the ui/ stub added in commit 2df9f571 to only build it for system-mode emulation. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200522172510.25784-14-philmd@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Philippe Mathieu-Daudé authored
These stubs are not required when configured with --disable-system. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Tested-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200522172510.25784-7-philmd@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- May 19, 2020
-
-
Volker Rümelin authored
Import win32 keyboard hooking code from project spice-gtk. This patch removes the extra left control key up/down input events inserted by Windows for the right alt key up/down input events with international keyboard layouts. Additionally there's some code to grab the keyboard. The next patches will use this code. Only Windows needs this. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-1-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- May 18, 2020
-
-
Gerd Hoffmann authored
This reverts commit f79081b4. Patch has broken byteorder handling: RAMFBCfg fields are in bigendian byteorder, the reset function doesn't care so native byteorder is used instead. Given this went unnoticed so far the feature is obviously unused, so just revert the patch. Cc: Hou Qiming <hqm03ster@gmail.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Acked-by:
Laszlo Ersek <lersek@redhat.com> Message-id: 20200429115236.28709-2-kraxel@redhat.com
-
- Mar 06, 2020
-
-
Kevin Wolf authored
Trying to attach a HMP monitor to a chardev that is already in use results in a crash because monitor_init_hmp() passes &error_abort to qemu_chr_fe_init(): $ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo --mon foo QEMU 4.2.50 monitor - type 'help' for more information (qemu) Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220: qemu-system-x86_64: --mon foo: Device 'foo' is in use Abgebrochen (Speicherabzug geschrieben) Fix this by allowing monitor_init_hmp() to return an error and passing any error in qemu_chr_fe_init() to its caller instead of aborting. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-19-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Trying to attach a QMP monitor to a chardev that is already in use results in a crash because monitor_init_qmp() passes &error_abort to qemu_chr_fe_init(): $ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo,mode=control --mon foo,mode=control Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220: qemu-system-x86_64: --mon foo,mode=control: Device 'foo' is in use Abgebrochen (Speicherabzug geschrieben) Fix this by allowing monitor_init_qmp() to return an error and passing any error in qemu_chr_fe_init() to its caller instead of aborting. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-18-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Before we can add the monitor to qemu-storage-daemon, we need to add a stubs for monitor_fdsets_cleanup(). We also need to make sure that stubs that are actually implemented in the monitor core aren't linked to qemu-storage-daemon so that we don't get linker errors because of duplicate symbols. This is achieved by moving the stubs in question to a new file stubs/monitor-core.c. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-15-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
blockdev.c uses the arch_type constant, so before we can use the file in tools (i.e. outside of the system emulator), we need to add a stub for it. A new QEMU_ARCH_NONE is introduced for this case. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-3-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-