1. 29 10月, 2018 1 次提交
    • G
      qxl: store channel id in qxl->id · 60e94e43
      Gerd Hoffmann 提交于
      See qemu_spice_add_display_interface(), the console index is also used
      as channel id.  So put that into the qxl->id field too.
      
      In typical use cases (one primary qxl-vga device, optionally one or more
      secondary qxl devices, no non-qxl display devices) this doesn't change
      anything.
      
      With this in place the qxl->id can not be used any more to figure
      whenever a given device is primary (with vga compat mode) or secondary.
      So add a bool to track this.
      
      Cc: spice-devel@lists.freedesktop.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20181012114540.27829-1-kraxel@redhat.com
      60e94e43
  2. 15 10月, 2018 1 次提交
  3. 05 10月, 2018 1 次提交
  4. 27 9月, 2018 1 次提交
    • G
      qxl: use guest_monitor_config for local renderer. · 979f7ef8
      Gerd Hoffmann 提交于
      When processing monitor config from guest store head0 width and height
      for single-head configurations.  Use these when creating the
      DisplaySurface in the local renderer.
      
      This fixes a rendering issue with wayland.  Wayland rounds up the
      framebuffer width and height to a multiple of 64, so with odd
      resolutions (800x600 for example) the framebuffer is larger than the
      actual screen.  The monitor config has the actual screen size though.
      
      This fixes guest display for anything using the local renderer
      (non-spice UI, screendump monitor command).
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 20180919103057.9666-1-kraxel@redhat.com
      979f7ef8
  5. 21 8月, 2018 1 次提交
  6. 03 7月, 2018 1 次提交
    • G
      vga: disable global_vmstate for 3.0+ machine types · 1fcfdc43
      Gerd Hoffmann 提交于
      Move global_vmstate from vga_common_init() parameter to VGACommonState
      field.  Set global_vmstate to true for isa vga devices, so nothing
      changes here.  virtio-vga and secondary-vga already set global_vmstate
      to false so no change here either.  All other pci vga devices get a new
      global-vmstate property, defaulting to false.  A compat property flips
      it to true for older machine types.
      
      With this in place you don't get a vmstate section naming conflict any
      more when adding multiple pci vga devices to your vm.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-Id: <20180702163345.17892-1-kraxel@redhat.com>
      1fcfdc43
  7. 02 7月, 2018 1 次提交
  8. 09 2月, 2018 1 次提交
  9. 12 1月, 2018 1 次提交
  10. 15 10月, 2017 1 次提交
  11. 27 9月, 2017 1 次提交
  12. 15 8月, 2017 1 次提交
  13. 15 7月, 2017 2 次提交
  14. 28 6月, 2017 1 次提交
  15. 17 5月, 2017 1 次提交
  16. 24 4月, 2017 1 次提交
    • G
      qxl: add xres and yres properties · 6f663d7b
      Gerd Hoffmann 提交于
      Add properties for the default display resolution, pass
      on that information to the guest so the driver can use it.
      
      Also move up qxl_crc32() function so we don't need a
      forward declaration.
      
      Additionally guest driver updates are needed so the
      guest driver will actually pick this up, which will
      probably land in linux kernel 4.12.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20170421092234.8368-1-kraxel@redhat.com
      6f663d7b
  17. 11 4月, 2017 1 次提交
  18. 07 4月, 2017 1 次提交
    • M
      qxl: switch display on entering VGA · a703d3ae
      Marc-André Lureau 提交于
      Since commit cd958edb, same size console resize is skipped. This
      change broke QXL incoming migration in VGA mode,
      qemu_spice_display_switch() is no longer called during qxl_post_load(),
      because default message surface is of the same size, and during
      displaychangelistener registration, PCIQXLDevice.mode is
      QXL_MODE_UNDEFINED. This triggers a later crash on refresh:
      
      ==2634== Invalid read of size 4
      ==3516== at 0x65F3050: pixman_image_get_data (in /usr/lib64/libpixman-1.so.0.34.0)
      ==3516== by 0x6F0CEB: qemu_spice_create_update (spice-display.c:215)
      ==3516== by 0x6F1CC7: qemu_spice_display_refresh (spice-display.c:502)
      ==3516== by 0x58CF77: display_refresh (qxl.c:1948)
      ==3516== by 0x6E8084: do_safe_dpy_refresh (console.c:1591)
      ==3516== by 0x6E80D5: dpy_refresh (console.c:1604)
      ==3516== by 0x6E4508: gui_update (console.c:201)
      ==3516== by 0x81898E: timerlist_run_timers (qemu-timer.c:536)
      ==3516== by 0x8189D6: qemu_clock_run_timers (qemu-timer.c:547)
      ==3516== by 0x818D98: qemu_clock_run_all_timers (qemu-timer.c:662)
      ==3516== by 0x81952A: main_loop_wait (main-loop.c:514)
      ==3516== by 0x4ADD29: main_loop (vl.c:1898)
      
      One way to solve this is to explicitely call qemu_spice_display_switch()
      on entering VGA mode, which is called during qxl_post_load().
      
      Fixes:
      "null pointer access on migration resume of systemrescuecd boot menu with qxl-vga"
      https://bugs.launchpad.net/qemu/+bug/1679126
      https://bugzilla.redhat.com/show_bug.cgi?id=1438566Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 20170406120513.638-4-marcandre.lureau@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      a703d3ae
  19. 09 3月, 2017 1 次提交
  20. 31 1月, 2017 1 次提交
  21. 05 12月, 2016 1 次提交
    • C
      qxl: Only emit QXL_INTERRUPT_CLIENT_MONITORS_CONFIG on config changes · 6c756502
      Christophe Fergeau 提交于
      Currently if the client keeps sending the same monitor config to
      QEMU/spice-server, QEMU will always raise
      a QXL_INTERRUPT_CLIENT_MONITORS_CONFIG regardless of whether there was a
      change or not.
      Guest-side (with fedora 25), the kernel QXL KMS driver will also forward the
      event to user-space without checking if there were actual changes.
      Next in line are gnome-shell/mutter (on a default f25 install), which
      will try to reconfigure everything without checking if there is anything
      to do.
      Where this gets ugly is that when applying the resolution changes,
      gnome-shell/mutter will call drmModeRmFB, drmModeAddFB, and
      drmModeSetCrtc, which will cause the primary surface to be destroyed and
      recreated by the QXL KMS driver. This in turn will cause the client to
      resend a client monitors config message, which will cause QEMU to reemit
      an interrupt with an unchanged monitors configuration, ...
      This causes https://bugzilla.redhat.com/show_bug.cgi?id=1266484
      
      This commit makes sure that we only emit
      QXL_INTERRUPT_CLIENT_MONITORS_CONFIG when there are actual configuration
      changes the guest should act on.
      Signed-off-by: NChristophe Fergeau <cfergeau@redhat.com>
      Message-id: 20161028144840.18326-1-cfergeau@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      6c756502
  22. 20 7月, 2016 1 次提交
  23. 06 7月, 2016 6 次提交
  24. 01 3月, 2016 1 次提交
  25. 29 1月, 2016 1 次提交
  26. 06 11月, 2015 1 次提交
  27. 18 9月, 2015 1 次提交
    • M
      Fix bad error handling after memory_region_init_ram() · f8ed85ac
      Markus Armbruster 提交于
      Symptom:
      
          $ qemu-system-x86_64 -m 10000000
          Unexpected error in ram_block_add() at /work/armbru/qemu/exec.c:1456:
          upstream-qemu: cannot set up guest memory 'pc.ram': Cannot allocate memory
          Aborted (core dumped)
      
      Root cause: commit ef701d7b screwed up handling of out-of-memory
      conditions.  Before the commit, we report the error and exit(1), in
      one place, ram_block_add().  The commit lifts the error handling up
      the call chain some, to three places.  Fine.  Except it uses
      &error_abort in these places, changing the behavior from exit(1) to
      abort(), and thus undoing the work of commit 39228250 "exec: Don't
      abort when we can't allocate guest memory".
      
      The three places are:
      
      * memory_region_init_ram()
      
        Commit 49946538 (right after commit ef701d7b) lifted the error
        handling further, through memory_region_init_ram(), multiplying the
        incorrect use of &error_abort.  Later on, imitation of existing
        (bad) code may have created more.
      
      * memory_region_init_ram_ptr()
      
        The &error_abort is still there.
      
      * memory_region_init_rom_device()
      
        Doesn't need fixing, because commit 33e0eb52 (soon after commit
        ef701d7b) lifted the error handling further, and in the process
        changed it from &error_abort to passing it up the call chain.
        Correct, because the callers are realize() methods.
      
      Fix the error handling after memory_region_init_ram() with a
      Coccinelle semantic patch:
      
          @r@
          expression mr, owner, name, size, err;
          position p;
          @@
                  memory_region_init_ram(mr, owner, name, size,
          (
          -                              &error_abort
          +                              &error_fatal
          |
                                         err@p
          )
                                        );
          @script:python@
              p << r.p;
          @@
          print "%s:%s:%s" % (p[0].file, p[0].line, p[0].column)
      
      When the last argument is &error_abort, it gets replaced by
      &error_fatal.  This is the fix.
      
      If the last argument is anything else, its position is reported.  This
      lets us check the fix is complete.  Four positions get reported:
      
      * ram_backend_memory_alloc()
      
        Error is passed up the call chain, ultimately through
        user_creatable_complete().  As far as I can tell, it's callers all
        handle the error sanely.
      
      * fsl_imx25_realize(), fsl_imx31_realize(), dp8393x_realize()
      
        DeviceClass.realize() methods, errors handled sanely further up the
        call chain.
      
      We're good.  Test case again behaves:
      
          $ qemu-system-x86_64 -m 10000000
          qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
          [Exit 1 ]
      
      The next commits will repair the rest of commit ef701d7b's damage.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1441983105-26376-3-git-send-email-armbru@redhat.com>
      Reviewed-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      f8ed85ac
  28. 22 7月, 2015 1 次提交
  29. 16 7月, 2015 1 次提交
  30. 23 6月, 2015 1 次提交
  31. 12 6月, 2015 1 次提交
    • J
      migration: Use normal VMStateDescriptions for Subsections · 5cd8cada
      Juan Quintela 提交于
      We create optional sections with this patch.  But we already have
      optional subsections.  Instead of having two mechanism that do the
      same, we can just generalize it.
      
      For subsections we just change:
      
      - Add a needed function to VMStateDescription
      - Remove VMStateSubsection (after removal of the needed function
        it is just a VMStateDescription)
      - Adjust the whole tree, moving the needed function to the corresponding
        VMStateDescription
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      5cd8cada
  32. 29 5月, 2015 1 次提交
  33. 19 5月, 2015 1 次提交
  34. 30 4月, 2015 1 次提交