- Jul 29, 2022
-
-
Ilya Leoshkevich authored
Currently QEMU exits with code 0 on both panic an shutdown. For tests it is useful to return 1 on panic, so that it counts as a test failure. Introduce a new exit-failure PanicAction that makes main() return EXIT_FAILURE. Tests can use -action panic=exit-failure option to activate this behavior. Signed-off-by:
Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20220725223746.227063-2-iii@linux.ibm.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
- Jul 20, 2022
-
-
Hyman Huang authored
Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit" to enable, disable, query dirty page limit for virtual CPU. Meanwhile, introduce corresponding hmp commands "set_vcpu_dirty_limit", "cancel_vcpu_dirty_limit", "info vcpu_dirty_limit" so the feature can be more usable. "query-vcpu-dirty-limit" success depends on enabling dirty page rate limit, so just add it to the list of skipped command to ensure qmp-cmd-test run successfully. Signed-off-by:
Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Acked-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Message-Id: <4143f26706d413dd29db0b672fe58b3d3fbe34bc.1656177590.git.huangy81@chinatelecom.cn> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Hyman Huang authored
Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is in service. Signed-off-by:
Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Reviewed-by:
Peter Xu <peterx@redhat.com> Message-Id: <977e808e03a1cef5151cae75984658b6821be618.1656177590.git.huangy81@chinatelecom.cn> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Hyman Huang authored
Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly for dirty page rate limit. Add dirtylimit.c to implement dirtyrate calculation periodly, which will be used for dirty page rate limit. Add dirtylimit.h to export util functions for dirty page rate limit implementation. Signed-off-by:
Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Reviewed-by:
Peter Xu <peterx@redhat.com> Message-Id: <5d0d641bffcb9b1c4cc3e323b6dfecb36050d948.1656177590.git.huangy81@chinatelecom.cn> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Zhang Chen authored
If the checkpoint occurs when the guest finishes restarting but has not started running, the runstate_set() may reject the transition from COLO to PRELAUNCH with the crash log: {"timestamp": {"seconds": 1593484591, "microseconds": 26605},\ "event": "RESET", "data": {"guest": true, "reason": "guest-reset"}} qemu-system-x86_64: invalid runstate transition: 'colo' -> 'prelaunch' Long-term testing says that it's pretty safe. Signed-off-by:
Like Xu <like.xu@linux.intel.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Acked-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Jul 13, 2022
-
-
Akihiko Odaki authored
Signed-off-by:
Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220624154042.51512-1-akihiko.odaki@gmail.com> [Rewrite shell function without using Bash extensions. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Akihiko Odaki authored
softmmu/datadir.c had its own implementation to find files in the build tree, but now bundle mechanism provides the unified implementation which works for datadir and the other files. Signed-off-by:
Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220624145039.49929-4-akihiko.odaki@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 12, 2022
-
-
Hanna Reitz authored
After writing the PID file, we register an exit notifier to unlink it when the process terminates. However, if the process has changed its working directory in the meantime (e.g. in os_setup_post() when daemonizing), this will not work when the PID file path was relative. Therefore, pass the absolute path (created with realpath()) to the unlink() call in the exit notifier. (realpath() needs a path pointing to an existing file, so we cannot use it before qemu_write_pidfile().) Reproducer: $ cd /tmp $ qemu-system-x86_64 --daemonize --pidfile qemu.pid $ file qemu.pid qemu.pid: ASCII text $ kill $(cat qemu.pid) $ file qemu.pid qemu.pid: ASCII text (qemu.pid should be gone after the process has terminated.) Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20220609122701.17172-4-hreitz@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Hanna Reitz authored
Currently, the exit notifier for unlinking the PID file is registered unconditionally. Limit it to only when we actually do create a PID file. Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20220609122701.17172-3-hreitz@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Jun 28, 2022
-
-
Guo Zhi authored
QEMU in some arch will crash when executing -vga help command, because there is no default vga model. Add check to this case and avoid crash. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/978 Signed-off-by:
Guo Zhi <qtxuning1999@sjtu.edu.cn> Reviewed-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20220503091724.970009-1-qtxuning1999@sjtu.edu.cn> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jun 27, 2022
-
-
Richard Henderson authored
Rename qemu_semihosting_connect_chardevs to qemu_semihosting_chardev_init; pass the result directly to qemu_semihosting_console_init. Store the chardev in SemihostingConsole instead of SemihostingConfig, which lets us drop semihosting_get_chardev. Reviewed-by:
Luc Michel <lmichel@kalray.eu> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Alexander Graf authored
We need to fetch the name of the current accelerator in flexible error messages more going forward. Let's create a helper that gives it to us without casting in the target code. Signed-off-by:
Alexander Graf <agraf@csgraf.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20220620192242.70573-1-agraf@csgraf.de Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Jun 21, 2022
-
-
Richard Henderson authored
The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_MASK, so that the call to iotlb_to_section using the xlat'ed address returns io_mem_unassigned, as desired by the translate_fail path. It is most useful to record the original physical page address, which will eventually be logged by memory_region_access_valid when the access is rejected by unassigned_mem_accepts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1065 Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <20220621153829.366423-1-richard.henderson@linaro.org>
-
- Jun 15, 2022
-
-
Jagannathan Raman authored
Determine the BARs used by the PCI device and register handlers to manage the access to the same. Signed-off-by:
Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by:
John G Johnson <john.g.johnson@oracle.com> Signed-off-by:
Jagannathan Raman <jag.raman@oracle.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 3373e10b5be5f42846f0632d4382466e1698c505.1655151679.git.jag.raman@oracle.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Jagannathan Raman authored
Add blocker to prevent hot-unplug of devices TYPE_VFIO_USER_SERVER, which is introduced shortly, attaches itself to a PCIDevice on which it depends. If the attached PCIDevice gets removed while the server in use, it could cause it crash. To prevent this, TYPE_VFIO_USER_SERVER adds an unplug blocker for the PCIDevice. Signed-off-by:
Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by:
John G Johnson <john.g.johnson@oracle.com> Signed-off-by:
Jagannathan Raman <jag.raman@oracle.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: c41ef80b7cc063314d629737bed2159e5713f2e0.1655151679.git.jag.raman@oracle.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 09, 2022
-
-
Jonathan Cameron authored
Whilst here take the oportunity to shorten the function name. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Ben Widawsky <ben@bwidawsk.net> Message-Id: <20220608145440.26106-4-Jonathan.Cameron@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jonathan Cameron authored
Paolo Bonzini requested this change to simplify the ongoing effort to allow machine setup entirely via RPC. Includes shortening the command line form cxl-fixed-memory-window to cxl-fmw as the command lines are extremely long even with this change. The json change is needed to ensure that there is a CXLFixedMemoryWindowOptionsList even though the actual element in the json is never used. Similar to existing SgxEpcProperties. Update qemu-options.hx to reflect that this is now a -machine parameter. The bulk of -M / -machine parameters are documented under machine, so use that in preference to M. Update cxl-test and bios-tables-test to reflect new parameters. Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by:
Ben Widawsky <ben@bwidawsk.net> Reviewed-by:
Davidlohr Bueso <dave@stgolabs.net> Message-Id: <20220608145440.26106-2-Jonathan.Cameron@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Jun 06, 2022
-
-
Xiaojuan Yang authored
Signed-off-by:
Xiaojuan Yang <yangxiaojuan@loongson.cn> Signed-off-by:
Song Gao <gaosong@loongson.cn> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220606124333.2060567-37-yangxiaojuan@loongson.cn> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Pavel Dovgalyuk authored
This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Acked-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <165364837856.688121.8785039478408995979.stgit@pasha-ThinkPad-X280> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgalyuk authored
vCPU execution should be suspended when new BH is scheduled. This is needed to avoid guest timeouts caused by the long cycles of the execution. In replay mode execution may hang when vCPU sleeps and block event comes to the queue. This patch adds notification which wakes up vCPU or interrupts execution of guest code. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> -- v2: changed first_cpu to current_cpu (suggested by Richard Henderson) v4: moved vCPU notification to aio_bh_enqueue (suggested by Paolo Bonzini) Message-Id: <165364837317.688121.17680519919871405281.stgit@pasha-ThinkPad-X280> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 03, 2022
-
-
Thomas Huth authored
We have "-sdl" and "-curses", but no "-gtk" and no "-cocoa" ... these old-style options are rather confusing than helpful nowadays. Now that the deprecation period is over, let's remove them, so we get a cleaner interface (where "-display" is the only way to select the user interface). Message-Id: <20220519155625.1414365-4-thuth@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
The "-display sdl" option still uses a hand-crafted parser for its parameters since we didn't want to drag an interface we considered somewhat flawed into the QAPI schema. Since the flaws are gone now, it's time to QAPIfy. This introduces the new "DisplaySDL" QAPI struct that is used to hold the parameters that are unique to the SDL display. The only specific parameter is currently "grab-mod" that is used to specify the required modifier keys to escape from the mouse grabbing mode. Message-Id: <20220519155625.1414365-3-thuth@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
Dropping these deprecated parameters simplifies further refactoring (e.g. QAPIfication is easier without underscores in the name). Message-Id: <20220519155625.1414365-2-thuth@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- May 14, 2022
-
-
Paolo Bonzini authored
-audio is used like "-audio pa,model=sb16". It is almost as simple as -soundhw, but it reuses the -audiodev parsing machinery and attaches an audiodev to the newly-created device. The main 'feature' is that it knows about adding the codec device for model=intel-hda, and adding the audiodev to the codec device. In the future, it could be extended to support default models or builtin devices, just like -nic, or even a default backend. For now, keep it simple. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This will allow processing "-audio model=help" even if the backend part of the option is missing. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 13, 2022
-
-
Jonathan Cameron authored
The concept of these is introduced in [1] in terms of the description the CEDT ACPI table. The principal is more general. Unlike once traffic hits the CXL root bridges, the host system memory address routing is implementation defined and effectively static once observable by standard / generic system software. Each CXL Fixed Memory Windows (CFMW) is a region of PA space which has fixed system dependent routing configured so that accesses can be routed to the CXL devices below a set of target root bridges. The accesses may be interleaved across multiple root bridges. For QEMU we could have fully specified these regions in terms of a base PA + size, but as the absolute address does not matter it is simpler to let individual platforms place the memory regions. ExampleS: -cxl-fixed-memory-window targets.0=cxl.0,size=128G -cxl-fixed-memory-window targets.0=cxl.1,size=128G -cxl-fixed-memory-window targets.0=cxl0,targets.1=cxl.1,size=256G,interleave-granularity=2k Specifies * 2x 128G regions not interleaved across root bridges, one for each of the root bridges with ids cxl.0 and cxl.1 * 256G region interleaved across root bridges with ids cxl.0 and cxl.1 with a 2k interleave granularity. When system software enumerates the devices below a given root bridge it can then decide which CFMW to use. If non interleave is desired (or possible) it can use the appropriate CFMW for the root bridge in question. If there are suitable devices to interleave across the two root bridges then it may use the 3rd CFMS. A number of other designs were considered but the following constraints made it hard to adapt existing QEMU approaches to this particular problem. 1) The size must be known before a specific architecture / board brings up it's PA memory map. We need to set up an appropriate region. 2) Using links to the host bridges provides a clean command line interface but these links cannot be established until command line devices have been added. Hence the two step process used here of first establishing the size, interleave-ways and granularity + caching the ids of the host bridges and then, once available finding the actual host bridges so they can be used later to support interleave decoding. [1] CXL 2.0 ECN: CEDT CFMWS & QTG DSM (computeexpresslink.org / specifications) Signed-off-by:
Jonathan Cameron <jonathan.cameron@huawei.com> Acked-by: Markus Armbruster <armbru@redhat.com> # QAPI Schema Message-Id: <20220429144110.25167-28-Jonathan.Cameron@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- May 12, 2022
-
-
Paolo Bonzini authored
error_report should generally be followed by a failure; if we can proceed anyway, that is just a warning and should be communicated properly to the user with warn_report. Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220511175043.27327-1-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This allows setting memory properties without going through vl.c, and have them validated just the same. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414165300.555321-6-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Handle HostMemoryBackend creation and setting of ms->ram entirely in machine_run_board_init. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414165300.555321-5-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Make -m syntactic sugar for a compound property "-machine mem.{size,max-size,slots}". The new property does not have the magic conversion to megabytes of unsuffixed arguments, and also does not understand that "0" means the default size (you have to leave it out to get the default). This means that we need to convert the QemuOpts by hand to a QDict. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414165300.555321-4-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Make -boot syntactic sugar for a compound property "-machine boot.{order,menu,...}". machine_boot_parse is replaced by the setter for the property. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414165300.555321-3-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
As part of converting -boot to a property with a QAPI type, define the struct and use it throughout QEMU to access boot configuration. machine_boot_parse takes care of doing the QemuOpts->QAPI conversion by hand, for now. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414165300.555321-2-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 09, 2022
-
-
Gautam Agrawal authored
A global boolean variable "vga_interface_created"(declared in softmmu/globals.c) has been used to track the creation of vga interface. If the vga flag is passed in the command line "default_vga"(declared in softmmu/vl.c) variable is set to 0. To warn user, the condition checks if vga_interface_created is false and default_vga is equal to 0. If "-vga none" is passed, this patch will not warn the user regarding the creation of VGA device. The warning "A -vga option was passed but this machine type does not use that option; no VGA device has been created" is logged if vga flag is passed but no vga device is created. This patch has been tested for x86_64, i386, sparc, sparc64 and arm boards. Signed-off-by:
Gautam Agrawal <gautamnagrawal@gmail.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/581 Message-Id: <20220501122505.29202-1-gautamnagrawal@gmail.com> [thuth: Fix wrong warning with "-device" in some cases as reported by Paolo] Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
The 'xenfb' parameter for the '-vga' command line option is currently always enabled unconditionally (since the xenfb is not a proper QOM device that could be tested via its class name). That means it also shows up if Xen is not enabled at all, e.g. like this: $ ./qemu-system-sparc -vga help none no graphic card xenfb Xen paravirtualized framebuffer tcx TCX framebuffer (default) cg3 CG3 framebuffer Let's avoid this situation by fencing the parameter with the CONFIG_XEN_BACKEND switch. Message-Id: <20220427123316.329312-1-thuth@redhat.com> Acked-by:
Anthony PERARD <anthony.perard@citrix.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Apr 28, 2022
-
-
Paolo Bonzini authored
Like -set and -readconfig, it would not really be too hard to extend -writeconfig to parsing mechanisms other than QemuOpts. However, the uses of -writeconfig are substantially more limited, as it is generally easier to write the configuration by hand in the first place. In addition, -writeconfig does not even try to detect cases where it prints incorrect syntax (for example if values have a quote in them, since qemu_config_parse does not support any kind of escaping. Just remove it. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414145721.326866-1-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Apr 21, 2022
-
-
Marc-André Lureau authored
Move them where they belong, since the functions are implemented in block-qdict.c. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-25-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Do not require the whole option machinery to handle keyval, as it is used by QAPI alone, without the option API. And match the associated unit name. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-24-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Suggested-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Warner Losh <imp@bsdimp.com> Message-Id: <20220420132624.2439741-7-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Move qemu_main() declaration to a new header. Simplify main.c since both cocoa & sdl cannot be enabled together. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Akihiko Odaki <akihiko.odaki@gmail.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-5-marcandre.lureau@redhat.com>
-
- Apr 20, 2022
-
-
Richard Henderson authored
Perform all logfile setup at startup in one step. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-31-richard.henderson@linaro.org>
-