Skip to content
Snippets Groups Projects
  1. Sep 21, 2017
  2. Sep 19, 2017
  3. Aug 01, 2017
    • Jay Zhou's avatar
      migration: optimize the downtime · 19310760
      Jay Zhou authored
      
      Qemu_savevm_state_cleanup takes about 300ms in my ram migration tests
      with a 8U24G vm(20G is really occupied), the main cost comes from
      KVM_SET_USER_MEMORY_REGION ioctl when mem.memory_size = 0 in
      kvm_set_user_memory_region. In kmod, the main cost is
      kvm_zap_obsolete_pages, which traverses the active_mmu_pages list to
      zap the unsync sptes.
      
      It can be optimized by delaying memory_global_dirty_log_stop to the next
      vm_start.
      
      Changes v2->v3:
       - NULL VMChangeStateHandler if it is deleted and protect the scenario
         of nested invocations of memory_global_dirty_log_start/stop [Paolo]
      
      Changes v1->v2:
       - create a VMChangeStateHandler in memory.c to reduce the coupling [Paolo]
      
      Signed-off-by: default avatarJay Zhou <jianjay.zhou@huawei.com>
      Message-Id: <1501237733-2736-1-git-send-email-jianjay.zhou@huawei.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      19310760
  4. Jul 14, 2017
  5. Jun 27, 2017
  6. Jun 15, 2017
  7. May 25, 2017
  8. Apr 24, 2017
    • Gerd Hoffmann's avatar
      memory: add support getting and using a dirty bitmap copy. · 8deaf12c
      Gerd Hoffmann authored
      
      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: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20170421091632.30900-3-kraxel@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      8deaf12c
  9. Apr 20, 2017
  10. Mar 24, 2017
  11. Mar 14, 2017
  12. Mar 03, 2017
    • Paolo Bonzini's avatar
      memory: show region offset and ROM/RAM type in "info mtree -f" · 377a07aa
      Paolo Bonzini authored
      
      "info mtree -f" output is currently hard to use for large RAM regions, because
      there is no hint as to what part of the region is being mapped.  Add the offset
      if it is nonzero.
      
      Secondly, FlatView has a readonly field, that can override the MemoryRegion
      in the presence of aliases.  Take it into account.
      
      Together, with this patch this:
      
      address-space (flat view): KVM-SMRAM
        0000000000000000-00000000000bffff (prio 0, ram): pc.ram
        00000000000c0000-00000000000c9fff (prio 0, ram): pc.ram
        00000000000ca000-00000000000ccfff (prio 0, ram): pc.ram
        00000000000cd000-00000000000ebfff (prio 0, ram): pc.ram
        00000000000ec000-00000000000effff (prio 0, ram): pc.ram
        00000000000f0000-00000000000fffff (prio 0, ram): pc.ram
        0000000000100000-00000000bfffffff (prio 0, ram): pc.ram
        00000000fd000000-00000000fdffffff (prio 1, ram): vga.vram
        00000000febc0000-00000000febdffff (prio 1, i/o): e1000-mmio
        00000000febf0400-00000000febf041f (prio 0, i/o): vga ioports remapped
        00000000febf0500-00000000febf0515 (prio 0, i/o): bochs dispi interface
        00000000febf0600-00000000febf0607 (prio 0, i/o): qemu extended regs
        00000000fec00000-00000000fec00fff (prio 0, i/o): kvm-ioapic
        00000000fed00000-00000000fed003ff (prio 0, i/o): hpet
        00000000fee00000-00000000feefffff (prio 4096, i/o): kvm-apic-msi
        00000000fffc0000-00000000ffffffff (prio 0, rom): pc.bios
        0000000100000000-000000013fffffff (prio 0, ram): pc.ram
      
      becomes this:
      
      address-space (flat view): KVM-SMRAM
        0000000000000000-00000000000bffff (prio 0, ram): pc.ram
        00000000000c0000-00000000000c9fff (prio 0, rom): pc.ram @00000000000c0000
        00000000000ca000-00000000000ccfff (prio 0, ram): pc.ram @00000000000ca000
        00000000000cd000-00000000000ebfff (prio 0, rom): pc.ram @00000000000cd000
        00000000000ec000-00000000000effff (prio 0, ram): pc.ram @00000000000ec000
        00000000000f0000-00000000000fffff (prio 0, rom): pc.ram @00000000000f0000
        0000000000100000-00000000bfffffff (prio 0, ram): pc.ram @0000000000100000
        00000000fd000000-00000000fdffffff (prio 1, ram): vga.vram
        00000000febc0000-00000000febdffff (prio 1, i/o): e1000-mmio
        00000000febf0400-00000000febf041f (prio 0, i/o): vga ioports remapped
        00000000febf0500-00000000febf0515 (prio 0, i/o): bochs dispi interface
        00000000febf0600-00000000febf0607 (prio 0, i/o): qemu extended regs
        00000000fec00000-00000000fec00fff (prio 0, i/o): kvm-ioapic
        00000000fed00000-00000000fed003ff (prio 0, i/o): hpet
        00000000fee00000-00000000feefffff (prio 4096, i/o): kvm-apic-msi
        00000000fffc0000-00000000ffffffff (prio 0, rom): pc.bios
        0000000100000000-000000013fffffff (prio 0, ram): pc.ram @00000000c0000000
      
      This should make it easier to understand what's going on.
      
      Cc: Peter Xu <peterx@redhat.com>
      Cc: "William Tambe" <tambewilliam@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      377a07aa
    • Yongji Xie's avatar
      memory: Introduce DEVICE_HOST_ENDIAN for ram device · c99a29e7
      Yongji Xie authored
      
      At the moment ram device's memory regions are DEVICE_NATIVE_ENDIAN. It's
      incorrect. This memory region is backed by a MMIO area in host, so the
      uint64_t data that MemoryRegionOps read from/write to this area should be
      host-endian rather than target-endian. Hence, current code does not work
      when target and host endianness are different which is the most common case
      on PPC64. To fix it, this introduces DEVICE_HOST_ENDIAN for the ram device.
      
      This has been tested on PPC64 BE/LE host/guest in all possible combinations
      including TCG.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarYongji Xie <xyjxie@linux.vnet.ibm.com>
      Message-Id: <1488171164-28319-1-git-send-email-xyjxie@linux.vnet.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c99a29e7
Loading