1. 31 5月, 2018 5 次提交
  2. 09 5月, 2018 2 次提交
    • P
      exec: reintroduce MemoryRegion caching · 48564041
      Paolo Bonzini 提交于
      MemoryRegionCache was reverted to "normal" address_space_* operations
      for 2.9, due to lack of support for IOMMUs.  Reinstate the
      optimizations, caching only the IOMMU translation at address_cache_init
      but not the IOMMU lookup and target AddressSpace translation are not
      cached; now that MemoryRegionCache supports IOMMUs, it becomes more widely
      applicable too.
      
      The inlined fast path is defined in memory_ldst_cached.inc.h, while the
      slow path uses memory_ldst.inc.c as before.  The smaller fast path causes
      a little code size reduction in MemoryRegionCache users:
      
          hw/virtio/virtio.o text size before: 32373
          hw/virtio/virtio.o text size after: 31941
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      48564041
    • P
      exec: move memory access declarations to a common header, inline *_phys functions · 4269c82b
      Paolo Bonzini 提交于
      For now, this reduces the text size very slightly due to the newly-added
      inlining:
      
         text size before: 9301965
         text size after: 9300645
      
      Later, however, the declarations in include/exec/memory_ldst.inc.h will be
      reused for the MemoryRegionCache slow path functions.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4269c82b
  3. 06 3月, 2018 2 次提交
  4. 19 2月, 2018 1 次提交
    • M
      mem: add share parameter to memory-backend-ram · 06329cce
      Marcel Apfelbaum 提交于
      Currently only file backed memory backend can
      be created with a "share" flag in order to allow
      sharing guest RAM with other processes in the host.
      
      Add the "share" flag also to RAM Memory Backend
      in order to allow remapping parts of the guest RAM
      to different host virtual addresses. This is needed
      by the RDMA devices in order to remap non-contiguous
      QEMU virtual addresses to a contiguous virtual address range.
      
      Moved the "share" flag to the Host Memory base class,
      modified phys_mem_alloc to include the new parameter
      and a new interface memory_region_init_ram_shared_nomigrate.
      
      There are no functional changes if the new flag is not used.
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com>
      06329cce
  5. 13 2月, 2018 2 次提交
  6. 07 2月, 2018 1 次提交
  7. 05 2月, 2018 1 次提交
  8. 19 1月, 2018 1 次提交
    • H
      hostmem-file: add "align" option · 98376843
      Haozhong Zhang 提交于
      When mmap(2) the backend files, QEMU uses the host page size
      (getpagesize(2)) by default as the alignment of mapping address.
      However, some backends may require alignments different than the page
      size. For example, mmap a device DAX (e.g., /dev/dax0.0) on Linux
      kernel 4.13 to an address, which is 4K-aligned but not 2M-aligned,
      fails with a kernel message like
      
      [617494.969768] dax dax0.0: qemu-system-x86: dax_mmap: fail, unaligned vma (0x7fa37c579000 - 0x7fa43c579000, 0x1fffff)
      
      Because there is no common approach to get such alignment requirement,
      we add the 'align' option to 'memory-backend-file', so that users or
      management utils, which have enough knowledge about the backend, can
      specify a proper alignment via this option.
      Signed-off-by: NHaozhong Zhang <haozhong.zhang@intel.com>
      Message-Id: <20171211072806.2812-2-haozhong.zhang@intel.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      [ehabkost: fixed typo, fixed error_setg() format string]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      98376843
  9. 18 12月, 2017 1 次提交
  10. 22 9月, 2017 6 次提交
  11. 04 9月, 2017 1 次提交
  12. 15 7月, 2017 4 次提交
  13. 14 7月, 2017 2 次提交
  14. 27 6月, 2017 1 次提交
  15. 15 6月, 2017 2 次提交
  16. 04 6月, 2017 1 次提交
  17. 26 5月, 2017 2 次提交
  18. 24 4月, 2017 1 次提交
    • G
      memory: add support getting and using a dirty bitmap copy. · 8deaf12c
      Gerd Hoffmann 提交于
      This patch adds support for getting and using a local copy of the dirty
      bitmap.
      
      memory_region_snapshot_and_clear_dirty() will create a snapshot of the
      dirty bitmap for the specified range, clear the dirty bitmap and return
      the copy.  The returned bitmap can be a bit larger than requested, the
      range is expanded so the code can copy unsigned longs from the bitmap
      and avoid atomic bit update operations.
      
      memory_region_snapshot_get_dirty() will return the dirty status of
      pages, pretty much like memory_region_get_dirty(), but using the copy
      returned by memory_region_copy_and_clear_dirty().
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20170421091632.30900-3-kraxel@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8deaf12c
  19. 21 4月, 2017 4 次提交