- Jun 26, 2019
-
-
Antonio Ospite authored
The configure script breaks when the qemu source directory is in a path containing white spaces, in particular the list of targets is not correctly generated when calling "./configure --help" because of how the default_target_list variable is built. In addition to that, *building* qemu from a directory with spaces breaks some assumptions in the Makefiles, even if the original source path does not contain spaces like in the case of an out-of-tree build, or when symlinks are involved. To avoid these issues, refuse to run the configure script and the Makefile if there are spaces or colons in the source path or the build path, taking as inspiration what the kbuild system in linux does. Buglink: https://bugs.launchpad.net/qemu/+bug/1817345 Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Antonio Ospite <antonio.ospite@collabora.com> Message-Id: <20190526144747.30019-3-ao2@ao2.it> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jun 17, 2019
-
-
Peter Maydell authored
Now we have some rST format docs in the docs/specs/ manual, we should actually build and install it. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Acked-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Message-id: 20190610152444.20859-3-peter.maydell@linaro.org
-
- May 29, 2019
-
-
Marc-André Lureau authored
Add a vhost-user gpu backend, based on virtio-gpu/3d device. It is associated with a vhost-user-gpu device. Various TODO and nice to have items: - multi-head support - crash & resume handling - accelerated rendering/display that avoids the waiting round trips - edid support Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20190524130946.31736-6-marcandre.lureau@redhat.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- May 28, 2019
-
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Alex Bennée authored
Commit 337f2311 actually claimed to do this in the commit log but didn't actually. Oops. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
- May 22, 2019
-
-
Richard Henderson authored
For user-only, we require only the random number bits of the crypto subsystem. Rename crypto-aes-obj-y to crypto-user-obj-y, and add the random number objects, plus init.o to handle any extra stuff the crypto library requires. Move the crypto libraries from libs_softmmu and libs_tools to LIBS, so that they are universally used. Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Marc-André Lureau authored
Add a vhost-user input backend example, based on virtio-input-host device. It takes an evdev path as argument, and can be associated with a vhost-user-input device via a UNIX socket: $ vhost-user-input -p /dev/input/eventX -s /tmp/vui.sock $ qemu ... -chardev socket,id=vuic,path=/tmp/vui.sock -device vhost-user-input-pci,chardev=vuic This example is intentionally not included in $TOOLS, and not installed by default. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20190514104126.6294-4-marcandre.lureau@redhat.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- May 17, 2019
-
-
Laurent Vivier authored
Some objects are only needed for system emulation and tools. We can ignore them for the user mode case Update tests to run accordingly: conditionally build some tests on CONFIG_BLOCK. Some tests use components that are only built when softmmu or block tools are enabled, not for linux-user. So, if these components are not available, disable the tests. Signed-off-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20190401141222.30034-6-lvivier@redhat.com> Signed-off-by:
Laurent Vivier <lvivier@redhat.com>
-
Laurent Vivier authored
Move the dependency from SUBDIR_RULES to SOFTMMU_SUBDIR_RULES Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Laurent Vivier <lvivier@redhat.com> Message-Id: <20190401141222.30034-5-lvivier@redhat.com>
-
Laurent Vivier authored
When possible use generated-files-$(FLAG) to disable some targets (like KEYCODEMAP_FILES). Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Laurent Vivier <lvivier@redhat.com> Message-Id: <20190401141222.30034-3-lvivier@redhat.com>
-
- May 13, 2019
-
-
Thomas Huth authored
The Makefile tries to include device Kconfig dependencies via -include $(SUBDIR_DEVICES_MAK_DEP) and thus expects files that match *-softmmu/config-devices.mak.d ... however, the minikconf script currently generates files a la "*-softmmu-config.devices.mak.d" instead, so the dependency files simply got ignored so far. For example, after a "touch hw/arm/Kconfig", the arm-softmmu/config-devices.mak file is currently not re-generated. Fix it by putting the dependency files in the *-softmmu folders now. Reported-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- May 10, 2019
-
-
Stefan Hajnoczi authored
This new chapter in the QEMU documentation covers the security requirements that QEMU is designed to meet and principles for securely deploying QEMU. It is just a starting point that can be extended in the future with more information. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Acked-by:
Stefano Garzarella <sgarzare@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Message-id: 20190509121820.16294-3-stefanha@redhat.com Message-Id: <20190509121820.16294-3-stefanha@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- May 03, 2019
-
-
Philippe Mathieu-Daudé authored
Commit 48ff7a62 added the QEMU Guest Agent tool with the optional ".exe" suffix for Windows hosts, but forgot to use this suffix in the 'clean' rule. Calling this rule let a dangling executable in the build directory. Correct this by using the proper optional suffix. Fixes: 48ff7a62 Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Stefan Weil <sw@weilnetz.de> Message-Id: <20190427161322.24642-1-philmd@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Marc-André Lureau authored
Use a CONFDIR variable to show the configured sysconf path in the generated documentations (html, man pages etc). Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1644985 Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20181126105125.30973-1-marcandre.lureau@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- May 02, 2019
-
-
Marc-André Lureau authored
CFLAGS/LDFLAGS have debug and sanitizers flags, which should be passed to slirp compilation. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190424110041.8175-2-marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- May 01, 2019
-
-
John Snow authored
If we add references that don't resolve (or accidentally remove them), it will be helpful to have warning messages alerting us to that. Further, turn those warnings into errors so we can be alerted to these problems sooner rather than later. Signed-off-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190426221528.30293-2-jsnow@redhat.com [adjusted commit message. --js] Signed-off-by:
John Snow <jsnow@redhat.com>
-
- Apr 17, 2019
-
-
Laszlo Ersek authored
Decompress and install the edk2 firmware blobs as part of "make install", unless blob installation was disabled with configure's "--disable-blobs" option. Additionally, decompress the blobs as a pre-requisite for building softmmu binaries -- this is helpful for both "make check" and other ad-hoc tests one might want to run in the build directory. Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
- Mar 20, 2019
-
-
Paolo Bonzini authored
This ensures that softmmu directories are culled after a "./configure --target-list=x86_64-linux-user". Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 18, 2019
-
-
Paolo Bonzini authored
For devices that require msi_init/msix_init to succeed, add a dependency on CONFIG_MSI_NONBROKEN. This will prevent those devices from appearing in a binary that cannot instantiate them. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 13, 2019
-
-
Xie Yongji authored
This patch adds support for VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD message to set/get shared buffer to/from qemu. Then backend can track inflight I/O in this buffer. Signed-off-by:
Xie Yongji <xieyongji@baidu.com> Signed-off-by:
Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190228085355.9614-5-xieyongji@baidu.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Mar 12, 2019
-
-
Alex Bennée authored
Best to be explicit about where to find things. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
Alex Bennée authored
In an out-of-tree build gcovr can get quite confused about what is going on otherwise. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
- Mar 11, 2019
-
-
Peter Maydell authored
If we're doing an out-of-tree build of Sphinx, then we copy some extra spurious files to the install directory as part of 'make install': qemu-ga-qapi.texi qemu-ga-ref.7 qemu-ga-ref.7.pod qemu-ga-ref.html qemu-ga-ref.txt qemu-qmp-qapi.texi qemu-qmp-ref.7 qemu-qmp-ref.7.pod qemu-qmp-ref.html qemu-qmp-ref.txt because these have been built into build/docs/interop along with the Sphinx interop documents. Filter them out of the set of files we install when we're installing the Sphinx-built manual files. (They are installed into their correct locations as part of the main install-doc target already.) Fixes: 5f71eac0 ("Makefile, configure: Support building rST documentation") Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190308135744.6480-4-peter.maydell@linaro.org
-
Peter Maydell authored
We forgot the '-r' option on the rm command to clean up the Sphinx .doctrees working directory, which meant that "make distclean" fails: rm: cannot remove '.doctrees': Is a directory Add the missing option. Fixes: 5f71eac0 ("Makefile, configure: Support building rST documentation") Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190308135744.6480-3-peter.maydell@linaro.org
-
Peter Maydell authored
The Sphinx build-sphinx tool does not permit building a manual into the same directory as its source files. This meant that commit 5f71eac0 broke QEMU in-source-tree builds, which would fail with: Error: source directory and destination directory are same. Fix this by making in-tree builds build the Sphinx manuals into a subdirectory of docs/. Fixes: 5f71eac0 ("Makefile, configure: Support building rST documentation") Reported-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190308135744.6480-2-peter.maydell@linaro.org
-
- Mar 07, 2019
-
-
Paolo Bonzini authored
Apart from defconfig (which is a no-op), allyesconfig/allnoconfig/randcondfig can be implemented simply by ignoring the RHS of assignments and "default" statements. The RHS is replaced respectively by "true", "false" or a random value. However, allyesconfig and randconfig do not quite work, because all the files for hw/ARCH/Kconfig are sourced and therefore you could end up enabling some ARM boards in x86 or things like that. This is left for future work, but I am leaving it in to help debugging minikconf itself. allnoconfig mode is tied to a new configure option, --without-default-devices. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The make_device_config.sh script is replaced by minikconf, which is modified to support the same command line as its predecessor. The roots of the parsing are default-configs/*.mak, Kconfig.host and hw/Kconfig. One difference with make_device_config.sh is that all symbols have to be defined in a Kconfig file, including those coming from the configure script. This is the reason for the Kconfig.host file introduced in the previous patch. Whenever a file in default-configs/*.mak used $(...) to refer to a config-host.mak symbol, this is replaced by a Kconfig dependency; this part must be done already in this patch for bisectability. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Yang Zhong <yang.zhong@intel.com> Acked-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20190123065618.3520-28-yang.zhong@intel.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Maydell authored
Don't hard-code the QEMU version number into conf.py. Instead we either pass it to sphinx-build on the command line, or (if doing a standalone Sphinx run in a readthedocs.org setup) extract it from the VERSION file. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20190305172139.32662-12-peter.maydell@linaro.org Message-id: 20190228145624.24885-12-peter.maydell@linaro.org
-
Peter Maydell authored
Abstract out the "identify the pkgversion" code from the rule for creating qemu-version.h, so it sets makefile variables for QEMU_PKGVERSION and QEMU_FULL_VERSION. (We will want to use these when building the Sphinx docs.) NB: As we abstract this out, we use -e to check for .git rather than -d, since in some situations .git may be a file rather than a directory. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20190305172139.32662-11-peter.maydell@linaro.org Message-id: 20190228145624.24885-11-peter.maydell@linaro.org
-
Peter Maydell authored
Add support to our configure and makefile machinery for building our rST docs into HTML files. Building the documentation now requires that sphinx-build is available; this seems better than allowing half the docs to be built if it is not present but having half of them missing. (In particular it means that assuming that distros configured with --enable-docs they'll get a helpful error from configure telling them the new build dependency.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20190305172139.32662-10-peter.maydell@linaro.org Message-id: 20190228145624.24885-10-peter.maydell@linaro.org
-
Marc-André Lureau authored
Use the "system" libslirp if its present or requested. Else build with a static libslirp.a if slirp/ is checked out ("internal") or a submodule ("git"). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-7-marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Feb 26, 2019
-
-
Daniel P. Berrangé authored
The current qemu_acl module provides a simple access control list facility inside QEMU, which is used via a set of monitor commands acl_show, acl_policy, acl_add, acl_remove & acl_reset. Note there is no ability to create ACLs - the network services (eg VNC server) were expected to create ACLs that they want to check. There is also no way to define ACLs on the command line, nor potentially integrate with external authorization systems like polkit, pam, ldap lookup, etc. The QAuthZ object defines a minimal abstract QOM class that can be subclassed for creating different authorization providers. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Daniel P. Berrange <berrange@redhat.com>
-
- Feb 21, 2019
-
-
Laszlo Ersek authored
The roms/edk2 submodule can help with three goals: - build the OVMF and ArmVirtQemu virtual UEFI firmware platforms (to be implemented later), - build the EfiRom tool on the fly, which is used in roms/Makefile, for building the "efirom" target, - build UEFI test applications (to be run in guests), for qtest support. Edk2 commit 85588389222a3636baf0f9ed8227f2434af4c3f9 stands for the latest "stable tag", namely "edk2-stable201811". The edk2 repository tracks some binary files that should not be removed by QEMU's top-level "make clean"; exempt the full pathnames from the "find" command. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Shannon Zhao <shannon.zhaosl@gmail.com> Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20190204160325.4914-2-lersek@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
- Feb 18, 2019
-
-
Markus Armbruster authored
Adding QAPI's .o to util-obj-y, common-obj-y and obj-y is spread over three places: Makefile.objs takes care of target-independent generated code, Makefile.target of target-dependent generated code, and qapi/Makefile.objs of (target-independent) hand-written code. Do everything in qapi/Makefile.objs. Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190214152251.2073-8-armbru@redhat.com>
-
Markus Armbruster authored
Having to include qapi-events.h just for QAPIEvent is suboptimal, but quite tolerable now. It'll become problematic when we have events conditional on the target, because then qapi-events.h won't be usable from target-independent code anymore. Avoid that by generating it into separate files. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190214152251.2073-6-armbru@redhat.com>
-
- Feb 05, 2019
-
-
Viktor Prutyanov authored
After this patch contrib/elf2dmp can be built for Windows x86 and x86_64 hosts by mingw. Signed-off-by:
Viktor Prutyanov <viktor.prutyanov@phystech.edu> Message-Id: <20181220012441.13694-7-viktor.prutyanov@phystech.edu> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Stefano Garzarella authored
The new pvh.bin option rom can be used with SeaBIOS to boot uncompressed kernel using the x86/HVM direct boot ABI. pvh.S contains the entry point of the option rom. It runs in real mode, loads the e820 table querying the BIOS, and then it switches to 32bit protected mode and jumps to the pvh_load_kernel() written in pvh_main.c. pvh_load_kernel() loads the cmdline and kernel entry_point using fw_cfg, then it looks for RSDP, fills the hvm_start_info required by x86/HVM ABI, and finally jumps to the kernel entry_point. Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Liam Merwick <liam.merwick@oracle.com>
-
- Jan 30, 2019
-
-
Stefan Hajnoczi authored
Autogenerated code in trace.h/trace.c and friends is specific to the config-host.mak TRACE_BACKENDS setting and must be regenerated when ./configure --enable-trace-backend= changes settings. This patch ensures that changes to TRACE_BACKENDS are detected. For example, the trace-root.h file is now updated after switching trace backends: $ ./configure && make $ cp trace-root.h /tmp/old-trace-root.h $ ./configure --enable-trace-backend=simple && make $ diff -u /tmp/old-trace-root.h trace-root.h Reported-by:
Christophe Lyon <christophe.lyon@st.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-id: 20190129025343.4788-1-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jan 24, 2019
-
-
Daniel P. Berrangé authored
The dtrace systemtap trace backend for QEMU is very powerful but it is also somewhat unfriendly to users who aren't familiar with systemtap, or who don't need its power right now. stap -e "....some strange script...." The 'log' backend for QEMU by comparison is very crude but incredibly easy to use: $ qemu -d trace:qio* ...some args... 23266@1547735759.137292:qio_channel_socket_new Socket new ioc=0x563a8a39d400 23266@1547735759.137305:qio_task_new Task new task=0x563a891d0570 source=0x563a8a39d400 func=0x563a86f1e6c0 opaque=0x563a89078000 23266@1547735759.137326:qio_task_thread_start Task thread start task=0x563a891d0570 worker=0x563a86f1ce50 opaque=0x563a891d9d90 23273@1547735759.137491:qio_task_thread_run Task thread run task=0x563a891d0570 23273@1547735759.137503:qio_channel_socket_connect_sync Socket connect sync ioc=0x563a8a39d400 addr=0x563a891d9d90 23273@1547735759.138108:qio_channel_socket_connect_fail Socket connect fail ioc=0x563a8a39d400 This commit introduces a way to do simple printf style logging of probe points using systemtap. In particular it creates another set of tapsets, one per emulator: /usr/share/systemtap/tapset/qemu-*-log.stp These pre-define probe functions which simply call printf() on their arguments. The printf() format string is taken from the normal trace-events files, with a little munging to the format specifiers to cope with systemtap's more restrictive syntax. With this you can now do $ stap -e 'probe qemu.system.x86_64.log.qio*{}' 22806@1547735341399856820 qio_channel_socket_new Socket new ioc=0x56135d1d7c00 22806@1547735341399862570 qio_task_new Task new task=0x56135cd66eb0 source=0x56135d1d7c00 func=0x56135af746c0 opaque=0x56135bf06400 22806@1547735341399865943 qio_task_thread_start Task thread start task=0x56135cd66eb0 worker=0x56135af72e50 opaque=0x56135c071d70 22806@1547735341399976816 qio_task_thread_run Task thread run task=0x56135cd66eb0 We go one step further though and introduce a 'qemu-trace-stap' tool to make this even easier $ qemu-trace-stap run qemu-system-x86_64 'qio*' 22806@1547735341399856820 qio_channel_socket_new Socket new ioc=0x56135d1d7c00 22806@1547735341399862570 qio_task_new Task new task=0x56135cd66eb0 source=0x56135d1d7c00 func=0x56135af746c0 opaque=0x56135bf06400 22806@1547735341399865943 qio_task_thread_start Task thread start task=0x56135cd66eb0 worker=0x56135af72e50 opaque=0x56135c071d70 22806@1547735341399976816 qio_task_thread_run Task thread run task=0x56135cd66eb0 This tool is clever in that it will automatically change the SYSTEMTAP_TAPSET env variable to point to the directory containing the right set of probes for the QEMU binary path you give it. This is useful if you have QEMU installed in /usr but are trying to test and trace a binary in /home/berrange/usr/qemu-git. In that case you'd do $ qemu-trace-stap run /home/berrange/usr/qemu-git/bin/qemu-system-x86_64 'qio*' And it'll make sure /home/berrange/usr/qemu-git/share/systemtap/tapset is used for the trace session The 'qemu-trace-stap' script takes a verbose arg so you can understand what it is running $ qemu-trace-stap run /home/berrange/usr/qemu-git/bin/qemu-system-x86_64 'qio*' Using tapset dir '/home/berrange/usr/qemu-git/share/systemtap/tapset' for binary '/home/berrange/usr/qemu-git/bin/qemu-system-x86_64' Compiling script 'probe qemu.system.x86_64.log.qio* {}' Running script, <Ctrl>-c to quit ...trace output... It can enable multiple probes at once $ qemu-trace-stap run qemu-system-x86_64 'qio*' 'qcrypto*' 'buffer*' By default it monitors all existing running processes and all future launched proceses. This can be restricted to a specific PID using the --pid arg $ qemu-trace-stap run --pid 2532 qemu-system-x86_64 'qio*' Finally if you can't remember what probes are valid it can tell you $ qemu-trace-stap list qemu-system-x86_64 ahci_check_irq ahci_cmd_done ahci_dma_prepare_buf ahci_dma_prepare_buf_fail ahci_dma_rw_buf ahci_irq_lower ...snip... Or list just those matching a prefix pattern $ qemu-trace-stap list -v qemu-system-x86_64 'qio*' Using tapset dir '/home/berrange/usr/qemu-git/share/systemtap/tapset' for binary '/home/berrange/usr/qemu-git/bin/qemu-system-x86_64' Listing probes with name 'qemu.system.x86_64.log.qio*' qio_channel_command_abort qio_channel_command_new_pid qio_channel_command_new_spawn qio_channel_command_wait qio_channel_file_new_fd ...snip... Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Message-id: 20190123120016.4538-5-berrange@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jan 21, 2019
-
-
Eric Blake authored
The next commit will add an EXAMPLES section to qemu-nbd.8; for that to work, we need to recognize EXAMPLES in texi2pod. We also need to add a dependency from all man pages against the generator script, since a change to the generator may cause the resulting man page to differ. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Richard W.M. Jones <rjones@redhat.com> Message-Id: <20190117193658.16413-3-eblake@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
-