1. 08 1月, 2015 2 次提交
  2. 16 12月, 2014 1 次提交
  3. 23 11月, 2014 1 次提交
  4. 18 11月, 2014 1 次提交
    • P
      exec: Handle multipage ranges in invalidate_and_set_dirty() · f874bf90
      Peter Maydell 提交于
      The code in invalidate_and_set_dirty() needs to handle addr/length
      combinations which cross guest physical page boundaries. This can happen,
      for example, when disk I/O reads large blocks into guest RAM which previously
      held code that we have cached translations for. Unfortunately we were only
      checking the clean/dirty status of the first page in the range, and then
      were calling a tb_invalidate function which only handles ranges that don't
      cross page boundaries. Fix the function to deal with multipage ranges.
      
      The symptoms of this bug were that guest code would misbehave (eg segfault),
      in particular after a guest reboot but potentially any time the guest
      reused a page of its physical RAM for new code.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1416167061-13203-1-git-send-email-peter.maydell@linaro.org
      f874bf90
  5. 20 9月, 2014 1 次提交
  6. 12 9月, 2014 4 次提交
  7. 09 9月, 2014 3 次提交
  8. 05 9月, 2014 1 次提交
  9. 29 8月, 2014 1 次提交
  10. 18 8月, 2014 1 次提交
  11. 22 7月, 2014 1 次提交
    • P
      exec: fix migration with devices that use address_space_rw · 6886867e
      Paolo Bonzini 提交于
      Devices that use address_space_rw to write large areas to memory
      (as opposed to address_space_map/unmap) were broken with respect
      to migration since fe680d0d (exec: Limit translation limiting in
      address_space_translate to xen, 2014-05-07).  Such devices include
      IDE CD-ROMs.
      
      The reason is that invalidate_and_set_dirty (called by address_space_rw
      but not address_space_map/unmap) was only setting the dirty bit for
      the first page in the translation.
      
      To fix this, introduce cpu_physical_memory_set_dirty_range_nocode that
      is the same as cpu_physical_memory_set_dirty_range except it does not
      muck with the DIRTY_MEMORY_CODE bitmap.  This function can be used if
      the caller invalidates translations with tb_invalidate_phys_page_range.
      
      There is another difference between cpu_physical_memory_set_dirty_range
      and cpu_physical_memory_set_dirty_flag; the former includes a call
      to xen_modified_memory.  This is handled separately in
      invalidate_and_set_dirty, and is not needed in other callers of
      cpu_physical_memory_set_dirty_range_nocode, so leave it alone.
      
      Just one nit: now that invalidate_and_set_dirty takes care of handling
      multiple pages, there is no need for address_space_unmap to wrap it
      in a loop.  In fact that loop would now be O(n^2).
      Reported-by: NDave Gilbert <dgilbert@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Tested-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6886867e
  12. 01 7月, 2014 2 次提交
  13. 30 6月, 2014 2 次提交
    • G
      exec: introduce target_words_bigendian() helper · 98ed8ecf
      Greg Kurz 提交于
      We currently have a virtio_is_big_endian() helper that provides the target
      endianness to the virtio code. As of today, the helper returns a fixed
      compile-time value. Of course, this will have to change if we want to
      support target endianness changes at run-time.
      
      Let's move the TARGET_WORDS_BIGENDIAN bits out to a new helper and have
      virtio_is_big_endian() implemented on top of it.
      
      This patch doesn't change any functionality.
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      98ed8ecf
    • D
      vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message · 3fd74b84
      Damjan Marion 提交于
      Old code was affected by memory gaps which resulted in buffer pointers
      pointing to address outside of the mapped regions.
      
      Here we are introducing following changes:
       - new function qemu_get_ram_block_host_ptr() returns host pointer
         to the ram block, it is needed to calculate offset of specific
         region in the host memory
       - new field mmap_offset is added to the VhostUserMemoryRegion. It
         contains offset where specific region starts in the mapped memory.
         As there is stil no wider adoption of vhost-user agreement was made
         that we will not bump version number due to this change
       - other fileds in VhostUserMemoryRegion struct are not changed, as
         they are all needed for usermode app implementation
       - region data is not taken from ram_list.blocks anymore, instead we
         use region data which is alredy calculated for use in vhost-net
       - Now multiple regions can have same FD and user applicaton can call
         mmap() multiple times with the same FD but with different offset
         (user needs to take care for offset page alignment)
      Signed-off-by: NDamjan Marion <damarion@cisco.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDamjan Marion <damarion@cisco.com>
      3fd74b84
  14. 23 6月, 2014 1 次提交
  15. 19 6月, 2014 7 次提交
  16. 17 6月, 2014 2 次提交
  17. 14 5月, 2014 1 次提交
  18. 08 5月, 2014 1 次提交
  19. 20 3月, 2014 1 次提交
  20. 14 3月, 2014 6 次提交