Skip to content
Snippets Groups Projects
  1. Jan 19, 2023
  2. Jan 08, 2023
    • Markus Armbruster's avatar
      include/hw/pci: Split pci_device.h off pci.h · edf5ca5d
      Markus Armbruster authored
      
      PCIDeviceClass and PCIDevice are defined in pci.h.  Many users of the
      header don't actually need them.  Similar structs live in their own
      headers: PCIBusClass and PCIBus in pci_bus.h, PCIBridge in
      pci_bridge.h, PCIHostBridgeClass and PCIHostState in pci_host.h,
      PCIExpressHost in pcie_host.h, and PCIERootPortClass, PCIEPort, and
      PCIESlot in pcie_port.h.
      
      Move PCIDeviceClass and PCIDeviceClass to new pci_device.h, along with
      the code that needs them.  Adjust include directives.
      
      This also enables the next commit.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20221222100330.380143-6-armbru@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      edf5ca5d
  3. Dec 14, 2022
    • Markus Armbruster's avatar
      qapi ui: Elide redundant has_FOO in generated C · 3f41a3ad
      Markus Armbruster authored
      
      The has_FOO for pointer-valued FOO are redundant, except for arrays.
      They are also a nuisance to work with.  Recent commit "qapi: Start to
      elide redundant has_FOO in generated C" provided the means to elide
      them step by step.  This is the step for qapi/ui.json.
      
      Said commit explains the transformation in more detail.  The invariant
      violations mentioned there do not occur here.
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20221104160712.3005652-28-armbru@redhat.com>
      3f41a3ad
    • Markus Armbruster's avatar
      qapi block: Elide redundant has_FOO in generated C · 54fde4ff
      Markus Armbruster authored
      
      The has_FOO for pointer-valued FOO are redundant, except for arrays.
      They are also a nuisance to work with.  Recent commit "qapi: Start to
      elide redundant has_FOO in generated C" provided the means to elide
      them step by step.  This is the step for qapi/block*.json.
      
      Said commit explains the transformation in more detail.
      
      There is one instance of the invariant violation mentioned there:
      qcow2_signal_corruption() passes false, "" when node_name is an empty
      string.  Take care to pass NULL then.
      
      The previous two commits cleaned up two more.
      
      Additionally, helper bdrv_latency_histogram_stats() loses its output
      parameters and returns a value instead.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Hanna Reitz <hreitz@redhat.com>
      Cc: qemu-block@nongnu.org
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20221104160712.3005652-11-armbru@redhat.com>
      [Fixes for #ifndef LIBRBD_SUPPORTS_ENCRYPTION and MacOS squashed in]
      54fde4ff
    • Markus Armbruster's avatar
      error: Drop a few superfluous ERRP_GUARD() · 740d6c4e
      Markus Armbruster authored
      
      include/qapi/error.h on ERRP_GUARD():
      
       * It must be used when the function dereferences @errp or passes
       * @errp to error_prepend(), error_vprepend(), or error_append_hint().
       * It is safe to use even when it's not needed, but please avoid
       * cluttering the source with useless code.
      
      Clean up some of this clutter.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20221121085054.683122-3-armbru@redhat.com>
      740d6c4e
  4. Nov 23, 2022
  5. Nov 08, 2022
  6. 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
  7. Oct 24, 2022
  8. Oct 22, 2022
  9. Oct 12, 2022
  10. Oct 11, 2022
  11. 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
  12. Sep 23, 2022
  13. Sep 22, 2022
  14. Aug 18, 2022
  15. Aug 01, 2022
  16. Jul 28, 2022
  17. Jul 19, 2022
  18. Jul 12, 2022
  19. Jul 01, 2022
  20. Jun 28, 2022
  21. 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
Loading