Skip to content
Snippets Groups Projects
  1. Nov 23, 2022
  2. Nov 08, 2022
  3. Nov 06, 2022
    • Claudio Fontana's avatar
      module: add Error arguments to module_load and module_load_qom · c551fb0b
      Claudio Fontana authored
      
      improve error handling during module load, by changing:
      
      bool module_load(const char *prefix, const char *lib_name);
      void module_load_qom(const char *type);
      
      to:
      
      int module_load(const char *prefix, const char *name, Error **errp);
      int module_load_qom(const char *type, Error **errp);
      
      where the return value is:
      
       -1 on module load error, and errp is set with the error
        0 on module or one of its dependencies are not installed
        1 on module load success
        2 on module load success (module already loaded or built-in)
      
      module_load_qom_one has been introduced in:
      
      commit 28457744 ("module: qom module support"), which built on top of
      module_load_one, but discarded the bool return value. Restore it.
      
      Adapt all callers to emit errors, or ignore them, or fail hard,
      as appropriate in each context.
      
      Replace the previous emission of errors via fprintf in _some_ error
      conditions with Error and error_report, so as to emit to the appropriate
      target.
      
      A memory leak is also fixed as part of the module_load changes.
      
      audio: when attempting to load an audio module, report module load errors.
      Note that still for some callers, a single issue may generate multiple
      error reports, and this could be improved further.
      Regarding the audio code itself, audio_add() seems to ignore errors,
      and this should probably be improved.
      
      block: when attempting to load a block module, report module load errors.
      For the code paths that already use the Error API, take advantage of those
      to report module load errors into the Error parameter.
      For the other code paths, we currently emit the error, but this could be
      improved further by adding Error parameters to all possible code paths.
      
      console: when attempting to load a display module, report module load errors.
      
      qdev: when creating a new qdev Device object (DeviceState), report load errors.
            If a module cannot be loaded to create that device, now abort execution
            (if no CONFIG_MODULE) or exit (if CONFIG_MODULE).
      
      qom/object.c: when initializing a QOM object, or looking up class_by_name,
                    report module load errors.
      
      qtest: when processing the "module_load" qtest command, report errors
             in the load of the module.
      
      Signed-off-by: default avatarClaudio Fontana <cfontana@suse.de>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20220929093035.4231-4-cfontana@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c551fb0b
    • Claudio Fontana's avatar
      module: rename module_load_one to module_load · dbc0e805
      Claudio Fontana authored
      
      Signed-off-by: default avatarClaudio Fontana <cfontana@suse.de>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20220929093035.4231-3-cfontana@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      dbc0e805
  4. Oct 24, 2022
  5. Oct 22, 2022
  6. Oct 12, 2022
  7. Oct 11, 2022
  8. Sep 29, 2022
    • Paolo Bonzini's avatar
      ui: fix path to dbus-display1.h · 0e902f59
      Paolo Bonzini authored
      
      While the source directory is always included in the include path,
      the corresponding directory in the build tree is not.  Therefore,
      custom_targets (e.g. ui/dbus-display1.h) must be referred to using
      the full path.
      
      This avoids a build failure when ui/dbus-chardev.c is not built as
      a module:
      
      In file included from ../ui/dbus-chardev.c:32:
      ../ui/dbus.h:34:10: fatal error: dbus-display1.h: No such file or directory
         34 | #include "dbus-display1.h"
            |          ^~~~~~~~~~~~~~~~~
      
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0e902f59
  9. Sep 23, 2022
  10. Sep 22, 2022
  11. Aug 18, 2022
  12. Aug 01, 2022
  13. Jul 28, 2022
  14. Jul 19, 2022
  15. Jul 12, 2022
  16. Jul 01, 2022
  17. Jun 28, 2022
  18. Jun 14, 2022
    • Akihiko Odaki's avatar
      ui: Deliver refresh rate via QemuUIInfo · aeffd071
      Akihiko Odaki authored
      
      This change adds a new member, refresh_rate to QemuUIInfo in
      include/ui/console.h. It represents the refresh rate of the
      physical display backend, and it is more appropriate than
      GUI update interval as the refresh rate which the emulated device
      reports:
      - sdl may set GUI update interval shorter than the refresh rate
        of the physical display to respond to user-generated events.
      - sdl and vnc aggressively changes GUI update interval, but
        a guests is typically not designed to respond to frequent
        refresh rate changes, or frequent "display mode" changes in
        general. The frequency of refresh rate changes of the physical
        display backend matches better to the guest's expectation.
      
      QemuUIInfo also has other members representing "display mode",
      which makes it suitable for refresh rate representation. It has
      a throttling of update notifications, and prevents frequent changes
      of the display mode.
      
      Signed-off-by: default avatarAkihiko Odaki <akihiko.odaki@gmail.com>
      Message-Id: <20220226115516.59830-3-akihiko.odaki@gmail.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      aeffd071
    • Akihiko Odaki's avatar
      ui/cocoa: Fix poweroff request code · 2910abd6
      Akihiko Odaki authored
      
      Signed-off-by: default avatarAkihiko Odaki <akihiko.odaki@gmail.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20220529082508.89097-1-akihiko.odaki@gmail.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      2910abd6
    • Volker Rümelin's avatar
      ui/gtk-gl-area: create the requested GL context version · 09053670
      Volker Rümelin authored
      
      Since about 2018 virglrenderer (commit fa835b0f88 "vrend: don't
      hardcode context version") tries to open the highest available GL
      context version. This is done by creating the known GL context
      versions from the highest to the lowest until (*create_gl_context)
      returns a context != NULL.
      
      This does not work properly with
      the current QEMU gd_gl_area_create_context() function, because
      gdk_gl_context_realize() on Wayland creates a version 3.0 legacy
      context if the requested GL context version can't be created.
      
      In order for virglrenderer to find the highest available GL
      context version, return NULL if the created context version is
      lower than the requested version.
      
      This fixes the following error:
      QEMU started with -device virtio-vga-gl -display gtk,gl=on.
      Under Wayland, the guest window remains black and the following
      information can be seen on the host.
      
      gl_version 30 - compat profile
      (qemu:5978): Gdk-WARNING **: 16:19:01.533:
        gdk_gl_context_set_required_version
        - GL context versions less than 3.2 are not supported.
      
      (qemu:5978): Gdk-WARNING **: 16:19:01.537:
        gdk_gl_context_set_required_version -
        GL context versions less than 3.2 are not supported.
      
      (qemu:5978): Gdk-WARNING **: 16:19:01.554:
        gdk_gl_context_set_required_version -
        GL context versions less than 3.2 are not supported.
      vrend_renderer_fill_caps: Entering with stale GL error: 1282
      
      To reproduce this error, an OpenGL driver is required on the host
      that doesn't have the latest OpenGL extensions fully implemented.
      An example for this is the Intel i965 driver on a Haswell processor.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20220605085131.7711-2-vr_qemu@t-online.de>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      09053670
    • Volker Rümelin's avatar
      ui/gtk-gl-area: implement GL context destruction · e561b3b7
      Volker Rümelin authored
      
      The counterpart function for gd_gl_area_create_context() is
      currently empty. Implement the gd_gl_area_destroy_context()
      function to avoid GL context leaks.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20220605085131.7711-1-vr_qemu@t-online.de>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      e561b3b7
  19. Jun 03, 2022
    • Thomas Huth's avatar
      ui: Switch "-display sdl" to use the QAPI parser · 9eafdeea
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      9eafdeea
  20. May 12, 2022
  21. May 11, 2022
  22. May 03, 2022
Loading