Skip to content
Snippets Groups Projects
  1. Jan 10, 2022
  2. Jan 06, 2022
  3. Dec 23, 2021
    • Paolo Bonzini's avatar
      build: use "meson test" as the test harness · 3d2f73ef
      Paolo Bonzini authored
      
      "meson test" starting with version 0.57 is just as capable and easy to
      use as QEMU's own TAP driver.  All existing options for "make check"
      work.  The only required code change involves how to mark "slow" tests;
      they need to belong to an additional "slow" suite.
      
      The rules for .tap output are replaced by JUnit XML; GitLab is able
      to parse that output and present it in the CI pipeline report.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      3d2f73ef
  4. Dec 21, 2021
    • Marc-André Lureau's avatar
      ui: add a D-Bus display backend · 142ca628
      Marc-André Lureau authored
      
      The "dbus" display backend exports the QEMU consoles and other
      UI-related interfaces over D-Bus.
      
      By default, the connection is established on the session bus, but you
      can specify a different bus with the "addr" option.
      
      The backend takes the "org.qemu" service name, while still allowing
      further instances to queue on the same name (so you can lookup all the
      available instances too). It accepts any number of clients at this
      point, although this is expected to evolve with options to restrict
      clients, or only accept p2p via fd passing.
      
      The interface is intentionally very close to the internal QEMU API,
      and can be introspected or interacted with busctl/dfeet etc:
      
      $ ./qemu-system-x86_64 -name MyVM -display dbus
      $ busctl --user introspect org.qemu /org/qemu/Display1/Console_0
      
      org.qemu.Display1.Console           interface -         -               -
      .RegisterListener                   method    h         -               -
      .SetUIInfo                          method    qqiiuu    -               -
      .DeviceAddress                      property  s         "pci/0000/01.0" emits-change
      .Head                               property  u         0               emits-change
      .Height                             property  u         480             emits-change
      .Label                              property  s         "VGA"           emits-change
      .Type                               property  s         "Graphic"       emits-change
      .Width                              property  u         640             emits-change
      [...]
      
      See the interfaces XML source file and Sphinx docs for the generated API
      documentations.
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Acked-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      142ca628
    • Marc-André Lureau's avatar
  5. Dec 17, 2021
  6. Dec 15, 2021
  7. Nov 30, 2021
  8. Nov 22, 2021
    • John Snow's avatar
      scripts/device-crash-test: Use a QMP timeout · 206439cd
      John Snow authored
      
      Despite all the previous fixes, it's still possible for
      device-crash-test to wedge itself in the case that QEMU terminates *so
      quickly* that it doesn't even begin a connection attempt to our QMP
      client. Python will just joyfully wait ad infinitum for a connection
      that will now never arrive.
      
      The real fix is to use asyncio to simultaneously poll both the health of
      the launched process AND the connection attempt. That's quite a bit more
      invasive than just setting a connection timeout, though.
      
      Do the very simplest thing for now.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-id: 20211118204620.1897674-7-jsnow@redhat.com
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      206439cd
  9. Nov 17, 2021
    • Thomas Huth's avatar
      Revert "device-crash-test: Ignore errors about a bus not being available" · 418ce020
      Thomas Huth authored
      
      This reverts commit ca89d15f.
      
      There is already an entry for this kind of messages earlier in the
      ERROR_RULE_LIST - when I added this patch, I just got fooled by
      the other errors that occur due to a race between QMP connection
      and QEMU terminating early (which still spit out the 'No bus found'
      messages in their backtrace), but these other problems have now
      fortunately been tackled by John Snow, so we certainly don't need
      this duplicated entry here anymore.
      
      Message-Id: <20211112072220.108580-1-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      418ce020
  10. Nov 16, 2021
    • John Snow's avatar
      scripts/device-crash-test: hide tracebacks for QMP connect errors · c398a241
      John Snow authored
      
      Generally, the traceback for a connection failure is uninteresting and
      all we need to know is that the connection attempt failed.
      
      Reduce the verbosity in these cases, except when debugging.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reported-by: default avatarThomas Huth <thuth@redhat.com>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20211111143719.2162525-6-jsnow@redhat.com
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      c398a241
    • John Snow's avatar
      scripts/device-crash-test: don't emit AQMP connection errors to stdout · 76f86e78
      John Snow authored
      
      These errors are expected, so they shouldn't clog up terminal output. In
      the event that they're *not* expected, we'll be seeing an awful lot more
      output concerning the nature of the failure.
      
      Reported-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20211111143719.2162525-5-jsnow@redhat.com
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      76f86e78
    • John Snow's avatar
      scripts/device-crash-test: simplify Exception handling · 47b43acd
      John Snow authored
      
      We don't need to handle KeyboardInterruptError specifically; we can
      instead tighten the scope of the broad Exception handlers to only catch
      "Exception", which has the effect of allowing all BaseException classes
      that do not inherit from Exception to be raised through.
      
      KeyboardInterruptError and a few other important ones are
      BaseExceptions, so this does the same thing with less code.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reported-by: default avatarThomas Huth <thuth@redhat.com>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20211111143719.2162525-4-jsnow@redhat.com
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      47b43acd
    • Cleber Rosa's avatar
      Jobs based on custom runners: add CentOS Stream 8 · d7c2e2b3
      Cleber Rosa authored
      
      This introduces three different parts of a job designed to run
      on a custom runner managed by Red Hat.  The goals include:
      
        a) propose a model for other organizations that want to onboard
           their own runners, with their specific platforms, build
           configuration and tests.
      
        b) bring awareness to the differences between upstream QEMU and the
           version available under CentOS Stream, which is "A preview of
           upcoming Red Hat Enterprise Linux minor and major releases".
      
        c) because of b), it should be easier to identify and reduce the gap
           between Red Hat's downstream and upstream QEMU.
      
      The components of this custom job are:
      
        I) OS build environment setup code:
      
           - additions to the existing "build-environment.yml" playbook
             that can be used to set up CentOS/EL 8 systems.
      
           - a CentOS Stream 8 specific "build-environment.yml" playbook
             that adds to the generic one.
      
       II) QEMU build configuration: a script that will produce binaries with
           features as similar as possible to the ones built and packaged on
           CentOS stream 8.
      
      III) Scripts that define the minimum amount of testing that the
           binaries built with the given configuration (point II) under the
           given OS build environment (point I) should be subjected to.
      
       IV) Job definition: GitLab CI jobs that will dispatch the build/test
           jobs (see points #II and #III) to the machine specifically
           configured according to #I.
      
      Signed-off-by: default avatarCleber Rosa <crosa@redhat.com>
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarWillian Rampazzo <willianr@redhat.com>
      Tested-by: default avatarWillian Rampazzo <willianr@redhat.com>
      Message-Id: <20211111160501.862396-2-crosa@redhat.com>
      Message-Id: <20211115142915.3797652-6-alex.bennee@linaro.org>
      d7c2e2b3
    • Richard W.M. Jones's avatar
      nbd/server: Add --selinux-label option · 3d212b41
      Richard W.M. Jones authored
      Under SELinux, Unix domain sockets have two labels.  One is on the
      disk and can be set with commands such as chcon(1).  There is a
      different label stored in memory (called the process label).  This can
      only be set by the process creating the socket.  When using SELinux +
      SVirt and wanting qemu to be able to connect to a qemu-nbd instance,
      you must set both labels correctly first.
      
      For qemu-nbd the options to set the second label are awkward.  You can
      create the socket in a wrapper program and then exec into qemu-nbd.
      Or you could try something with LD_PRELOAD.
      
      This commit adds the ability to set the label straightforwardly on the
      command line, via the new --selinux-label flag.  (The name of the flag
      is the same as the equivalent nbdkit option.)
      
      A worked example showing how to use the new option can be found in
      this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1984938
      
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1984938
      
      
      Signed-off-by: default avatarRichard W.M. Jones <rjones@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      
      [eblake: rebase to configure changes, reject --selinux-label if it is
      not compiled in or not used on a Unix socket]
      Note that we may relax some of these restrictions at a later date,
      such as making it possible to label a TCP socket, although it may be
      smarter to do so as a generic QMP action rather than more one-off
      command lines in qemu-nbd.
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20211115202944.615966-1-eblake@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      [eblake: adjust meson output as suggested by thuth]
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      3d212b41
  11. Nov 11, 2021
  12. Nov 02, 2021
  13. Nov 01, 2021
  14. Oct 29, 2021
  15. Oct 27, 2021
    • Markus Armbruster's avatar
      qapi: Implement deprecated-input={reject,crash} for enum values · aa237044
      Markus Armbruster authored
      
      This copies the code implementing the policy from qapi/qmp-dispatch.c
      to qapi/qobject-input-visitor.c.  Tolerable, but if we acquire more
      copies, we should look into factoring them out.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Tested-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Acked-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Message-Id: <20211025042405.3762351-5-armbru@redhat.com>
      aa237044
    • Markus Armbruster's avatar
      qapi: Add feature flags to enum members · b6c18755
      Markus Armbruster authored
      
      This is quite similar to commit 84ab0086 "qapi: Add feature flags to
      struct members", only for enums instead of structs.
      
      Special feature flag 'deprecated' is silently ignored there.  This is
      okay only because it will be implemented shortly.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20211025042405.3762351-3-armbru@redhat.com>
      Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
      b6c18755
    • Markus Armbruster's avatar
      qapi: Enable enum member introspection to show more than name · 75ecee72
      Markus Armbruster authored
      
      The next commit will add feature flags to enum members.  There's a
      problem, though: query-qmp-schema shows an enum type's members as an
      array of member names (SchemaInfoEnum member @values).  If it showed
      an array of objects with a name member, we could simply add more
      members to these objects.  Since it's just strings, we can't.
      
      I can see three ways to correct this design mistake:
      
      1. Do it the way we should have done it, plus compatibility goo.
      
         We want a ['SchemaInfoEnumMember'] member in SchemaInfoEnum.  Since
         changing @values would be a compatibility break, add a new member
         @members instead.
      
         @values is now redundant.  In my testing, output of
         qemu-system-x86_64's query-qmp-schema grows by 11% (18.5KiB).
      
         We can deprecate @values now and drop it later.  This will break
         outmoded clients.  Well-behaved clients such as libvirt are
         expected to break cleanly.
      
      2. Like 1, but omit "boring" elements of @member, and empty @member.
      
         @values does not become redundant.  @members augments it.  Somewhat
         cumbersome, but output of query-qmp-schema grows only as we make
         enum members non-boring.
      
         There is nothing to deprecate here.
      
      3. Versioned query-qmp-schema.
      
         query-qmp-schema provides either @values or @members.  The QMP
         client can select which version it wants.  There is no redundant
         output.
      
         We can deprecate old versions and eventually drop them.  This will
         break outmoded clients.  Breaking cleanly is easier than for 1.
      
         While 1 and 2 operate within the common rules for compatible
         evolution apply (section "Compatibility considerations" in
         docs/devel/qapi-code-gen.rst), 3 bypasses them.  Attractive when
         operating within the rules is just too awkward.  Not the case here.
      
      This commit implements 1.  Libvirt developers prefer it.
      
      Deprecate @values in favour of @members.  Since query-qmp-schema
      compatibility is pretty fundamental for management applications, an
      extended grace period is advised.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Tested-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Acked-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Message-Id: <20211025042405.3762351-2-armbru@redhat.com>
      Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
      75ecee72
  16. Oct 23, 2021
  17. Oct 20, 2021
  18. Oct 15, 2021
  19. Oct 14, 2021
    • Paolo Bonzini's avatar
      configure: automatically parse command line for meson -D options · 3b4da132
      Paolo Bonzini authored
      
      Right now meson_options.txt lists about 90 options.  Each option
      needs code in configure to parse it and pass the option down to Meson as
      a -D command-line argument; in addition the default must be duplicated
      between configure and meson_options.txt.  This series tries to remove
      the code duplication by generating the case statement for those --enable
      and --disable options, as well as the corresponding help text.
      
      About 80% of the options can be handled completely by the new mechanism.
      Eight meson options are not of the --enable/--disable kind.  Six more need
      to be parsed in configure for various reasons documented in the patch,
      but they still have their help automatically generated.
      
      The advantages are:
      
      - less code in configure
      
      - parsing and help is more consistent (for example --enable-blobs was
        not supported)
      
      - options are described entirely in one place, meson_options.txt.
        This make it more attractive to use Meson options instead of
        hand-crafted configure options and config-host.mak
      
      A few options change name: --enable-tcmalloc and --enable-jemalloc
      become --enable-malloc={tcmalloc,jemalloc}; --disable-blobs becomes
      --disable-install-blobs; --enable-trace-backend becomes
      --enable-trace-backends.  However, the old names are allowed
      for backwards compatibility.
      
      Message-Id: <20211007130829.632254-19-pbonzini@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      3b4da132
    • Paolo Bonzini's avatar
      meson-buildoptions: include list of tracing backends · 8b5fb298
      Paolo Bonzini authored
      Manually patch the introspection data to include the tracing backends.
      This works around a deficiency in Meson that will be fixed by
      https://github.com/mesonbuild/meson/pull/9395
      
      .
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8b5fb298
    • Paolo Bonzini's avatar
      configure: prepare for auto-generated option parsing · 61d63097
      Paolo Bonzini authored
      
      Prepare the configure script and Makefile for automatically generated
      help and parsing.
      
      Because we need to run the script to generate the full help, we
      cannot rely on the user supplying the path to a Python interpreter
      with --python; therefore, the introspection output is parsed into
      shell functions and stored in scripts/.  The converter is written
      in Python as standard for QEMU, and this commit contains a stub.
      
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20211007130829.632254-18-pbonzini@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      61d63097
    • Paolo Bonzini's avatar
      trace: move configuration from configure to Meson · 9c29b741
      Paolo Bonzini authored
      
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20211007130829.632254-4-pbonzini@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9c29b741
  20. Oct 05, 2021
  21. Oct 02, 2021
Loading