Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/stsquad/tags/pull-rc3-testing-a…
Browse files Browse the repository at this point in the history
…nd-tcg-201119-1' into staging

A few test and doc fixes:

  - tweak DEBUG behaviour for vm-test-build
  - rename and update plug docs for versioning
  - slim down MAIN_SOFTMMU_TARGETS

# gpg: Signature made Wed 20 Nov 2019 10:56:23 GMT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <[email protected]>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-rc3-testing-and-tcg-201119-1:
  tests/tcg: modify multiarch tests to work with clang
  .travis.yml: drop 32 bit systems from MAIN_SOFTMMU_TARGETS
  docs/devel: update tcg-plugins.rst with API versioning details
  docs/devel: rename plugins.rst to tcg-plugins.rst
  tests/vm: make --interactive (and therefore DEBUG=1) unconditional

Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
pm215 committed Nov 21, 2019
2 parents bf12043 + 22c30b2 commit 7b54253
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ env:
- BASE_CONFIG="--disable-docs --disable-tools"
- TEST_CMD="make check V=1"
# This is broadly a list of "mainline" softmmu targets which have support across the major distros
- MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
- MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
- CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
- CCACHE_MAXSIZE=1G

Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2371,6 +2371,7 @@ F: tcg/
TCG Plugins
M: Alex Bennée <[email protected]>
S: Maintained
F: docs/devel/tcg-plugins.rst
F: plugins/
F: tests/plugin

Expand Down
2 changes: 1 addition & 1 deletion docs/devel/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Contents:
decodetree
secure-coding-practices
tcg
plugins
tcg-plugins
27 changes: 21 additions & 6 deletions docs/devel/plugins.rst → docs/devel/tcg-plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ process. However the project reserves the right to change or break the
API should it need to do so. The best way to avoid this is to submit
your plugin upstream so they can be updated if/when the API changes.

API versioning
--------------

All plugins need to declare a symbol which exports the plugin API
version they were built against. This can be done simply by::

QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;

The core code will refuse to load a plugin that doesn't export a
`qemu_plugin_version` symbol or if plugin version is outside of QEMU's
supported range of API versions.

Additionally the `qemu_info_t` structure which is passed to the
`qemu_plugin_install` method of a plugin will detail the minimum and
current API versions supported by QEMU. The API version will be
incremented if new APIs are added. The minimum API version will be
incremented if existing APIs are changed or removed.

Exposure of QEMU internals
--------------------------
Expand All @@ -40,16 +57,14 @@ instructions and events are opaque to the plugins themselves.
Usage
=====

The QEMU binary needs to be compiled for plugin support:
The QEMU binary needs to be compiled for plugin support::

::
configure --enable-plugins
configure --enable-plugins

Once built a program can be run with multiple plugins loaded each with
their own arguments:
their own arguments::

::
$QEMU $OTHER_QEMU_ARGS \
$QEMU $OTHER_QEMU_ARGS \
-plugin tests/plugin/libhowvec.so,arg=inline,arg=hint \
-plugin tests/plugin/libhotblocks.so

Expand Down
2 changes: 0 additions & 2 deletions tests/tcg/multiarch/float_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ char *fmt_16(uint16_t num)

#ifndef SNANF
/* Signaling NaN macros, if supported. */
# if __GNUC_PREREQ(3, 3)
# define SNANF (__builtin_nansf (""))
# define SNAN (__builtin_nans (""))
# define SNANL (__builtin_nansl (""))
# endif
#endif

static float f32_numbers[] = {
Expand Down
6 changes: 5 additions & 1 deletion tests/tcg/multiarch/linux-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,11 @@ static void test_signal(void)
act.sa_flags = SA_SIGINFO;
chk_error(sigaction(SIGSEGV, &act, NULL));
if (setjmp(jmp_env) == 0) {
*(uint8_t *)0 = 0;
/*
* clang requires volatile or it will turn this into a
* call to abort() instead of forcing a SIGSEGV.
*/
*(volatile uint8_t *)0 = 0;
}

act.sa_handler = SIG_DFL;
Expand Down
2 changes: 1 addition & 1 deletion tests/vm/basevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def main(vmcls):
exitcode = 0
if vm.ssh(*cmd) != 0:
exitcode = 3
if exitcode != 0 and args.interactive:
if args.interactive:
vm.ssh()

if not args.snapshot:
Expand Down

0 comments on commit 7b54253

Please sign in to comment.