1. 11 3月, 2011 3 次提交
    • S
      vnc: Fix stack corruption and other bitmap related bugs · 23bfe28f
      Stefan Weil 提交于
      Commit bc2429b9 introduced
      a severe bug (stack corruption).
      
      bitmap_clear was called with a wrong argument
      which caused out-of-bound writes to the local variable width_mask.
      
      This bug was detected with QEMU running on windows.
      It also occurs with wine:
      
      *** stack smashing detected ***:  terminated
      wine: Unhandled illegal instruction at address 0x6115c7 (thread 0009), starting debugger...
      
      The bug is not windows specific!
      
      Instead of fixing the wrong parameter value, bitmap_clear(), bitmap_set
      and width_mask were removed, and bitmap_intersect() was replaced by
      !bitmap_empty(). The new operation is much shorter and equivalent to
      the old operations.
      
      The declarations of the dirty bitmaps in vnc.h were also wrong for 64 bit
      hosts because of a rounding effect: for these hosts, VNC_MAX_WIDTH is no
      longer a multiple of (16 * BITS_PER_LONG), so the rounded value of
      VNC_DIRTY_WORDS was too small.
      
      Fix both declarations by using the macro which is designed for this
      purpose.
      
      Cc: Corentin Chary <corentincj@iksaif.net>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Gerhard Wiesinger <lists@wiesinger.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      23bfe28f
    • J
      hmp-commands.hx: fix badly merged client_migrate_info command · 2ea720db
      Jes Sorensen 提交于
      client_migrate_info was merged badly, placing it between the command
      and the documentation for another command. In addition it did not
      respect the general rule of hmp-commands.hx, of having command
      definition before the documentation.
      Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      2ea720db
    • V
      Fix performance regression in qemu_get_ram_ptr · 7d82af38
      Vincent Palatin 提交于
      When the commit f471a17e converted the
      ram_blocks structure to QLIST, it also removed the conditional check before
      switching the current block at the beginning of the list.
      
      In the common use case where ram_blocks has a few blocks with only one
      frequently accessed (the main RAM), this has a performance impact as it
      performs the useless list operations on each call (which are on a really
      hot path).
      
      On my machine emulation (ARM on amd64), this patch reduces the
      percentage of CPU time spent in qemu_get_ram_ptr from 6.3% to 2.1% in the
      profiling of a full boot.
      Signed-off-by: NVincent Palatin <vpalatin@chromium.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7d82af38
  2. 10 3月, 2011 6 次提交
  3. 07 3月, 2011 31 次提交